Skip to content
Open
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7d5d141
Add UserCancelledError
MasterKale Jul 11, 2024
d055e4c
Add HybridPrerequisitesError
MasterKale Jul 11, 2024
aee5232
Add TimeoutError
MasterKale Jul 11, 2024
7c45c45
Add UserHybridCancelledError
MasterKale Jul 12, 2024
35d7b3a
Replace "cancelled" with "cancellation"
MasterKale Jul 12, 2024
4dcbd9b
Add UserVerificationError
MasterKale Jul 12, 2024
0906982
Remove user cancellation from NotAllowedError
MasterKale Jul 12, 2024
6bd9757
Move where TimeoutError is raised
MasterKale Jul 16, 2024
c4140c7
Define new error interfaces
MasterKale Jul 18, 2024
4986178
Update error references to use new interfaces
MasterKale Jul 18, 2024
00baf08
Merge branch '1859-differentiate-errors' into 2062-new-error-codes
MasterKale Jul 23, 2024
17ff8f1
Remove duplicate TimeoutError
MasterKale Jul 30, 2024
d6ada58
Merge branch 'main' into 2062-new-error-codes
MasterKale Aug 28, 2024
09571b2
Remove hybrid errors for now
MasterKale Aug 28, 2024
0887054
Add required IDL for new error codes
MasterKale Aug 28, 2024
7aec744
Replace UserCancellationError with OptOutError
MasterKale Sep 24, 2024
008495a
Merge branch 'main' into 2062-new-error-codes
MasterKale Aug 27, 2025
2c39a85
Merge branch 'main' into 2062-new-error-codes
MasterKale Nov 10, 2025
d038316
Remove UnknownError definitions
MasterKale Nov 10, 2025
e7f510f
Incorporate more OptOutErrors
MasterKale Dec 11, 2025
3772858
Replace UserVerificationError with ConstraintError
MasterKale Dec 11, 2025
17a29f3
Fix a minor grammar mistake
MasterKale Dec 11, 2025
f68ac32
Merge branch 'main' into 2062-new-error-codes
MasterKale Dec 11, 2025
dc1ea48
Update list of get() exceptions w/ConstraintError
MasterKale Dec 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 102 additions & 8 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1975,7 +1975,23 @@ a numbered step. If outdented, it (today) is rendered as a bullet in the midst o

: If the user exercises a user agent user-interface option to cancel the process,
:: [=set/For each=] |authenticator| in |issuedRequests| invoke the [=authenticatorCancel=] operation on |authenticator|
and [=set/remove=] |authenticator| from |issuedRequests|. Throw a "{{NotAllowedError}}" {{DOMException}}.
and [=set/remove=] |authenticator| from |issuedRequests|.

If the user agent is informing the user of an inability to continue the ceremony
due to missing {{AuthenticatorTransport/hybrid}} prerequisites,
throw a "{{HybridPrerequisitesError}}" {{DOMException}}.

If the user agent is prompting the user to complete the ceremony using an authenticator
that may be available over the {{AuthenticatorTransport/hybrid}} transport,
throw a "{{UserHybridCancellationError}}" {{DOMException}}.

If the user agent is informing the user that
the last used |authenticator| cannot collect [=user verification=] when
<code>|pkOptions|.{{PublicKeyCredentialCreationOptions/authenticatorSelection}}.{{AuthenticatorSelectionCriteria/userVerification}}</code>
is set to {{UserVerificationRequirement/required}},
throw a "{{UserVerificationError}}" {{DOMException}}.

Otherwise, throw a "{{UserCancellationError}}" {{DOMException}}.

: If <code>|options|.{{CredentialCreationOptions/signal}}</code> is present and [=AbortSignal/aborted=],
:: [=set/For each=] |authenticator| in |issuedRequests| invoke the [=authenticatorCancel=]
Expand Down Expand Up @@ -2244,7 +2260,7 @@ a numbered step. If outdented, it (today) is rendered as a bullet in the midst o
</dl>
</li>

