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

Standardize abort errors #2240

Closed
jespertheend opened this issue Jan 20, 2025 · 3 comments
Closed

Standardize abort errors #2240

jespertheend opened this issue Jan 20, 2025 · 3 comments

Comments

@jespertheend
Copy link

Proposed Change

If the user declines the UI prompt for calls such as navigator.credentials.get(), what the promise rejects with depends on the browser:

  • Chrome: NotAllowedError: The operation either timed out or was not allowed
  • Firefox: AbortError: The operation was aborted.
  • Safari: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

I was hoping to able to catch any error and only show a message to the user if they didn't intentionally declined the prompt. At the moment, handling this use case seems a bit difficult.

@timcappalli
Copy link
Member

NotAllowedError is the expected error for a user cancellation, as defined in the WebAuthn specification.

I would recommend filing a bug with Mozilla for Firefox.

Image

@jespertheend
Copy link
Author

Ah sorry I didn't catch that, thanks for the info!

@jespertheend
Copy link
Author

For reference, I opened up this ticket for Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants