Passkey registration failing while implementing a third party passkeys manager

We are implementing a 3rd party Passkeys Manager app for ios. In the ios app in the CredentialProviderViewController I've implemented:

func prepareCredentialList(
    for serviceIdentifiers: [ASCredentialServiceIdentifier]
)
func provideCredentialWithoutUserInteraction(
    for credentialRequest: ASCredentialRequest
)
func prepareInterfaceToProvideCredential(
    for credentialRequest: ASCredentialRequest
)
func prepareInterface(
    forPasskeyRegistration registrationRequest: ASCredentialRequest
)

When testing on webpages like webauthn.io and webauthn.me , our app shows up as one of the options for creating a passkey.

We are getting the calls in prepareInterface() and handling it as advised here https://developer.apple.com/documentation/authenticationservices/ascredentialproviderviewcontroller/4172626-prepareinterface/

However the registration is failing. I understand that in this function, we need to create a passkey using a crypto library and then call completeRegistrationRequest(using:completionHandler:)

The documentation on this is scant so it is hard to debug for this reason.

  1. Need help fixing this issue. What could we be missing?
  2. Is there any sample code for overriding these functions?
  3. Any recommendations on the crypto library for generating passkeys
  4. When the passkeys have been generated, how do we pass it back to the system?

Thank you, Jaydip.

Replies

Dear community,

Looking forward to a reply to this question as we are also facing similar issues and the documentation is indeed sparse.

Any guidance would be greatly appreciated.