Begin passkey registration
POST
/auth/webauthn/registration/options
const url = 'https://example.com/api/v1/auth/webauthn/registration/options';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/auth/webauthn/registration/optionsStart 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().
Responses
Section titled “Responses”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"}