After the passkey is successfully created, is there an API to get the public key of the passkey?

The attestationObject contains the user's new public key to store and use for subsequent sign-ins.

According to the description, in the passkey authorization success callback, the attestationObject contains the public key, can the client decode the attestationObject and obtain the public key? If possible, can you help provide the relevant API?

public func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) {
   switch authorization.credential {
        case let credentialRegistration as ASAuthorizationPlatformPublicKeyCredentialRegistration:
    // The attestationObject contains the user's new public key to store and use for subsequent sign-ins.
    credentialRegistration.attestationObject


   default: break
   }
}

Yes, you need to decode the attestationObject in order to validate the registration and save the public key to be used for future sign ins. This information generally isn't useful on the device side, so we don't currently have an API to decode it. Instead, we expect folks will send the object as-is to their server, where any WebAuthn library will be able to decode and validate it.

If you have a use case where it makes sense to decode on the device side, please let us know through Feedback Assistant!

After the passkey is successfully created, is there an API to get the public key of the passkey?
 
 
Q