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

Help RP's understand actionable exceptions from create() and get() #2047

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MasterKale
Copy link
Contributor

@MasterKale MasterKale commented Mar 20, 2024

This PR attempts to pull together any exceptions raised by create() and get() to help RP's understand what exceptions may be encountered when using WebAuthn. The intention here is to help RP's understand which errors might be surfaced to the user, and which should not.

Addresses #1859.


Preview | Diff

@MasterKale MasterKale changed the title [WIP] Help RP's understand actionable exceptions from create() and get() Help RP's understand actionable exceptions from create() and get() May 1, 2024
@MasterKale MasterKale marked this pull request as ready for review May 1, 2024 22:53
@MasterKale
Copy link
Contributor Author

I've finally cobbled together reasons for all of the exceptions during both registration and authentication.

...Except I cop out a bit with NotAllowedError because it has many more possible reasons it gets raised, and in practice clients have overloaded this exception with causes not documented in the spec. I thought it prudent to present this error as one that RPs should prepare to handle as a general, "the user canceled the ceremony, or something went wrong" exception and handle it as such. This is as opposed to encouraging each RP to try and interpret all possible reasons the issue was raised. I'm open to feedback on this approach.

@herrjemand
Copy link
Contributor

100% support this @MasterKale. Recently working on client lib, NotAllowedError is kinda useless. *)

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

Successfully merging this pull request may close these issues.

None yet

3 participants