Skip to main content

POST /v1/auth/passkey/login/begin

Start a WebAuthn authentication ceremony. Returns PublicKeyCredentialRequestOptions that the browser hands to navigator.credentials.get().

::: tip Auth Required: none. :::

Request

POST /v1/auth/passkey/login/begin

HeaderRequiredNotes
Content-Type: application/jsonyes

Body

{ "email": "alice@example.com" }
FieldTypeRequiredNotes
emailstringyes (v0.1)The user attempting to sign in. v0.1 requires email; discoverable (resident-key) login lands in a later release.

Response

200 OK

A WebAuthn PublicKeyCredentialRequestOptions JSON object:

{
"publicKey": {
"rpId": "app.example.com",
"challenge": "...",
"timeout": 60000,
"userVerification": "preferred",
"allowCredentials": [
{ "type": "public-key", "id": "..." }
]
}
}

Error responses

StatusCodeWhen
400invalid_inputEmail missing.
401authentication_requiredNo such user, OR the user has no enrolled passkeys. (Same response shape — avoids enumeration.)
500internal_errorWebAuthn build failure.

Notes

  • Challenge state is persisted in passkey_challenges with a 5-minute TTL.
  • The response intentionally hides whether the account exists. Failed ceremonies for non-existent accounts and accounts-with-no-passkeys both return authentication_required.