Skip to content
ecdsa.com
WebAuthn navigator.credentials.get() / create()WebAuthn and passkeys

Error message

NotAllowedError: The operation either timed out or was not allowed. See: https://www.w3.org/TR/webauthn-2/#sctn-privacy-considerations-client.

Also printed as

  • NotAllowedError: The operation either timed out or was not allowed.
  • NotAllowedError: CredentialsContainer request is not allowed.

Chromium's text is above (older versions omit the "See: …" link). Firefox says "CredentialsContainer request is not allowed." (reproduced in headless Firefox 157, which has no authenticator). The message differs per browser; only `e.name` is stable.

WebAuthn navigator.credentials.get() / create() — DOMException NotAllowedError (Chromium; Firefox wording in aliases)

What it means

The browser's catch-all WebAuthn failure. The specification deliberately makes "the user cancelled", "the timeout expired", "no authenticator has a matching credential" and "the request was not allowed in this context" indistinguishable to the web page, so a site cannot probe which credentials exist on a device (the linked privacy section explains why). Your code therefore has to treat it as "no credential was produced" and offer another path; the real cause is found by reproducing it, not by reading the error.

Why it happens

How to fix it

  1. 1.

    Handle it as "no credential" and offer alternatives

    Do not show a scary error. Offer another sign-in method, another device (hybrid/QR flow), or registration of a new passkey.

    js
    try {
      const credential = await navigator.credentials.get({ publicKey: options });
      await finishLogin(credential);
    } catch (e) {
      if (e.name === "NotAllowedError") {
        // Cancelled, timed out, or no passkey for this account on this device: offer alternatives.
        showOtherSignInOptions();
      } else {
        throw e;
      }
    }
  2. 2.

    Offer common algorithms at registration

    Listing ES256, EdDSA and RS256 covers practically all authenticators; your server must then verify all three.

    js
    // Registration: offer the algorithms authenticators actually support.
    pubKeyCredParams: [
      { type: "public-key", alg: -7 },    // ES256
      { type: "public-key", alg: -8 },    // EdDSA (Ed25519)
      { type: "public-key", alg: -257 },  // RS256 (Windows Hello and older security keys)
    ],

Related errors

Browse the full signature error database