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.

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.

Implementing a passkey manager requires a decent cryptography background and a deep understanding of the WebAuthn and CTAP2 specs. A functional passkey manager requires building a full implementation of most of WebAuthn and generally a significant portion of CTAP2, as well as server support for a secure syncing backend.

Without seeing the error message it's difficult to give specific advice about what may be wrong. If your app is being shown as an option in the credential picker, you've likely set up the template correctly and added the right Info.plist keys, but a rejected response could mean an issue anywhere in the above implementations.

Passkey registration failing while implementing a third party passkeys manager
 
 
Q