Skip to content

Begin passkey registration

POST
/auth/webauthn/registration/options
curl --request POST \
--url https://example.com/api/v1/auth/webauthn/registration/options

Start registering a passkey for the authenticated local user. Requires AUTH=on and a real local user (rejects the API-key pseudo-user and OIDC users). Stores a single-use challenge and returns WebAuthn creation options for navigator.credentials.create().

Credential creation options

Media typeapplication/json

WebAuthn credential creation options (PublicKeyCredentialCreationOptionsJSON), passed verbatim to the browser’s navigator.credentials.create(). The inner shape is owned by @simplewebauthn and treated as opaque here.

object
options
required

PublicKeyCredentialCreationOptionsJSON (challenge, rp, user, pubKeyCredParams, …).

object
key
additional properties
any
Examplegenerated
{
"options": {}
}

Not an authenticated local user

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}

Passkeys require AUTH=on

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}

WebAuthn RP resolution failed

Media typeapplication/json
object
error
required

Error message

string
Examplegenerated
{
"error": "example"
}