Contact salesSign inSign up
AuthsignalAuthsignal
Product
Passwordless / multi-factor authentication (MFA)
Drop-in authentication
Passkeys
Biometric authentication
Risk-based authentication
WhatsApp OTP
Authenticator apps (TOTP)
App verification
Push verificationQR code verificationIn-app verification
SMS OTP
Email OTP
Magic links
See all authenticators
See less authenticators
Palm biometrics
Contactless payments & identity verification
Flexible integration modes
Pre-built UI
Low code
UI components
Customizable
Custom UI
Flexible
Digital credentials API Beta
Authenticate customers instantly using digital credentials
Session management
Keep users signed in across web and mobile after authentication
Fraud Controls
Rules and policies engine
Step-up authentication
No-code rule creation
Risk alerts
User observability
Audit trails
Dynamic linking
Why Authsignal?
Complete authentication infrastructure from enrollment to step-up auth, modular by design
Solutions
By USE CASE
View All
Account takeovers (ATO)
Go passwordless
Call center
SMS cost optimization
Existing apps
QR code payments
Step-up MFA
Palm biometrics payments
By INDUSTRY
View All
Financial services
Marketplace
e-Commerce
FinTech
Crypto
Healthcare
By Integration (identity provider)
Amazon Cognito
Azure AD B2C
Duende IdentityServer
Keycloak
Auth0
NextAuth.js
Custom identity provider
By ROLe
Engineers
Product
Passwordless / Multi-factor Authentication (MFA)
Flexible Integration Modes
Pre-built UI · Low code
UI Components · Customizable
Custom UI · Flexible
Digital credentials API Beta
Authenticate customers instantly using digital credentials
Session management
Issue JWT access and refresh tokens
Why Authsignal?
Plug in Authsignal to elevate your IDP — effortless integration with any architecture.
Drop-in Authentication
Passkeys
Biometric authentication
WhatsApp OTP
Risk-based authentication
SMS OTP
Email OTP
Magic links
Authenticator apps (TOTP)
Push notifications
App verification
Push verificationQR code verificationIn-app verification
Palm Biometrics
Contactless payments & identity verification
Fraud Controls
Rules and Policies Engine
Step-up Authentication
No Code Rule Creation
Risk Alerts
User Observability
Audit Trails
Use Cases
Financial services
Account takeovers (ATO)
Marketplace
Go passwordless
e-Commerce
Solutions
By Use Case
Account takeovers (ATO)
Go passwordless
Call center
SMS cost optimization
Existing apps
QR code payments
Step-up MFA
Palm Biometric Payments
View all Use Cases
By Industry
Financial services
Marketplace
e-Commerce
FinTech
Crypto
Healthcare
View all Industries
By Integration (identity provider)
Amazon Cognito
Azure AD B2C
Duende IdentityServer
Keycloak
Auth0
NextAuth.js
Custom identity provider
By Role
Engineers
PricingAboutDocsBlog
Schedule a call
Try Authsignal
AUS Flag

Authsignal secures millions of passkey transactions out of our hosted Sydney region.

AUS Flag

Authsignal secures millions of passkey transactions out of our hosted Sydney region.

Join us today!
Right icon
Blog
/
Current article
Passkeys
autofill
Guides

How to implement conditional UI for passkeys

Ashutosh Bhadauriya
⬤
March 27, 2026
Share
How to implement conditional UI for passkeys

Conditional UI is a WebAuthn feature that lets users sign in with passkeys directly from the browser's autofill menu. Instead of adding a separate "Sign in with passkey" button, passkeys appear alongside saved passwords in the same familiar dropdown.

Let’s break it down to see how conditional UI improves the passkey experience, why it matters and how to implement it in Authsignal.

‍

What is conditional UI?

Conditional UI (aka "passkey autofill" or "conditional mediation") is a WebAuthn feature that displays passkey options directly in your browser's autofill dropdown, right alongside saved passwords. Instead of showing a separate passkey login button that might confuse users who don't have passkeys set up, the browser intelligently surfaces passkey options only when they're available.

Here's what makes this powerful: when a user clicks into a username or password field, they see their passkey appear as an autofill suggestion. If they have a passkey, great, they can use it. If not, they simply continue with their password as usual. No modal dialogs, no error messages, no dead ends.

‍

The problem it solves

Before conditional UI, you either had to:

  1. Show a "Sign in with passkey" button to everyone (confusing for users without passkeys)
  2. Remember who has passkeys and conditionally show the button (complex state management)
  3. Ask users to choose their authentication method upfront (adds friction)

None of these options are great. The first approach leads to error modals when users without passkeys click the button. The second requires extra infrastructure. The third assumes users remember how they set up their account.

Conditional UI sidesteps all of this by integrating passkeys into the existing password flow. Users see both options in the same familiar autofill interface, making the transition from passwords to passkeys feel natural rather than disruptive.

‍

How it works

When you implement Conditional UI, two things happen:

  1. Your input field gets a special autocomplete attribute that tells the browser to include passkeys in its autofill suggestions
  2. Your JavaScript initiates a WebAuthn request with mediation: 'conditional', which waits quietly in the background until the user interacts with the autofill menu

The browser handles the rest. It checks if the user has any passkeys registered for your site, and if so, shows them alongside saved passwords. When the user selects a passkey, the browser triggers the platform authenticator (Face ID, Touch ID, Windows Hello, etc.) for verification.

‍

Implementing conditional UI with Authsignal

Authsignal's web SDK makes this simple. Here's how to set it up.

Step 1: Set up your input field

