Examples
Sign in with a passkey
Passwordless login for a confirmed account on the cookie facade.
Sign in an existing, confirmed account with WebAuthn. Unconfirmed register and check-email stay on Register a confirmed account.
Facade defaults: passkeys under /account/passkeys. Default completer is IdentityPasskeySignInCompleter. Cookie query flags follow Identity Login, not LoginCookie.
Steps
- Call
GET /identity/csrfTokenand sendRequestVerificationTokenon the POSTs below. POST /account/passkeys/requestOptions(optional queryusername/ email). CSRF required.- Run
navigator.credentials.get(…)with the returned options. If the user cancels, stop. Do not call login. POST /account/passkeys/login?useCookies=truewith body{ "credentialJson" }and CSRF. UseuseSessionCookies=truefor a session cookie, or omit both flags for an Identity bearerAccessTokenResponseinstead of a cookie.- On success with cookie flags, enter the app with
credentials: "include". - Unconfirmed or locked-out accounts:
401Invalid credentials (no session).