- RP: The Relying Party is our backend server, responsible for storing the user's public key in the database.
- Authenticator: The authenticator refers to the passkey, such as TouchID or FaceID on a mobile device.
There are two major steps: Registration (Attestation) and Authentication (Assertion).
- GET generate registration options
- POST verify registration response
- Accept the value returned by
startRegistration()
. - Upon successful verification, store the user's credential in the database.
- Accept the value returned by
- GET generate authentication options
- POST verify authentication response
- Accept the value returned by
startAuthentication()
. - If verified, update the user's authenticator's
counter
in the database.- During testing on MacOS, the counter in the authentication response from the frontend did not increase, so the server did not update the counter. Relevant issue.
- Accept the value returned by
Projects using Cloudflare for the backend: