Skip to content
Workforce IdentityMarkdown

Sign-in methods

Passkeys, passwords, authenticator apps, recovery codes and identity confirmation, the methods a realm signs users in with, and what each one holds to.

Available, with limitsDashboard and APIW3C Web Authentication, RFC 6238

A realm signs users in with passkeys, passwords and authenticator apps, and every new realm offers all three. A passkey alone is enough; a password must be followed by a code from an authenticator app. Recovery codes stand in for a lost app, and before a user changes how they sign in, the realm checks they still hold a factor they already have.

Each method is a module: one check in a sign-in. Sign-in chains explains how modules are put in order and what each answer means. You choose which methods a realm may run, and tune each one through its own settings (Sign-in modules).

  • Who can do it: a realm administrator, in a group that holds RealmOwner (Delegated administration). RealmViewer can read the settings.
  • Where: which methods run, and whether a second step is required, in the dashboard under Authentication → Settings or through the API; each method’s settings and the passkey domain, today through the API (Call the API shows how to get $CVYUH_SESSION).
  • First: for passkeys, the realm needs its passkey domain (rpId); a realm created with a host name has it.
MethodWhat the user seesWhat it checks
PasskeyTheir device’s passkey prompt: a fingerprint, a face or a PIN, with nothing to typeA passkey they registered with the realm
PasswordA username and password formThe password against the realm’s own users
Authenticator appA field for a six-digit code, or a set-up page with a QR code the first timeA code from their app, after an earlier step named them
Recovery codeA link on the authenticator app’s page to use a recovery code insteadOne of the one-time codes they were given with their first factor
Add a passkeyTheir device’s prompt to create a passkey, from their accountMakes a new passkey for a user who is already signed in
Confirm identityA prompt for their app’s code or a passkey, before they change how they sign inThat a signed-in user still holds a factor they already have

A method answers in one of three ways: it succeeded, it failed, or it stepped aside because it had nothing to check for this user. A sign-in can take several pages, and each method picks up where it left off on the next page.

A passkey signs a user in on its own, with nothing to type. With no user named yet, the realm asks for the username first. A user with no passkey, or a name the realm doesn’t hold, makes the passkey step stand aside, so the next page reveals nothing about which it was.

Passkeys are bound to one domain, the realm’s relying party ID (rpId in webauthnSettings). A realm created with a host name has that host as its rpId, so passkeys work from the start. A realm created without one has no rpId, and offers no passkeys until you set it: see Set it up.

  • Each passkey answers one challenge, from https://<rpId> or another origin you list in origins.
  • A signature counter that didn’t advance is let through by default (counterPolicy: warn). With counterPolicy: reject it’s refused.
  • A user may hold several passkeys. The ones they hold are sent to the browser, so one authenticator isn’t registered twice.
  • Right after a fresh sign-in, adding a passkey is first tried without a prompt, so the browser can offer one quietly; otherwise the user is shown a button.
  • Repeated failures disable a passkey. A passkey refused maxFailuresBeforeDisable times in a row is disabled, and the user signs in another way. A user whose passkeys are all disabled isn’t offered another until they remove the disabled one.

Adding a passkey runs in its own chain, which a user’s account page starts for a signed-in session, not in the sign-in chain.

Which passkeys work. Any WebAuthn authenticator: passkeys synced by the user’s platform or password manager, which follow them to their other devices, and hardware security keys, which stay on the key. The realm asks for no attestation, so it doesn’t restrict users to particular makers.

Register two. Ask users to add a second passkey on another device, or a security key, so losing one device doesn’t lock them out. A user who loses their only passkey signs in with their password and authenticator app instead, then adds a new passkey; a recovery code for a lost passkey is planned.

The password method checks a username and password against the realm’s own users.

  • Names are matched without regard to case: maya, Maya and MAYA are one user.
  • A wrong password and an unknown name are refused the same way.
  • Inactive and expired accounts are refused after the chain, when the account is inactive or its accountExpiry has passed. A missing or unreadable expiry never locks anyone out.

