Skip to content

fix(mosaic): localize passkey cancellation and failure errors - #10519

Closed
austincalvelage wants to merge 1 commit into
mainfrom
austin/passkey-cancellation-error
Closed

austincalvelage wants to merge 1 commit into
mainfrom
austin/passkey-cancellation-error

Conversation

@austincalvelage

@austincalvelage austincalvelage commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Description

Cancelling the passkey prompt during reverification showed the browser's raw error instead of the localized copy legacy shows. In Chrome:

Reverification now resolves Clerk runtime errors by code through toLocalizableError and useErrorText, like the rest of Mosaic. Server errors keep showing the server's message, as legacy does in en-US.

Two passkey failures that previously fell back to "Something went wrong" now get their own copy:

  • passkey_registration_failed (adding a passkey, the device returns no credential): "Your device couldn't create a passkey. Please try again."
  • passkey_retrieval_failed (reverification, the device returns no credential): "Your device couldn't verify your passkey. Please try again."

Legacy shows clerk-js's raw English message for these ("Browser failed to create credential").

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Oct 29, 2026 2:05am UTC
swingset Ready Ready Preview Oct 29, 2026 2:05am UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: adb318c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between cb8638a and adb318c.

Files selected for processing: 6
  • .changeset/mosaic-reverification-passkey-cancel.md
  • packages/mosaic/src/features/reverification/__tests__/reverification.feature.test.tsx
  • packages/mosaic/src/features/reverification/reverification.controller.ts
  • packages/mosaic/src/features/reverification/reverification.utils.ts
  • packages/mosaic/src/features/user-profile/user-profile-passkeys-section/__tests__/user-profile-passkeys-section.feature.test.tsx
  • packages/mosaic/src/localization/errors.messages.ts
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 6 reviews per hour.

Walkthrough

Reverification errors now display server-provided details when available. Otherwise, the controller localizes the error description and uses a generic message as a fallback. New messages and tests cover passkey cancellation, retrieval failure, and failed registration when credential creation returns null.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • clerk/javascript#10458: Updates the reverification localization contract used by the controller’s error fallback.
  • clerk/javascript#10518: Changes reverification errors to use localizable descriptions and useErrorText.

Suggested reviewers: ephem, alexcarpenter

Merge Risk: Minimal · up to adb31

This change localizes passkey cancellation and failure messages during reverification and when adding a passkey. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: localizing passkey cancellation and failure errors in Mosaic.
Description check Passed The description directly explains the localized passkey cancellation and failure behavior, including the affected error cases and expected user-facing messages.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 5 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10519

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10519

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10519

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10519

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10519

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10519

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10519

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10519

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10519

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10519

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10519

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10519

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10519

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10519

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10519

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10519

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10519

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10519

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10519

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10519

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10519

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10519

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10519

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10519

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10519

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10519

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10519

commit: adb318c

@austincalvelage

Copy link
Copy Markdown
Member Author

closing in favor of #10518

This branch was successfully deployed

2 active deployments
Preview – swingset — adb318c3 Deployed Oct 29, 2026 by vercel[bot]
Preview – clerk-js-sandbox — adb318c3 Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant