Docs

Passkeys

Sign users in with a passkey (WebAuthn / FIDO2): Face ID, Touch ID, Windows Hello, Android or a security key, with no password. Project setup, registering a passkey, signing in, managing passkeys and how it is protected.

Updated Oct 20, 2026

A passkey is a key pair created and kept by the user’s device or password manager. Signing in proves the user has that device, and, when the device asks for their fingerprint, face or PIN, that it is really them. Passkeys can’t be phished: the browser only uses them on your own domain.

Users add a passkey after signing in another way (password, magic link or a provider), then use it to sign in from then on.

#Set up passkeys for your project

Open Users › Passkeys and fill in all three fields, then turn on Enable passkeys. Until all three are set, passkey requests answer 403 “Passkeys are turned off for this project”.

SettingWhat to enter
Relying party IDYour app’s domain, for example example.com. Passkeys work on that domain and its subdomains (app.example.com), and can’t move to another domain later, so use the domain you will keep.
Display nameThe name the browser shows when someone creates a passkey, for example Skolist.
Allowed originsEvery address your sign-in page runs on, with scheme and port: https://app.example.com, and http://localhost:5173 while developing.

#Add a passkey

For a signed-in user, register asks Sovaria for options, lets the device create the passkey (Touch ID, Windows Hello, Android, a security key) and saves it. The name helps the user recognise it later.

if (sovaria.auth.passkeys.isSupported()) {
  await sovaria.auth.passkeys.register('MacBook')
}

#Sign in with a passkey

Signing in needs no email: the device offers the passkeys it has for your domain. The SDK signs the user in like any other sign-in, keeping the refresh token and firing SIGNED_IN.

const tokens = await sovaria.auth.passkeys.signIn()
tokens.aal   // 'aal2' when the device checked the user's fingerprint, face or PIN

To offer only one user’s passkeys (for example after they typed their email), pass their user id: signIn({ userId }) in JavaScript, startSignIn(userId: …) elsewhere. A user with no passkeys gets 404.

#Passkeys and two-factor authentication

  • When the device checked the user’s fingerprint, face or PIN, the session is two-factor (aal: "aal2"), like a password plus an authenticator code. It passes Require MFA and rules that ask for aal2 (Multi-factor authentication).
  • When the device didn’t (some security keys without a PIN), the session is aal1, and a user with MFA turned on still has to enter their code.

#List and remove passkeys

ActionRequest
List the signed-in user’s passkeys (name, created, last used)GET /api/v1/auth/passkeys
Remove oneDELETE /api/v1/auth/passkeys/{id}
const passkeys = await sovaria.auth.passkeys.list()   // [{ id, name, created_at, last_used_at }]
await sovaria.auth.passkeys.remove(passkeys[0].id)

Only the owner can list or remove their passkeys. Show the list on your account page so people can remove a passkey from a lost device.

#How it is protected

  • Each challenge is valid for 5 minutes and works once.
  • The browser only uses a passkey on the relying party ID’s domain, and Sovaria checks the origin against your allowed origins, so a look-alike site can’t use it.
  • The authenticator’s signature counter is checked; a counter that goes backwards (a cloned key) is refused.
  • A passkey can only sign in a user of the same project.

#Adding and removing passkeys safely

  • Registering or removing a passkey needs a recent sign-in (the last 10 minutes), an aal2 session, or a one-time code from sovaria.auth.reauthenticate() passed as nonce. With MFA on, only an aal2 session will do. Otherwise the answer is 401 REAUTHENTICATION_REQUIRED.
  • Passkey sign-in is public (no session needed) and rate-limited like every sign-in; offering a userId never reveals whether that user has passkeys.
  • Password managers show the account’s email (not an id). Adding or removing a passkey is recorded and emailed to the user.