Begin passkey login
POST
/auth/webauthn/authentication/options
const url = 'https://example.com/api/v1/auth/webauthn/authentication/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/authentication/optionsStart a passwordless, discoverable passkey login. Public (pre-login) but only available under
AUTH=on. Stores a single-use challenge and returns WebAuthn assertion options for
navigator.credentials.get().
Responses
Section titled “Responses”Assertion options
Media typeapplication/json
WebAuthn assertion options (PublicKeyCredentialRequestOptionsJSON) for discoverable/passwordless login, passed verbatim to navigator.credentials.get().
object
options
required
PublicKeyCredentialRequestOptionsJSON (challenge, rpId, …).
object
key
additional properties
any
Examplegenerated
{ "options": {}}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"}