---
title: ASCredentialUpdater
framework: authenticationservices
role: symbol
role_heading: Class
path: authenticationservices/ascredentialupdater
---

# ASCredentialUpdater

A class to pass credential update events to credential managers enabled on the system.

## Declaration

```swift
final class ASCredentialUpdater
```

## Overview

Overview The ASCredentialUpdater implements the functionality of the WebAuthn Signal API, allowing apps to update credential managers with information about existing credentials. By informing credential managers of updated, removed, or revoked credentials, the credential managers can stay synchronized with the credential information of the person using the device. Use ASCredendialUpdater in the following scenarios: The following example shows how an app might use this class when processing various sign-in and account-management events: import AuthenticationServices

let credentialUpdater = ASCredentialUpdater()

func handleSuccessfulPasskeySignIn() {     ...     // Update passkey if the username changed on the account.     try credentialUpdater.reportPublicKeyCredentialUpdate(relyingPartyIdentifier:"example.com", userHandle:userData, newName: "name")          // Report accepted credentials.     try credentialUpdater.reportAllAcceptedPublicKeyCredentials(relyingPartyIdentifier:"example.com", userHandle:userData, allowedCredentialIDs:[credentialID1, credentailID2])          // Remove or hide stale password.     try credentialUpdater.reportUnusedPasswordCredential(domain: "example.com", username:"user") }

func handleFailedPasskeySignIn() {     ...     // Remove or hide invalid passkey.     try credentialUpdater.reportUnknownPublicKeyCredential(relyingPartyIdentifier:"example.com", credentialID:credentialIDData) }

func handleAccountAccountDeletion() {     ...     try credentialUpdater.reportAllAcceptedPublicKeyCredentials(relyingPartyIdentifier:"example.com", userHandle:userData, allowedCredentialIDs:[])     try credentialUpdater.reportUnusedPasswordCredential(domain: "example.com", username:"user") } note: To protect the privacy of the person using the app, this class’s methods don’t indicate whether their operations succeeded. A successful call only indicates that the parameters were well formed.

## Topics

### Creating a credential updater

- [init()](authenticationservices/ascredentialupdater/init().md)

### Reporting accepted credentials

- [reportAllAcceptedPublicKeyCredentials(relyingPartyIdentifier:userHandle:acceptedCredentialIDs:)](authenticationservices/ascredentialupdater/reportallacceptedpublickeycredentials(relyingpartyidentifier:userhandle:acceptedcredentialids:).md)

### Reporting updated credentials

- [reportPublicKeyCredentialUpdate(relyingPartyIdentifier:userHandle:newName:)](authenticationservices/ascredentialupdater/reportpublickeycredentialupdate(relyingpartyidentifier:userhandle:newname:).md)

### Reporting unused and unknown credentials

- [reportUnusedPasswordCredential(domain:userName:)](authenticationservices/ascredentialupdater/reportunusedpasswordcredential(domain:username:).md)
- [reportUnknownPublicKeyCredential(relyingPartyIdentifier:credentialID:)](authenticationservices/ascredentialupdater/reportunknownpublickeycredential(relyingpartyidentifier:credentialid:).md)