A weak password is refused when it’s set, by the Password rules you declare.

A code from an authenticator app (RFC 6238) is a second step: it confirms the user an earlier step named, and fails if no one is named yet.

  • Set-up happens during sign-in. A user with no app is given its set-up address (otpauth://) to add. The app is saved only once its first code is right.
  • Each code works once. A code that signed someone in is refused if it’s sent again, even by two sign-ins at the same moment.
  • Skipping. When the realm doesn’t require a second step, a user with no app may skip setting one up. The skip lasts twoFactorSkipDays. A skip isn’t a success: the step stands aside. See Requiring a second step.
  • Guessing disables the app. After maxFailuresBeforeDisable wrong codes in a row, the app is disabled. A user whose apps are all disabled is refused, not offered a new one.
  • An app keeps the settings it was set up with. Changing the algorithm, digits or period affects new apps only.

When a user sets up their first second factor, app or passkey, the realm shows them a set of one-time recovery codes, once. On the authenticator app’s page, a recovery code signs the user in in place of a code, and lets them set up a new app. Each code is spent when used.

Before a chain that changes how a user signs in goes on, this step checks it’s still the same user.

  • Within 10 minutes of signing in, it stands aside: the sign-in is fresh enough.
  • After that, the user answers with their authenticator app or an existing passkey, whichever they hold.

A new realm requires a second step (twoFactorMandatory: true): a user who signs in with a password must also give a code from an authenticator app. What a user with no app yet sees depends on that setting:

twoFactorMandatoryAt the first sign-in with no appWhen they skip
true (a new realm’s default)“This account needs an authenticator app.”, with Set up onlyThey can’t: setting up an app is the only way on
false”Protect your account with an authenticator app.”, with Set up and Skip for nowThey’re signed in without one, and not asked again for twoFactorSkipDays days (30 by default)

When the skip runs out, the user is offered the same choice again at their next sign-in, and may skip again. With twoFactorSkipDays set to 0, one skip lasts for good. To make every user set one up, with no skip, set twoFactorMandatory to true: users who skipped are asked to set up at their next sign-in.

Setting up shows a QR code to scan (“Scan this code with your authenticator app.”), then asks for the first code, then shows the recovery codes once (“Save these recovery codes somewhere safe. They won’t be shown again.”). A user who signs in with a passkey isn’t asked for an app.

A signed-in user sees their passkeys in the dashboard under FIDO Devices, and can remove one there. Through the API, they list their passkeys, authenticator apps and recovery codes with GET https://foobar.cvyuh.com/api/v0/am/devices/v1, and remove a passkey or an app with DELETE https://foobar.cvyuh.com/api/v0/am/devices/v1/<id>. Each removal is recorded, and sent to anyone following the user’s credential changes through Send signals. Recovery codes aren’t removed one at a time.

{ "data": [
{ "id": "<device id>", "kind": "webauthn", "name": "MacBook", "lastUsedAt": "<RFC 3339 time>", "disabled": false, "backupEligible": true, "…": "…" },
{ "id": "<device id>", "kind": "totp", "name": "Authenticator", "lastUsedAt": "<RFC 3339 time>", "disabled": false, "digits": 6, "period": 30, "…": "…" },
{ "id": "<device id>", "kind": "recovery", "remaining": 9, "…": "…" }
] }

disabled is true for a factor that reached its failure cap. backupEligible tells a synced passkey from one held on a single device.

An administrator can’t remove a user’s factors today; only the user can, while signed in.

POST https://foobar.cvyuh.com/api/v0/am/whoami/v1 tells a signed-in user, or a script, who the session belongs to:

{
"id": "<user id>",
"realm": "foobar",
"roles": ["ui-realm-admin", "ui-self-service-user"],
"user": { "uid": "maya", "mail": "maya@example.com", "webAuthnDeviceCount": 1, "…": "the rest of their profile, without the password" },
"session": { "authLevel": 10, "authType": "…", "authInstant": "<RFC 3339 time>", "expiresInSecs": 6840 }
}

roles holds ui-realm-admin when the user can administer the realm. With no session, it answers 401.

New realms start with every method on, and a second step required. Each change is a call to the admin API; Call the API shows how to get a session.

  1. Check the passkey domain. Read webauthnSettings:

    Terminal window
    curl https://foobar.cvyuh.com/api/v0/am/objects/v1/webauthnSettings/webauthnSettings \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

    An empty rpId means the realm has no passkeys. Set it to the host users sign in at, or a parent domain of it that no other realm’s hosts share, and list any other origin that may use it:

    Terminal window
    curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/webauthnSettings/webauthnSettings \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
    -H "Content-Type: application/json" \
    -d '{ "rpId": "foobar.cvyuh.com", "rpName": "Foobar" }'

    Changing rpId orphans every passkey the realm holds: each one is bound to the domain it was made under, and works nowhere else. Choose it once.

  2. Choose the methods the realm may run, and whether a second step is required. authenticators is a list, and the list you send replaces the realm’s, so read authSettings first and send every method you want to keep:

    Terminal window
    curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/authSettings/authSettings \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
    -H "Content-Type: application/json" \
    -d '{ "authenticators": ["…existing methods"], "twoFactorMandatory": true }'

    The method names are in Sign-in modules.

  3. Tune one method on its own settings object; see Sign-in modules.

MethodThe user seesWhen it fails
PasskeyTheir device’s prompt: a fingerprint, a face or a PIN”That passkey did not work. Try again.”
PasswordA username and password formThe sign-in is refused with 401; the same for an unknown name
Authenticator app”Enter verification code:""That code did not work. Try again.”
Recovery codeUse a recovery code, then “Enter one of the recovery codes you saved…”The code is refused; each works once
Confirm identity”Verify it’s you”, with their app or a passkeyThe change they started doesn’t go on

Wrong passwords and codes count toward Lockout.

Setting or limitDefaultRange
twoFactorMandatorytrue in a new realmtrue or false
twoFactorSkipDays: how long a skip lasts300 (for good) or more
Passkey and app tries per sign-in (attemptsPerLogin)3
Wrong answers in a row before a passkey or app is disabled (maxFailuresBeforeDisable)20
Recovery codes given with a first factor (recoveryCodeCount)10
Authenticator app codes6 digits, 30 seconds, SHA-256set on totpModule
Confirm identity stands asidewithin 10 minutes of signing infixed
Passkey ceremony timeout (timeoutSeconds)300

Every setting is listed in Sign-in modules.

SymptomCauseFix
Users aren’t offered passkeysThe realm has no rpIdSet rpId (step 1). Choose it once: changing it orphans every passkey
A passkey works on one site but not anotherThe other origin isn’t under the rpId or listed in origins/relatedOriginsAdd the origin
A user’s codes are always refusedTheir device’s clock is off, or the app ignored SHA-256Have them set the clock to automatic; allowSha1Fallback (on by default) accepts apps that use SHA-1
A user is refused at the code step, every time, even with a recovery codeEvery authenticator app they hold was disabled after repeated wrong codesAn administrator can’t remove the app today; contact support
A user who lost their phone can’t sign inThey have no passkey, and no recovery code leftContact support; ask users to keep their recovery codes and add a passkey

Each method writes a MODULE_COMPLETED record in the sign-in, with the method and the level it gave, then LOGIN or LOGIN_FAILED (Audit → Authentication). A factor added or removed is a change to the user’s devices, in their Change history, and a change to a method’s settings is in Audit → Config.

  • An answer is taken before it’s checked. Two requests answering the same page at once get one check, not two, for passwords, codes and passkeys alike.
  • Wrong answers count toward lockout. See Lockout.
  • Passkey attestation is limited. The realm accepts none and self-attested packed statements only; it doesn’t check an authenticator’s maker against a trust chain.
  • Users can’t rename factors or make new recovery codes yet. They can list and remove them, as above.

Passkeys offered as the user types their name, a recovery code for a lost passkey, and users renaming their factors and making new recovery codes. See What’s next for authentication.