v157 · webauthn · practical

Paywall unlock

The explainer’s first motivating example: a reader lands on a paywalled article from a social link, has an account but no session, and is offered a sign-in suggestion the moment the page loads — no form, no modal, no click required to offer it. Readers without credentials see nothing different.

not signed in

Why browsers keep shipping new sign-in modes

You followed a link here from a social feed. You have an account with this publication, but no signed-in session on this device — so you get the free preview and a paywall.

Explicit sign-in links are easy to miss and annoying to complete; many readers bounce instead. Conditional UI passive mode lets the page offer a one-tap sign-in without a form and without a modal.

The rest of this article is for subscribers.

Checking whether your browser can offer a quick, ignorable sign-in…

behind the scenes

On load, with no click (passive mode does not need user activation, unlike Immediate UI mode), the page fires one passive request — but only if getClientCapabilities() reports it. No credentials means no UI and a promise that never settles, so readers without an account never see anything.

idle

the fallback stays

The “Sign in on the account page” link is never removed: passive mode is an enhancement for readers who already have a credential, not a replacement for your sign-in flow. When passive mode is unavailable, the page behaves exactly as it did before.

// on load — no user activation needed
const caps = await PublicKeyCredential.getClientCapabilities();
if (caps.conditionalPassiveGet) {
  const cred = await navigator.credentials.get({
    mediation: 'conditional', uiMode: 'passive',
    publicKey: await fetchOptions(), password: true, signal,
  });
  await unlockWith(await verifyOnServer(cred)); // resolves only if the reader picks an account
}

references