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

Throw exceptions in Credential internal methods #197

Closed
nidhijaju opened this issue Mar 29, 2022 · 0 comments · Fixed by #196
Closed

Throw exceptions in Credential internal methods #197

nidhijaju opened this issue Mar 29, 2022 · 0 comments · Fixed by #196

Comments

@nidhijaju
Copy link
Member

nidhijaju commented Mar 29, 2022

When extending the Credential internal methods in WebAuthn(w3c/webauthn#1706) and WebOTP(WICG/web-otp#57) to incorporate propagating the AbortSignal's abort reason, it was found that the algorithm wouldn't make a distinction between successful and failure return values. Hence, you could spoof successful return values as abort reason can be anything.

It was decided that it would be better to throw the abort reason instead of returning it (w3c/webauthn#1706 (comment)). This is because we don't want the WebAuth API, for example, to handle abort reason differently from other places/specs. This requires changes on the Credential Management spec side as well to match this behavior change and not break the integration. (#196)

Following on from this, we decided to throw all exceptions instead of returning them in these Credential internal methods, otherwise we'll run into the same issue when another spec extends the methods. (#196 (review))

cc/ @nsatragno

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

Successfully merging a pull request may close this issue.

1 participant