- Step 1: Retrieve a registration request
- Step 2: Pass the registration request to the Hanko FIDO UAF Client
- Step 3: Send the public key to the Hanko API
Sequence diagram for the UAF registration flow with the Hanko FIDO UAF Client for Android
Step 1: Retrieve a registration request
The first step consists of initiating the registration of an authenticator device by issuing aPOST request to the UAF
endpoint ({API_URL}/v1/uaf/requests) of the Hanko API. The POST request body must include the appropriate
operation type (i.e. REG for registration), a userId and a username. The userId will be used to map a public key
credential generated during registration to a specific user account with the relying party.
As mentioned in the prerequisites, you need an HTTP client
to make a request to your backend. In your backend you can use one of the server-side Hanko SDKs to initiate
the registration with the Hanko API. This request targets a secured endpoint of the API, so you will need an API Key ID
and an API Key (see the prerequisites).
PENDING status. It
contains the registration request issued by the FIDO server which must be passed to the Hanko FIDO UAF Client in order
to trigger credential creation and prompting the user for an authentication gesture.
id will be required to finalize the registration
in Step 3.
Step 2: Pass the registration request to the Hanko FIDO UAF Client
- Android
- iOS
Extract the Use Android’s Intent mechanism to pass it to the Hanko FIDO UAF Client (After the user accepted or denied the request by performing an authentication gesture, you can process the result
using the Extract the response (1) from the
request value from the Hanko request you retrieved in the previous step.Create a stringified representation of a JSON object with the following structure:<fido-uaf-request>). This will trigger a
prompt for an authentication gesture. To retrieve the activity result, use the startActivityForResult
API.onActivityResult
API.Intent data. The extracted value will be used in the
next step to verify the authenticator response.Step 3: Send the public key to the Hanko API
To finalize the registration by verifying the authenticator response, use an HTTP client in your app to forward the authenticator response along with therequestId of the initialization request (see Step 1) to your backend. Then,
use a Hanko server-side SDK to pass the authenticator response to the Hanko API. This request targets a secured endpoint
so you will need an API Key ID and an API Key. Reuse a previously instantiated client instance or create one as
described in Step 1.
Backend SDK examples for this step will be added once official server SDKs are available again.