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

Stop overwriting NotAllowError message when identifying errors in the browser #352

Closed MasterKale closed 1 year ago

MasterKale commented 1 year ago

Twice now my error identification logic has overwritten a NotAllowedError message with one that is spec-accurate but completely obfuscates the real issue that becomes obvious if one could read it:

In both instances I overwrote these messages with "User clicked cancel, or the authentication ceremony timed out" because it was the second of two possible reasons the error would be raised. Clearly platforms are using this error type to report platform-specific errors, though, and so I should stop overwriting these messages to make it easier for RP's to diagnose issues that aren't library-specific.

MasterKale commented 1 year ago

This is now available in @simplewebauthn/browser@7.1.0