![Eiji Kitamura](https://web.dev/images/authors/agektmr.jpg) Eiji Kitamura [X](https://twitter.com/agektmr) [GitHub](https://github.com/agektmr) [Mastodon](https://infosec.exchange/@agektmr) [Bluesky](https://bsky.app/profile/agektmr.com) ![José Luis Zapata](https://web.dev/images/authors/zapata.jpg) José Luis Zapata [GitHub](https://github.com/zapata131) [LinkedIn](https://www.linkedin.com/in/zapata131) [Bluesky](https://bsky.app/profile/zapata131.bsky.social) [Homepage](https://www.zapata131.com)

<br />


Published: May 12, 2026

<br />

Immediate UI mode for logins is a web capability designed to streamline sign-in
flows. This feature lets you proactively offer passkeys and managed passwords
directly to your users when they reach a sign-in moment, such as clicking a
**Sign In** or **Checkout** button.

## Abstract

Immediate UI mode provides a mode that fails promptly if no credentials are
locally available. This behavior mirrors `preferImmediatelyAvailableCredentials`
APIs found on mobile platforms like Android and iOS. When credentials exist, the
browser presents an immediate login dialog to the user. Otherwise, it rejects
the promise silently, letting you provide alternative sign-in methods, for
example, a sign-in form, without disrupting the user experience.

As of May 2026, Chrome is the only browser that supports immediate UI mode.

## Check prerequisites

To use immediate UI mode, the user must already have eligible credentials
available locally on their device. On Chrome, these credentials include:

- Passkeys saved in a passkey provider such as **Google Password Manager** , **Windows Hello** , or **iCloud Keychain**.
- Passwords saved in Google Password Manager.

If no local credentials exist, the API rejects the request without showing the
immediate login dialog.

## Detect feature support

Before you call immediate UI mode, verify whether the browser supports the
`immediateGet` capability using the
`PublicKeyCredential.getClientCapabilities()` method. If it is not supported,
fall back to existing sign-in methods, such as email and password forms, phone
number verification, or social logins.

```javascript
async function checkImmediateAvailability() {
  try {
    const capabilities = await PublicKeyCredential.getClientCapabilities();
    if (capabilities.immediateGet) {
      console.log("Immediate UI mode is supported.");
    } else {
      console.log("Immediate UI mode is NOT supported.");
    }
  } catch (error) {
    console.error("Error checking client capabilities:", error);
  }
}
```

For broader browser support, use the polyfill available in the [WebAuthn
Polyfills GitHub repository](https://github.com/MasterKale/webauthn-polyfills).

## Request credentials

To trigger the immediate login flow, call `navigator.credentials.get()` with the
`uiMode` field set to `'immediate'`.

By including `password: true` in your request, users can benefit from this
experience if the browser supports [password
credentials](https://developer.mozilla.org/docs/Web/API/PasswordCredential).

```javascript
// This call must follow a user gesture, like a button click
button.addEventListener('click', async (event) => {
  event.preventDefault();
  try {
    const cred = await navigator.credentials.get({
      password: true,
      publicKey: {
        challenge: serverGeneratedChallenge,
        rpId: 'example.com'
      },
      uiMode: 'immediate',
    });
    // Handle successful sign-in
  } catch (error) {
    if (error.name === 'NotAllowedError') {
      // Provide a fallback sign-in experience
      showFallbackUI();
    }
  }
});
```

You must handle the `NotAllowedError` in a `catch` block to provide a fallback
sign-in experience.

## Handle sign-in flows

You can implement immediate UI mode for two primary scenarios. For more UX
guidance and anti-patterns to avoid, see [UX patterns for Immediate UI
mode](https://developer.chrome.com/docs/identity/ux-quick-signins).

### Sign in with a button

Provide a dedicated sign-in button that offers a clean experience without
unexpected prompts.

1. The user clicks a **Sign in** button.
2. Your site calls `navigator.credentials.get()` with `uiMode: "immediate"`.
3. The browser checks for local credentials.
4. If the browser finds credentials, it presents an immediate login dialog for the user to select an account.
5. If the browser finds no credentials or the user dismisses the immediate login dialog, it throws a `NotAllowedError`.
6. If a `NotAllowedError` is thrown, your site then proceeds with its standard sign-in page.

### Sign in before a checkout

Offer credentials proactively before a user performs an action that would
benefit from authentication, such as starting a checkout flow at an online
storefront.

In ecommerce, guest users often select between signing in to an existing
account or checking out as a guest. Providing an immediate login dialog can
streamline the checkout process for returning customers.

1. The user initiates an action, such as clicking a **Checkout** button during a shopping flow.
2. Your site calls `navigator.credentials.get()` with `uiMode: "immediate"`.
3. If credentials exist, the user selects one to complete the sign-in.
4. If credentials don't exist, the browser throws an error and shows no immediate login dialog. The user experience remains unchanged, and you can take the user to the existing checkout screen, which might provide other sign-in options or a guest checkout form.

## Review privacy and security measures

The browser implements critical measures to protect user privacy:

- **User gesture requirement**: You must initiate the API call with a user gesture, such as a click, to prevent silent probing. The call does not consume the activation.
- **Incognito mode restrictions** : Requests in incognito or private sessions always throw a `NotAllowedError`.
- **No allowlists** : Requests with a non-empty `allowCredentials` list throw a `NotAllowedError` to prevent cross-session tracking.
- **No programmatic cancellation** : You cannot use the `signal` parameter to programmatically dismiss the immediate login dialog.