Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/359-error-from-conditional-ui-abort #371

Merged
merged 3 commits into from
Mar 16, 2023

Conversation

MasterKale
Copy link
Owner

@MasterKale MasterKale commented Mar 16, 2023

This PR updates WebAuthnAbortService to abort existing WebAuthn calls with an AbortError instead of a string. This allows for error handlers on startAuthentication() to handle the cancelling of Conditional UI with the same logic that would handle the user cancelling out of the WebAuthn modal experience.

This also fixes accidentally broken AbortError error identification during both registration and authentication, so that the enhanced error codes introduced in #367 can properly identify the throwing of AbortError too:

Screenshot 2023-03-15 at 10 52 26 PM

Fixes #359.

@MasterKale MasterKale added the package:browser @simplewebauthn/browser label Mar 16, 2023
@MasterKale MasterKale added this to the v7.2.0 milestone Mar 16, 2023
@MasterKale MasterKale merged commit 57c9b79 into master Mar 16, 2023
@MasterKale MasterKale deleted the fix/359-error-from-conditional-ui-abort branch March 16, 2023 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:browser @simplewebauthn/browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aborting authentication throws a string instead of an error
1 participant