Stop leaking raw WebAuthn error messages to users in passkey flows - #41
Merged
KaveeshaPiumini merged 1 commit intoJul 29, 2026
Conversation
Passkey ceremonies surfaced the raw browser WebAuthn error message directly to end users, for example: Passkey authentication failed: The operation either timed out or was not allowed. See: https://www.w3.org/TR/webauthn-2/#sctn-privacy-considerations-client. The user-facing message of ThunderIDRuntimeError interpolated `error.message` from the underlying DOMException. Replace it with a clean, stable message and move the raw browser detail into the developer-info argument, where it remains available for debugging without being shown to users. Applied to every ceremony that surfaced the raw message: - @thunderid/browser: handleWebAuthnAuthentication (default branch) - @thunderid/react: registration and authentication - @thunderid/vue: registration and authentication Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughGeneric WebAuthn and passkey error handling now reports standardized context together with both the error name and message across browser, React, and Vue utilities. ChangesError message handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
brionmario
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Passkey sign-in and registration surfaced the underlying browser WebAuthn error message directly to end users. For example, a cancelled or timed-out ceremony displayed:
The
ThunderIDRuntimeErroruser-facing message interpolatederror.messagefrom the rawDOMException, so raw browser/spec text (including a W3C spec URL) leaked into the UI.Fix
Replace the interpolated user-facing message with a clean, stable message, and move the raw browser detail into the developer-info argument (4th param), where it stays available for logging/debugging without being shown to users.
Applied to every passkey ceremony that surfaced the raw message:
@thunderid/browserhandleWebAuthnAuthentication—defaulterror branch@thunderid/reactpasskey.ts— registration and authentication@thunderid/vuepasskey.ts— registration and authenticationExample (auth,
@thunderid/browser):Verification
Before Fix
After Fix
Related Issues
Notes
This is the root cause of the raw passkey error observed in the ThunderID gate app (which consumes
@thunderid/react).🤖 Generated with Claude Code
Summary by CodeRabbit