Implementation
Choosing userVerification: required vs. preferred and the UV flag
6 min read
Key points
- userVerification is how a relying party asks the authenticator to verify the user locally with a biometric, PIN or pattern.
- preferred does not fail when verification is skipped, so your server has to read the UV flag and act on it.
- A practical default is preferred plus a UV flag check; use required when every user is guaranteed a verification-capable authenticator.
userVerification tells the authenticator, during passkey registration and sign-in, whether you want it to verify the user with a biometric or PIN. With required, the ceremony fails if the user is not verified. With preferred, it succeeds either way. If you are unsure, default to preferred and always check the UV (user verified) flag on the server, then treat unverified sign-ins differently. Switch to required when every user can verify locally, or when a single sign-in must satisfy two factors on its own.
What userVerification controls
WebAuthn distinguishes two kinds of checks during an authenticator operation:
- User presence (UP): someone interacted with the authenticator, for example by touching it or pressing a button.
- User verification (UV): the authenticator confirmed that this is the person who registered, using a fingerprint, face, PIN or pattern.
Passkeys are described as multi-factor in one step because they combine possession of the private key with this UV check. WebAuthn Level 3 describes passkey authenticators as supporting user verification as a second authentication factor, in addition to proof of possession of the private key.
The biometric itself never reaches your service. As the FIDO Alliance puts it, biometric matching stays on the device, and the server only sees an assurance that the check succeeded. That assurance arrives as the UV flag inside the authenticator data, which is covered by the signature.
The three values
Here is what WebAuthn Level 3 defines. The default is preferred both at registration (authenticatorSelection.userVerification) and at sign-in (PublicKeyCredentialRequestOptions.userVerification).
| Value | Spec definition (summarized) | If the user cannot be verified |
|---|---|---|
required |
The RP requires user verification and fails the ceremony if the UV flag is not set | The browser returns an error |
preferred |
The RP wants verification if possible but will not fail if the UV flag is not set | The response comes back as usual |
discouraged |
The RP does not want verification, to minimize disruption to the flow | — |
The key point: preferred does not mean the user was verified. Google's web.dev guide on creating passkeys warns that with preferred, an authenticator may skip verification when the biometric sensor is missing, not enrolled or unavailable, and that the UV flag tells you whether verification actually happened.
What to check on the server
The spec's assertion verification steps check the UV flag only when you asked for required. Otherwise the RP is told to ignore it. In other words, with preferred, an unverified sign-in passes unless you do something about it. What you do with that fact is your call.
A typical approach:
- After the assertion verifies, read the UV result (often exposed as
userVerifiedoruser_verified). - If UV is set, treat the sign-in as multi-factor with a single passkey.
- If UV is not set, treat it as a single factor (possession). Ask for a password or another factor, or require reauthentication before sensitive actions.
NIST SP 800-63B-4, Appendix B, says the same for syncable authenticators (synced passkeys): verifiers should indicate that UV is preferred, inspect the UV flag in responses, and treat the authenticator as single-factor when the user was not verified. The document is written for US federal agencies, but the logic applies anywhere.
Picking required or preferred
When preferred is the better default
Consumer sites, ecommerce and membership sites see every kind of device, including desktops without biometric sensors and security keys with no PIN set. With required, those users hit an error at registration or sign-in and cannot use passkeys at all.
With preferred, authenticators that can verify will do so, and the rest can still sign in. If you then check the UV flag and ask for another factor when it is missing, you stay on the safe side without shutting anyone out.
When required makes sense
- A passkey alone has to satisfy MFA. Internal tools or admin consoles where policy requires multi-factor authentication on every sign-in. No path accepts an unverified response.
- You control the authenticators. Company-issued laptops or security keys where you can enforce a biometric or PIN.
- There is no password fallback. If you have removed passwords and have no other factor to fall back to, an unverified passkey sign-in is a single factor. Narrowing the entry point with
requiredis simpler.
With required, the browser returns an error when the authenticator cannot verify the user. Tell those users what to do next, for example: "Set up a screen lock (biometric or PIN) on this device to use a passkey."
Skip discouraged
The spec defines discouraged as not wanting verification, in the interest of a smoother flow. If passkeys replace passwords for sign-in, skipping verification leaves you with possession only, so there is rarely a reason to choose it.
Should registration and sign-in match?
You can set userVerification separately for registration and sign-in. Mixing them, such as verifying at registration but not at sign-in, is hard to explain and complicates your policy. Unless you have a specific reason, keep them the same.
Using required only for reauthentication before sensitive actions (payments, email changes, adding a passkey) is a reasonable split. If you also record the UV result of the regular sign-in, you can decide whether the user was recently verified.
Implementing this with SealGate
In SealGate, userVerification is the per-app (per-environment) setting user_verification. It accepts required or preferred, defaults to preferred, and applies to both registration and sign-in. Change it with PATCH /v1/apps/{app_id} using an API key, or in the environment settings in the dashboard.
curl -X PATCH https://api.sealgate.jp/v1/apps/app_... \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"user_verification":"required"}'With required, registrations and sign-ins where the user was not verified with a biometric or PIN fail with verification_failed. With preferred, read user_verified in the response from POST /v1/login/verify and decide on your server how to handle unverified sign-ins. See App settings in the docs.
FAQ
With iPhone or Android passkeys, will preferred always verify the user?
The spec does not guarantee it. Do not decide by device type; check the UV flag on every response.
Can the UV flag be tampered with?
The UV flag is part of the authenticator data, which the authenticator signs with the private key. If your server verifies the signature, a modified response fails verification.
Can I switch from preferred to required later?
Existing passkeys keep working, but users whose authenticators cannot verify will no longer be able to sign in. Before switching, check your records of UV results for users who sign in without verification.
Sources
- Web Authentication: An API for accessing Public Key Credentials Level 3 (W3C Recommendation, August 25, 2026)
- Create a passkey for passwordless logins (web.dev, Google)
- NIST SP 800-63B-4 Digital Identity Guidelines: Authentication and Authenticator Management (NIST, July 2025)
- Passkeys (FIDO Alliance)
Related posts
Passkey basics · Implementation
The WebAuthn registration flow: what to check in challenge, options, and verify
A walkthrough of passkey registration (the WebAuthn registration ceremony), covering the options your server builds, navigator.credentials.create(), server-side verification, and what to store, following W3C WebAuthn Level 3.
Account security · Guidelines
What is phishing-resistant MFA? Definition, and why OTPs don't qualify
What phishing-resistant MFA means according to NIST SP 800-63B-4 and CISA, why SMS and one-time codes don't qualify, why passkeys do, how Japan's securities industry guideline treats it, and the gaps that remain.
Implementation · SealGate
Passkey sign-in with Next.js (App Router): Route Handlers and autofill
Add passkeys to an existing Next.js App Router login: relay options and verify in a Route Handler, issue your own session, and support autofill and a button.