WebAuthn reports every failure as a DOMException with a name, and the message text differs between Chrome, Safari and Firefox, so branch on err.name. NotAllowedError is the one you will see most: cancel, timeout, no matching credential, a lost user gesture in Safari and a cross-origin iframe without permission all look the same on purpose. InvalidStateError on create() means the user already has a passkey for this account on that device. SecurityError means rp.id is not the page's domain or a parent of it.
On 12 November 2026 we made each mistake on purpose in Chrome 136 with a virtual authenticator. Three results differ from what most guides say: an unsupported algorithm gave NotAllowedError, not NotSupportedError; required user verification on an authenticator without it gave NotAllowedError, not ConstraintError; and the SecurityError mentions .well-known/webauthn, because Chrome first checks related origins.
So in Chrome, NotAllowedError covers more than cancel and timeout: if sign-up fails with it and nobody pressed Cancel, check pubKeyCredParams first.
Every error with its cause and what to show the user: WebAuthn errors: NotAllowedError, InvalidStateError and more
Top comments (0)