class · iOS 26.0+ · Deprecated in iOS 26.2 · SDK 27.1
final class ASCredentialUpdater
This class allows passing update events to credential managers enabled on the system. When a user makes a change to how they sign in to an account, such as removing a credential or renaming the account, you can use this class to communicate that change to the user's credential manager(s), if possible. This helps the credentials managers stay synchronized with the latest account information.
Additionally, in order to protect the privacy of user's credentials, `ASCredentialUpdater` does not indicate whether the operation succeeded. A successful call only indicates that the parameters passed were well formed.
final func reportUnusedPasswordCredential(domain: String, userName: String) async throws
Report an unused password credential for a given domain and username. Password managers may remove or hide the password credential.
This information is shared with all password managers enabled in the system.
- Parameters:
- domain: The website domain that the credential is saved for.
- userName: The account user name.
- Throws: `ASAuthorizationError` if the system failed to accept the update.
final func reportPublicKeyCredentialUpdate(relyingPartyIdentifier: String, userHandle: Data, newName: String) async throws
Report an update to a credential's name, such as when changing the user name on an account.
This information is shared with all password managers enabled in the system.
- Parameters:
- relyingPartyIdentifier: Relying party (website) that the credential is saved for.
- userHandle: User identifier.
- newName: The new user name for the credential.
- Throws: `ASAuthorizationError` if the system failed to accept the update.
final func reportUnknownPublicKeyCredential(relyingPartyIdentifier: String, credentialID: Data) async throws
Report that a specific credential is unknown or no longer accepted. The credential may be removed or hidden by a password manager.
This information is shared with all password managers enabled in the system.
- Parameters:
- relyingPartyIdentifier: Relying party (website) that the credential is saved for.
- credentialID: An identifier that uniquely identifies this credential.
- Throws: `ASAuthorizationError` if the system failed to accept the update.
final func reportAllAcceptedPublicKeyCredentials(relyingPartyIdentifier: String, userHandle: Data, acceptedCredentialIDs: [Data]) async throws
Report a snapshot of all the credentialIDs that will be accepted for a `userHandle`. Credentials not present in the `acceptedCredentialIDs` may be removed or hidden by a password manager.
Relying party may choose to perform this periodically, e.g. on every sign in.
This information is shared with all password managers enabled in the system.
- Parameters:
- relyingPartyIdentifier: Relying party (website) that the credential is saved for.
- userHandle: User identifier.
- acceptedCredentialIDs: An array of identifiers that uniquely identifies the accepted credentials.
- Throws: `ASAuthorizationError` if the system failed to accept the update.