Product Documentation

User registration is handled by two functions from the AccountManager class:

  • signUpWithPasskey()
  • signUpWithSecurityKey()

To register, initialize a PublickeyCredentialProvider to make requests to the Passkeys API for key generation and signing:


NOTE: Here the data.response.rp.id is from the parsed PreRegResponseModel, as specified in the ResponseModel.swift file.

 

Getting the Challenge

Get the challenge from the FidoService by starting a preRegister request and getting a PreRegResponseModel back as data.


The challenge is decoded from a Base64Url to a data stream for the ASAuthorization API to process.

 

Request Preferences and Registration Request

After obtaining the challenge, create a credential registration request. This request can be signed by either Passkey or the security key, based on user input when using the app. StrongKey uses the attributes platformKeyCredentialProvider and securityKeyCredentialProvider created earlier to make these request objects.


Optionally, set preferences for request objects: attestation, user verification, credential parameters, allowed credentials, etc.

For platform keys (Passkeys) the attestationPreference is set to none because the Passkeys API doesn't support attestation as of iOS 15 Beta 8.


 

Signing the Challenge with Passkeys/Security Key

After creating a request and setting preferences, make requests now using ASAuthorizationController and get our AuthorizationResponse.

Since AccountManager conforms to ASAuthorizationControllerDelegate and the delegate is set to self, the AuthorizationResponse returns.