MasterKale / SimpleWebAuthn

WebAuthn, Simplified. A collection of TypeScript-first libraries for simpler WebAuthn integration. Supports modern browsers, Node, Deno, and more.
https://simplewebauthn.dev
MIT License
1.62k stars 137 forks source link

feat/identify-errors #184

Closed MasterKale closed 2 years ago

MasterKale commented 2 years ago

Inspired by #183, I decided to take some of my notes on all of the possible errors raised by navigator.credentials.create() and navigator.credentials.get() and try to provide some programmatic insight on what likely led to the thrown error.

Now, when possible, a new WebAuthnError will be raised out of startRegistration() and startAuthentication() with a more direct message of what went wrong to help RP devs figure out how to fix the issue.

Screenshots

Screen Shot 2022-03-08 at 8 38 38 PM

Screen Shot 2022-03-07 at 8 46 10 PM Screen Shot 2022-03-07 at 8 46 15 PM