prepareCredentialList(for:requestParameters:)
Prepares the interface to display a list of passkey and password credentials from which the user can select.
Declaration
func prepareCredentialList(for serviceIdentifiers: [ASCredentialServiceIdentifier], requestParameters: ASPasskeyCredentialRequestParameters)Parameters
- serviceIdentifiers:
An array of service identifiers that provide a hint about the service for which the user needs credentials.
- requestParameters:
Information about the passkey request.
Discussion
The system calls this method to tell your extension’s view controller to prepare to present a list of credentials, when there’s an active passkey request in the app or website. After calling this method, the system presents the view controller to the user.
Use the given serviceIdentifiers array to filter or prioritize the credentials to display. The service identifier array might be empty, but your extension should still show credentials from which the user can pick.
Items in the array with lower indices represent more specific identifiers for which a credential’s requested. For example, if the array contains identifiers [m.example.com, example.com], the item m.example.com represents the more specific service that requires a credential.
If the person selects a passkey credential, use the requestParameters object to complete the request using the selected credential.
See Also
Selecting a credential
prepareCredentialList(for:)prepareOneTimeCodeCredentialList(for:)prepareInterface(forPasskeyRegistration:)prepareInterfaceToProvideCredential(for:)provideCredentialWithoutUserInteraction(for:)performWithoutUserInteractionIfPossible(passkeyRegistration:)ASCredentialServiceIdentifierASCredentialRequestASPasswordCredentialRequestASOneTimeCodeCredentialRequestASAuthorizationPublicKeyCredentialRegistrationRequestASPasskeyCredentialRequestASPasskeyCredentialRequestParameters