The ASCredentialProviderViewController method is not executing.

Hello, when I attempted to use the passkey, the method - (void)prepareCredentialListForServiceIdentifiers:(NSArray<ASCredentialServiceIdentifier *> *)serviceIdentifiers requestParameters:(ASPasskeyCredentialRequestParameters *)requestParameters API_AVAILABLE(ios(17.0), macos(14.0)) API_UNAVAILABLE(watchos, tvos); didn't execute. Are there any specific prerequisites for this method to run? I would appreciate your assistance. Thank you.

Accepted Reply

The click event of this button.

  • Tapping that button should invoke -provideCredentialWithoutUserInteractionForRequest:. If you'd like for -prepareCredentialListForServiceIdentifiers:requestParameters: to be called, then your implementation of -provideCredentialWithoutUserInteractionForRequest: should call -cancelRequestWithError: and pass ASExtensionErrorCodeUserInteractionRequired. This will give you the chance to show your own UI. There are more details in the header for ASCredentialProviderViewController.

  • Thanks for your reply。

    "This button is not for logging in with a username; please note that I haven't entered a username, and it might be associated automatically. I have implemented the code as follows, and clicking the button doesn't have any response."

    "When I've registered, refreshing the webpage automatically triggers its appearance."

    I have implemented this method, but when I click, it is ineffective.

  • I found the problem with my storage credentials. Thank you for your help.

Add a Comment

Replies

Have you updated your Info.plist to add the ProvidesPasskeys key?

  • What I'd like to ask is, for example, when I've registered a passkey on webauthn.io, a window automatically pops up when I refresh the webauthn page, saying "Log in to webauthn.io with a passkey from the App," with a username button below. I'd like to know which method is triggered when you click on it.

Add a Comment

I add this "<dict> <key>ShowsConfigurationUI</key> <true/> <key>ProvidesPasskeys</key> <true/> </dict>"

The click event of this button.

  • Tapping that button should invoke -provideCredentialWithoutUserInteractionForRequest:. If you'd like for -prepareCredentialListForServiceIdentifiers:requestParameters: to be called, then your implementation of -provideCredentialWithoutUserInteractionForRequest: should call -cancelRequestWithError: and pass ASExtensionErrorCodeUserInteractionRequired. This will give you the chance to show your own UI. There are more details in the header for ASCredentialProviderViewController.

  • Thanks for your reply。

    "This button is not for logging in with a username; please note that I haven't entered a username, and it might be associated automatically. I have implemented the code as follows, and clicking the button doesn't have any response."

    "When I've registered, refreshing the webpage automatically triggers its appearance."

    I have implemented this method, but when I click, it is ineffective.

  • I found the problem with my storage credentials. Thank you for your help.

Add a Comment