Add the webauthn token to your input's autocomplete attribute. The webauthn token must come last:

<input
  type="text"
  id="username"
  autocomplete="username webauthn"
/>

You can also add it to a password field:

<input
  type="password"
  id="password"
  autocomplete="current-password webauthn"
/>

Step 2: Initialize passkey autofill

When your page loads, call the signIn method with autofill: true:

authsignal.passkey
  .signIn({
    action: "signInWithPasskeyAutofill",
    autofill: true,
  })
  .then((response) => {
    if (response.data?.token) {
      // User authenticated with a passkey
      // Send the token to your server to validate the challenge
      validateOnServer(response.data.token);
    }
  });

That's the core implementation. When a user focuses on your input field and selects a passkey from the autofill dropdown, the promise resolves with a token you can validate server-side.

Step 3: Server-side validation

Send the returned token to your backend and use Authsignal's server SDK to validate the challenge:

// On your server
const result = await authsignal.validateChallenge({ token });

if (result.state === "CHALLENGE_SUCCEEDED") {
  // Authentication successful, create session
}

‍

Handling the non-passkey flow

One of the beautiful things about Conditional UI is that you don't need to handle the case where a user doesn't have a passkey. The autofill simply won't show passkey options for users who haven't registered one, and they'll continue with their normal password flow.

Your existing login form works exactly as before. You're just adding a parallel path for passkey users without disrupting the experience for everyone else.

‍

Browser support

Conditional UI is supported in:

  • Safari on macOS and iOS
  • Chrome on desktop and Android
  • Edge on desktop

Firefox support is still catching up. For users on unsupported browsers, they simply won't see the passkey autofill option, which means they'll use passwords as usual.

You can check for support programmatically:

if (
  window.PublicKeyCredential &&
  PublicKeyCredential.isConditionalMediationAvailable
) {
  const available = await PublicKeyCredential.isConditionalMediationAvailable();
  if (available) {
    // Safe to initialize passkey autofill
  }
}

‍

Simplifying the transition

Initialize early: Call the autofill initialization as soon as your page loads. This gives the browser time to check for available passkeys before the user interacts with your form.

Keep your form simple: Conditional UI works best with standard username/password forms. Complex multi-step flows might interfere with the autofill behavior.

Prompt for passkey creation after password login: Once a user signs in with a password, consider prompting them to create a passkey for next time. Authsignal supports automatic passkey upgrades that can make this even smoother.

‍

Getting started

Conditional UI lets users discover passkeys without changing your existing login flow. Users see passkey options alongside traditional methods, so they can adopt passwordless authentication at their own pace.

For developers, this means no redesign required. Add a few lines of code, update some HTML attributes, and passkeys are live. For users, it's a gradual transition with no learning curve.

Check out passkey documentation for the complete API reference and additional implementation details.

Question icon
Have a question?
Talk to an expert
NewsletterDemo PasskeysView docs
Passkeys
autofill
Guides

You might also like

Why pension funds are turning to liveness detection for presence verification
Liveness Detection
Identity Verification
Fraud prevention

Why pension funds are turning to liveness detection for presence verification

April 21, 2026
How a global real estate company strengthened MFA with Authsignal
Azure AD B2C
Multi-factor authentication
Passkeys

How a global real estate company strengthened MFA with Authsignal

April 14, 2026
What is Visa VAMP? Thresholds, fees, and how it affects your dispute ratio
Visa VAMP
Chargebacks
Dispute Management

What is Visa VAMP? Thresholds, fees, and how it affects your dispute ratio

April 13, 2026

Secure your customers’ accounts today with Authsignal

Passkey demoCreate free account
Authsignal Purple Logo

Authsignal delivers passwordless and multi-factor authentication as a service. Focused on powering mid-market and enterprise businesses to rapidly deploy optimized good customer flows that enable a flexible and risk-based approach to authentication.

AICPA SOCFido Certified
LinkedInTwitter
Passwordless / multi-factor authentication (MFA)
Pre-built UI (low code)UI components (customizable)Custom UI (flexible)
Why Authsignal?
Drop-in authentication
Risk-based authentication PasskeysBiometric authenticationWhatsApp OTPSMS OTPEmail OTPMagic linksAuthenticator apps (TOTP)Push authenticationPalm biometricsDigital Credential Verification API
Rules and policies engine
User observability
Industries
Financial services
Marketplace
e-Commerce
FinTech
Crypto
View all industries
Teams
Engineers
Use cases
Account takeovers (ATO)
Go passwordless
Call center
SMS cost optimization
Existing apps
View all use cases
Identity providers (IDPs)
Amazon Cognito
Auth0
Azure AD B2C
Custom identity provider
Duende IdentityServer
Keycloak
NextAuth.js
Integrations
ASP.NET
C#
Java
Node.js
Open ID Connect (OIDC)
PHP
Python
React
Ruby
Ruby on Rails
Compare
Twilio Verify vs AuthsignalAuth0 vs AuthsignalAWS Cognito vs Authsignal + AWS Cognito
Resources
BlogDeveloper docsFree Figma mobile passkeys templateFree Figma desktop passkeys templateFree Figma webapp passkeys template
Company
About usWhy AuthsignalCareersPress releasesPartnersContact us
What is
SMS OTP
Risk Based Authentication
IP Spoofing
Passwordless authentication
Multi-Factor Authentication (MFA)
United States
+1 214 974-4877
Ireland
+353 12 676529
Australia
+61 387 715 810
New Zealand
+64 275 491 983
© 2026 Authsignal - All Rights Reserved
Terms of servicePrivacy policySecuritySystem statusCookies