From 8f55b731c786d921fe22ba25379ee5b5605a447b Mon Sep 17 00:00:00 2001 From: KaveeshaPiumini Date: Tue, 28 Jul 2026 21:26:41 +0530 Subject: [PATCH] Stop leaking raw WebAuthn error messages to users in passkey flows 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) --- .../browser/src/utils/handleWebAuthnAuthentication.ts | 4 ++-- packages/react/src/utils/passkey.ts | 8 ++++---- packages/vue/src/utils/passkey.ts | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/browser/src/utils/handleWebAuthnAuthentication.ts b/packages/browser/src/utils/handleWebAuthnAuthentication.ts index 304402e..8255521 100644 --- a/packages/browser/src/utils/handleWebAuthnAuthentication.ts +++ b/packages/browser/src/utils/handleWebAuthnAuthentication.ts @@ -254,10 +254,10 @@ const handleWebAuthnAuthentication = async (challengeData: string): Promise