Docs menuFeatures

DOCS / FEATURES

Passkeys

People sign in with their fingerprint, face or screen lock instead of a password. They add a passkey in account settings, then sign in from the login page without typing an email. It's WebAuthn, through webauthn-rs.

How it works

The device (or a password manager such as iCloud Keychain or Google Password Manager) makes a key pair for this site. The private key never leaves it. The API keeps the public key and, at each sign-in, checks a signature over a fresh challenge. There is no secret on the server to steal, and a passkey only works on the site it was made for, so it can't be phished.

Each ceremony is two requests. start sends the browser a challenge and parks the matching state in passkey_ceremonies. finish takes that state back, once, and checks the browser's answer. A challenge lasts five minutes, and the maintenance job purges abandoned ones.

Method Path Auth
POST /api/auth/passkey/start —
POST /api/auth/passkey/finish the browser's answer
GET /api/users/me/passkeys user
POST /api/users/me/passkeys/start user, not impersonating
POST /api/users/me/passkeys user, not impersonating
PATCH, DELETE /api/users/me/passkeys/{id} user, not impersonating

[ full guide ]

The rest of this guide comes with the repo.

  • Rules
  • In the SPA
  • Configuration
  • Tests
Get LaunchCrate