Bug 2048099 - Return InvalidStateError when excludeCredentials matches a platform credential on macOS.#296
Closed
shetrona wants to merge 1 commit into
Conversation
…s a platform credential on macOS. On macOS 15+, ASAuthorizationErrorMatchedExcludedCredential (code 1006) is returned when a credential in the excludeCredentials list is found on the platform authenticator. This code was not handled in the ASAuthorizationErrorDomain switch in MacOSWebAuthnService.mm, so it fell through to the default NS_ERROR_DOM_NOT_ALLOWED_ERR — surfacing as a NotAllowedError DOMException indistinguishable from a user cancellation. Per WebAuthn spec §5.1.3 step 20, an excludeCredentials match must return InvalidStateError. Chrome and Safari already conform. The WPT createcredential-excludecredentials.https.html (landed via Bug 1619996) asserts this but is currently SKIP'd in Firefox CI. Confirmed via MOZ_LOG="macoswebauthnservice:5" on Firefox 151 / macOS 26.5.1: domain 'com.apple.AuthenticationServices.AuthorizationError' code 1006 Signed-off-by: Ronak Sheth <shetrona@amazon.com>
No Taskcluster jobs started for this pull requestThe |
Contributor
|
(Automated Close) Please do not file pull requests here, see https://firefox-source-docs.mozilla.org/contributing/how_to_submit_a_patch.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On macOS 15+, ASAuthorizationErrorMatchedExcludedCredential (code 1006) is returned when a credential in the excludeCredentials list is found on the platform authenticator. This code was not handled in the ASAuthorizationErrorDomain switch in MacOSWebAuthnService.mm, so it fell through to the default NS_ERROR_DOM_NOT_ALLOWED_ERR — surfacing as a NotAllowedError DOMException indistinguishable from a user cancellation.
Per WebAuthn spec §5.1.3 step 20, an excludeCredentials match must return InvalidStateError. Chrome and Safari already conform. The WPT createcredential-excludecredentials.https.html (landed via Bug 1619996) asserts this but is currently SKIP'd in Firefox CI.
Confirmed via MOZ_LOG="macoswebauthnservice:5" on Firefox 151 / macOS 26.5.1: domain 'com.apple.AuthenticationServices.AuthorizationError' code 1006