<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASCredentialProviderViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASCredentialProviderViewController"
  },
  "title" : "ASCredentialProviderViewController"
}
-->

# ASCredentialProviderViewController

A view controller that a credential manager app uses to extend AutoFill.

```
class ASCredentialProviderViewController
```

## Overview

To integrate a password, passkey, or one-time passcode manager app with AutoFill:

1. Add a Credential Provider Extension target to your project that subclasses [`ASCredentialProviderViewController`](/documentation/AuthenticationServices/ASCredentialProviderViewController). Add the <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.authentication-services.autofill-credential-provider> to both the extension and its containing app.
2. Override the view controller’s [`prepareCredentialList(for:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareCredentialList(for:)) method to prepare a view with a list of credentials that the person can choose from after opening your extension from the AutoFill suggestions list.
3. Optionally add [`ASPasswordCredentialIdentity`](/documentation/AuthenticationServices/ASPasswordCredentialIdentity) and [`ASPasskeyCredentialIdentity`](/documentation/AuthenticationServices/ASPasskeyCredentialIdentity) instances to the shared [`ASCredentialIdentityStore`](/documentation/AuthenticationServices/ASCredentialIdentityStore) to make identities available directly in the AutoFill suggestions list. Then override the [`provideCredentialWithoutUserInteraction(for:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/provideCredentialWithoutUserInteraction(for:)-3mo23) method to provide the associated credentials when the person taps a suggestion.
4. Optionally, override the [`prepareInterfaceForExtensionConfiguration()`](/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareInterfaceForExtensionConfiguration()) method to specify a configuration interface that you can show when people first enable your credentials manager in Settings.

### Receiving credential updates

Apps and websites that allow sign-ins can signal updates to the operating system with the [`ASCredentialUpdater`](/documentation/AuthenticationServices/ASCredentialUpdater) class.
The various “report” methods of [`ASCredentialUpdater`](/documentation/AuthenticationServices/ASCredentialUpdater) work like the “signal” methods of `PublicKeyCredential` when using WebAuthn on the web.
For example, a website or app can notify credential manager apps that it updated a user name or email for a given account, allowing the manager to stay consistent with the website.

Your credential manager manager receives these updates in the “report” methods of `ASCredentialProviderViewController`.
Use these calls to update your manager’s stored credential data or behavior.
For example, a call to [`reportUnusedPasswordCredential(forDomain:userName:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/reportUnusedPasswordCredential(forDomain:userName:)) can indicate that someone using a passkey will no longer use a password to sign in to a given domain, or that they deleted their account.
In this case, the manager should stop showing the user name and password for that domain.

> Note:
> This class ignores calls from Mac apps built with Mac Catalyst.

## Topics

### Getting the extension context

[`extensionContext`](/documentation/AuthenticationServices/ASCredentialProviderViewController/extensionContext)

The context your credential provider extension uses to provide information to the system.

[`ASCredentialProviderExtensionContext`](/documentation/AuthenticationServices/ASCredentialProviderExtensionContext)

A mechanism that credential provider extensions use to communicate with the system.

### Configuring the credential provider extension

[`prepareInterfaceForExtensionConfiguration()`](/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareInterfaceForExtensionConfiguration())

Prepares the interface to enable the user to configure the extension.

[`ASCredentialIdentityStore`](/documentation/AuthenticationServices/ASCredentialIdentityStore)

A container that your extension fills to provide credentials through the QuickType bar.

### Selecting a credential

[`prepareCredentialList(for:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareCredentialList(for:))

Prepares the interface to display a list of credentials from which the user can select.

[`prepareCredentialList(for:requestParameters:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareCredentialList(for:requestParameters:))

Prepares the interface to display a list of passkey and password credentials from which the user can select.

[`prepareOneTimeCodeCredentialList(for:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareOneTimeCodeCredentialList(for:))

Prepares the interface to display a list of one-time passcodes (OTPs) that people can select from.

[`prepareInterface(forPasskeyRegistration:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareInterface(forPasskeyRegistration:))

Prepare the view controller to show user interface for registering a new passkey.

[`prepareInterfaceToProvideCredential(for:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareInterfaceToProvideCredential(for:)-68qpo)

Prepare the view controller to show user interface for providing the requested credential.

[`provideCredentialWithoutUserInteraction(for:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/provideCredentialWithoutUserInteraction(for:)-3mo23)

Attempts to provide the user-requested credential with no further user interaction.

[`performWithoutUserInteractionIfPossible(passkeyRegistration:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/performWithoutUserInteractionIfPossible(passkeyRegistration:))

Perform a conditional passkey registration, if possible.

[`ASCredentialServiceIdentifier`](/documentation/AuthenticationServices/ASCredentialServiceIdentifier)

An identifier representing a particular service for which the user needs a credential, like a web site.

[`ASCredentialRequest`](/documentation/AuthenticationServices/ASCredentialRequest)

A protocol that describes a request from the user for your extension to provide a credential.

[`ASPasswordCredentialRequest`](/documentation/AuthenticationServices/ASPasswordCredentialRequest)

A class that represents a request to supply a password credential.

[`ASOneTimeCodeCredentialRequest`](/documentation/AuthenticationServices/ASOneTimeCodeCredentialRequest)

[`ASAuthorizationPublicKeyCredentialRegistrationRequest`](/documentation/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistrationRequest)

An interface that defines properties for a credential registration request.

[`ASPasskeyCredentialRequest`](/documentation/AuthenticationServices/ASPasskeyCredentialRequest)

A class that represents a request to supply a passkey credential.

[`ASPasskeyCredentialRequestParameters`](/documentation/AuthenticationServices/ASPasskeyCredentialRequestParameters)

A class that represents information about a passkey credential request.

### Providing text to AutoFill

[`prepareInterfaceForUserChoosingTextToInsert()`](/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareInterfaceForUserChoosingTextToInsert())

Prepare the view controller to show a list of all insertable text with user selectable fields.

### Recognizing errors

[`ASExtensionError`](/documentation/AuthenticationServices/ASExtensionError)

A credential provider extension error.

[`ASExtensionErrorDomain`](/documentation/AuthenticationServices/ASExtensionErrorDomain)

The domain for a credential provider extension error.

[`ASExtensionError.Code`](/documentation/AuthenticationServices/ASExtensionError/Code)

The codes for a credential provider extension error.

### Accessing settings

[`ASSettingsHelper`](/documentation/AuthenticationServices/ASSettingsHelper)

A class that opens Settings and navigates to the settings for configuring credential providers.

### Receiving credential updates

[`reportAllAcceptedPublicKeyCredentials(forRelyingParty:userHandle:acceptedCredentialIDs:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/reportAllAcceptedPublicKeyCredentials(forRelyingParty:userHandle:acceptedCredentialIDs:))

Receives a report from the system that a relying party sent a snapshot of all accepted credentials for an account.

[`reportPublicKeyCredentialUpdate(forRelyingParty:userHandle:newName:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/reportPublicKeyCredentialUpdate(forRelyingParty:userHandle:newName:))

Receives a report from the system that a relying party indicated that a passkey’s user name updated.

[`reportUnknownPublicKeyCredential(forRelyingParty:credentialID:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/reportUnknownPublicKeyCredential(forRelyingParty:credentialID:))

Receives a report from the system that a relying party indicated a passkey credential is invalid.

[`reportUnusedPasswordCredential(forDomain:userName:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/reportUnusedPasswordCredential(forDomain:userName:))

Receives a report from the system that a relying party indicatd that a password credential isn’t needed anymore for a given user name.

### Deprecated methods

[`provideCredentialWithoutUserInteraction(for:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/provideCredentialWithoutUserInteraction(for:)-7jlg0)

Attempts to provide the user-requested credential with no further user interaction.

[`prepareInterfaceToProvideCredential(for:)`](/documentation/AuthenticationServices/ASCredentialProviderViewController/prepareInterfaceToProvideCredential(for:)-18ukb)

Prepares the interface for a user interaction, like a database login, that enables it to access and return the credential for the given identity.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)