Everything, Everywhere
Verified Specification | Standardized Formulas | Instant Precision
Secure & Private (Zero Data Retention) Free Access • No Sign-Up

WebAuthn Conditional UI & Autofill Passkeys Studio

Architect seamless passwordless authentication with W3C WebAuthn Level 3 Conditional Mediation. Simulate autocomplete="username webauthn" input injection, test native browser passkey dropdowns, and inspect authenticatorData user-verification flags.

WebAuthn L3 mediation: "conditional" Zero-Click Autofill FIDO2 Passkeys
Platform authenticator backing resident passkeys
Relying party authentication policy
Storage of user handle inside device authenticator
Enrolled passkey account identity
Interactive Client Login Viewport MEDIATION: ACTIVE
or autofill via Passkey
• PublicKeyCredential.isConditionalMediationAvailable(): true
• Background promise: navigator.credentials.get({ mediation: 'conditional' }) listening.
Authenticator Assertion & Flags
Algorithm: ES256 (P-256 ECDSA)
UP (User Present)
1 (TRUE)
UV (User Verified)
1 (BIOMETRIC)
BE / BS (Synced)
1 (MULTI-DEV)
// 1. clientDataJSON (Parsed)
type: "webauthn.get",
challenge: "d4b8f9c1a0e2...",
origin: "https://digitaltoolsshed.com"
// 2. authenticatorData
rpIdHash: SHA256("digitaltoolsshed.com"),
flags: 0x05 (UP=1, UV=1, BE=1),
signCount: 148
Production Conditional UI TypeScript Implementation W3C WebAuthn L3 / TypeScript

Conditional Mediation Execution Flow

Conditional UI harmonizes password and passkey authentication into a non-disruptive pipeline:

  • Page Load Initiation: The client initiates navigator.credentials.get({ mediation: 'conditional' }) immediately after receiving the challenge from the backend. The browser enters passive observation mode.
  • HTML Form Integration: The login input field declares autocomplete="username webauthn". The browser detects this attribute and populates available passkeys alongside saved passwords.
  • Zero Modal Popups: No biometric prompt or modal window appears until the user deliberately taps their passkey in the autofill menu.
  • AbortController Management: If the user manually submits a password instead, the application invokes abortController.abort() to terminate the background conditional request cleanly.

Multi-Device Sync vs Hardware Security Keys

FIDO2 distinguishes between synced passkeys and hardware-bound security keys:

  • Multi-Device Credentials (Passkeys): Private keys are synchronized end-to-end encrypted across user devices via Apple iCloud Keychain, Google Password Manager, or 1Password. The BE (Backup Eligible) and BS (Backup State) bits in authenticatorData indicate multi-device synchronization.
  • Single-Device Credentials (YubiKey): Keys are bound to hardware secure enclaves and cannot be exported. Optimal for enterprise zero-trust workstations and administrative consoles.
  • FIDO Cross-Device Authentication (caBLE): Allows users on an untrusted desktop to scan a QR code with their mobile phone, establishing an encrypted Bluetooth Low Energy proximity session to authenticate.

Frequently Asked Technical Questions

What is WebAuthn Conditional UI (Passkey Autofill) and how does it improve authentication UX?+
Prior to WebAuthn Level 3 Conditional UI, using a passkey required the user to explicitly click a dedicated button (like "Sign in with Passkey"), which immediately triggered a modal OS biometric prompt. This was jarring for users who still preferred passwords or did not understand what a passkey was. Conditional UI integrates passkeys directly into standard HTML form autofill. When the page loads, the web application calls navigator.credentials.get({ mediation: "conditional", ... }) in the background. When the user focuses the email or username input field, the browser natively displays their saved passkeys directly inside the familiar autofill dropdown menu alongside saved passwords.
What HTML attribute is required to activate Conditional UI on form inputs?+
To connect an input field to the pending conditional WebAuthn request, the input tag must include "webauthn" in its autocomplete attribute: . When the browser detects this token and an active conditional credentials request exists, it automatically binds the user selection event to the WebAuthn promise resolution.
What is the purpose of PublicKeyCredential.isConditionalMediationAvailable()?+
Before invoking navigator.credentials.get({ mediation: "conditional" }), web applications must check feature availability using const isAvailable = await window.PublicKeyCredential?.isConditionalMediationAvailable?.(). Older browsers that support standard WebAuthn may not support conditional mediation. If the method returns false or is undefined, the application should fall back to rendering a traditional "Sign in with Passkey" button.
How does the server verify a WebAuthn assertion returned via Conditional UI?+
The server verifies the assertion response through four critical checks: (1) clientDataJSON validation: confirms type is "webauthn.get", matches the expected origin (e.g. "https://digitaltoolsshed.com"), and validates the unguessable cryptographic challenge; (2) RP ID check: verifies the SHA-256 hash of the Relying Party identifier in authenticatorData; (3) User Verification (UV) flag: checks that the UV bit is set to 1, confirming biometric or PIN verification succeeded; and (4) Signature verification: validates the cryptographic signature over (authenticatorData || SHA256(clientDataJSON)) using the public key registered for that credential ID.
Sponsored Utility
While You're Here
Sponsored Recommendations
Advertisement