Skip to navigation

Passkey Sign-In

Complete a passkey (WebAuthn) sign-in with the assertion returned by navigator.credentials.get().

Authentication: Public initiation endpoint — no Bearer token required. Browser-only; the Origin header must match the one used for POST /session/passkey_options.

Request body:

  • challenge_token (required) — The token returned by POST /session/passkey_options. Consumed on use
  • credential (required) — The PublicKeyCredential serialized as JSON: id, rawId, type, and response with clientDataJSON, authenticatorData, signature, userHandle
  • user_ip (optional) — Client IP for analytics

Response: Standard login payload — token (30-day JWT), location, user. A passkey satisfies two-factor authentication on its own, so there is no otp_required step.

Side effects:

  • Updates the passkey’s sign count and last_used_at
  • Triggers a UserLogin event

Errors:

  • 401 — “This sign-in attempt expired. Please try again.” (challenge token missing, already used, or expired)
  • 401 — “We don’t recognize this passkey.” (credential is not registered to a member of this app)
  • 401 — “Passkey sign-in failed. Please try again.” (assertion verification failed)

Request

This endpoint expects an object.
challenge_tokenstringOptional
credentialobjectOptional
user_ipstringOptional

Response

OK