Auth · Credentials
Passkeys and security keys — challenges, registration options and sign-in options.
Public-key credentials — passkeys and security keys. These routes issue the options a browser's WebAuthn call needs and resolve a credential back to the account that owns it.
The shape of a flow
Registering a passkey is POST …/pubkey/attest for creation options, then
navigator.credentials.create(), then
POST /api/auth/identity/:id/credential to store what came back.
Signing in is POST …/pubkey/assert for request options, then
navigator.credentials.get(), then POST /api/auth/signin with
method: "credential".
Usernameless sign-in
…/pubkey/assert takes an identifier only when you have one. Omit it and the allow-list stays open,
which is what a bare "sign in with a passkey" button needs — the authenticator picks the credential, and
GET /api/auth/credential/:id/identity turns it into an account.
The relying party id is derived from the request, so a preview deployment works without configuration.