1. Throw a "{{NotAllowedError}}" {{DOMException}}. In order to prevent information leak that could identify the
1. Throw a "{{TimeoutError}}" {{DOMException}}. In order to prevent information leak that could identify the
user without [=user consent|consent=], this step MUST NOT be executed before |lifetimeTimer| has expired. See
[[#sctn-make-credential-privacy]] for details.

Expand Down Expand Up @@ -2278,6 +2294,10 @@ The following {{DOMException}} exceptions can be raised:
: {{InvalidStateError}}
:: The authenticator used in the ceremony recognized an entry in {{PublicKeyCredentialCreationOptions/excludeCredentials}}
after the user [=user consent|consented=] to registering a credential.

: {{HybridPrerequisitesError}}
:: The ceremony was cancelled due to missing prerequisites for use of
the {{AuthenticatorTransport/hybrid}} transport.

: {{NotSupportedError}}
:: No entry in {{PublicKeyCredentialCreationOptions/pubKeyCredParams}} had a {{PublicKeyCredentialDescriptor/type}} property of {{PublicKeyCredentialType/public-key}},
Expand All @@ -2294,10 +2314,21 @@ The following {{DOMException}} exceptions can be raised:
: {{UnknownError}}
:: The [=authenticator=] could not process the supplied options,
or encountered an error while creating the new credential.

: {{UserCancellationError}}
:: The user has exercised a user agent user-interface option
to end the ceremony.

: {{UserHybridCancellationError}}
:: The user has exercised a user agent user-interface option
to end the ceremony while being prompted to complete a ceremony
via the {{AuthenticatorTransport/hybrid}} transport.

: {{UserVerificationError}}
:: The user was unable to complete [=user verification=] as required by the [=[RP]=].

: {{NotAllowedError}}
:: A catch-all error covering a wide range of possible reasons,
including common ones like the user canceling out of the ceremony.
:: A catch-all error covering a wide range of possible reasons.
Some of these causes are documented throughout this spec,
while others are client-specific.

Expand Down Expand Up @@ -2519,7 +2550,23 @@ When this method is invoked, the user agent MUST execute the following algorithm

: If the user exercises a user agent user-interface option to cancel the process,
:: [=set/For each=] |authenticator| in |issuedRequests| invoke the [=authenticatorCancel=] operation on |authenticator|
and [=set/remove=] |authenticator| from |issuedRequests|. Throw a "{{NotAllowedError}}" {{DOMException}}.
and [=set/remove=] |authenticator| from |issuedRequests|.

If the user agent is informing the user of an inability to continue the ceremony
due to missing {{AuthenticatorTransport/hybrid}} prerequisites,
throw a "{{HybridPrerequisitesError}}" {{DOMException}}.

If the user agent is prompting the user to complete the ceremony using an authenticator
that may be available over the {{AuthenticatorTransport/hybrid}} transport,
throw a "{{UserHybridCancellationError}}" {{DOMException}}.

If the user agent is informing the user that
the last used |authenticator| cannot collect [=user verification=] when
<code>|pkOptions|.{{PublicKeyCredentialCreationOptions/authenticatorSelection}}.{{AuthenticatorSelectionCriteria/userVerification}}</code>
is set to {{UserVerificationRequirement/required}},
throw a "{{UserVerificationError}}" {{DOMException}}.

Otherwise, throw a "{{UserCancellationError}}" {{DOMException}}.

: If <code>|options|.{{CredentialRequestOptions/signal}}</code> is present and [=AbortSignal/aborted=],
:: [=set/For each=] |authenticator| in |issuedRequests| invoke the [=authenticatorCancel=] operation on |authenticator|
Expand Down Expand Up @@ -2698,7 +2745,7 @@ When this method is invoked, the user agent MUST execute the following algorithm
1. Return |constructAssertionAlg| and terminate this algorithm.
</dl>

1. Throw a "{{NotAllowedError}}" {{DOMException}}. In order to prevent information leak that could identify the
1. Throw a "{{TimeoutError}}" {{DOMException}}. In order to prevent information leak that could identify the
user without [=user consent|consent=], this step MUST NOT be executed before |lifetimeTimer| has expired. See
[[#sctn-assertion-privacy]] for details.

Expand Down Expand Up @@ -2846,6 +2893,10 @@ The following {{DOMException}} exceptions can be raised:
:: The ceremony was cancelled by an {{AbortController}}.
See [[#sctn-abortoperation]] and [[#sctn-sample-aborting]].

: {{HybridPrerequisitesError}}
:: The ceremony was cancelled due to missing prerequisites for use of
the {{AuthenticatorTransport/hybrid}} transport.

: {{SecurityError}}
:: The [=effective domain=] was not a [=valid domain=],
or <code>{{PublicKeyCredentialCreationOptions/rp}}.{{PublicKeyCredentialRpEntity/id}}</code> was not equal to or a registrable domain suffix of the [=effective domain=].
Expand All @@ -2857,10 +2908,21 @@ The following {{DOMException}} exceptions can be raised:
: {{UnknownError}}
:: The [=authenticator=] could not process the supplied options,
or encountered an error while generating an [=assertion signature=].

: {{UserCancellationError}}
:: The user has exercised a user agent user-interface option
to end the ceremony.

: {{UserHybridCancellationError}}
:: The user has exercised a user agent user-interface option
to end the ceremony while being prompted to complete a ceremony
via the {{AuthenticatorTransport/hybrid}} transport.

: {{UserVerificationError}}
:: The user was unable to complete [=user verification=] as required by the [=[RP]=].

: {{NotAllowedError}}
:: A catch-all error covering a wide range of possible reasons,
including common ones like the user canceling out of the ceremony.
:: A catch-all error covering a wide range of possible reasons.
Some of these causes are documented throughout this spec,
while others are client-specific.
</dl>
Expand Down Expand Up @@ -3726,6 +3788,38 @@ SHOULD be aborted.
See [WHATWG HTML WG Issue #2711](https://github.com/whatwg/html/issues/2711) for more details.


## WebAuthn Interfaces ## {#sctn-interfaces}

The subection below defines custom interfaces used throughout WebAuthn.

### Custom WebAuthn Exceptions ### {#iface-custom-webauthn-exceptions}

For descriptions of these exceptions,
please see [[#sctn-create-request-exceptions]] and [[#sctn-get-request-exceptions]].

<xmp class="idl">
[Exposed=Window, Serializable]
interface HybridPrerequisitesError : DOMException {
};

[Exposed=Window, Serializable]
interface TimeoutError : DOMException {
};

[Exposed=Window, Serializable]
interface UserCancellationError : DOMException {
};

[Exposed=Window, Serializable]
interface UserHybridCancellationError : DOMException {
};

[Exposed=Window, Serializable]
interface UserVerificationError : DOMException {
};
</xmp>


## WebAuthn Extensions Inputs and Outputs ## {#sctn-extensions-inputs-outputs}

The subsections below define the data types used for conveying [=WebAuthn extension=] inputs and outputs.
Expand Down