Skip to content

feat(mosaic): add reverification to password updates - #10194

Open
austincalvelage wants to merge 21 commits into
austin/mosaic-export-is-reverification-errorfrom
austin/password-reverification
Open

austincalvelage wants to merge 21 commits into
austin/mosaic-export-is-reverification-errorfrom
austin/password-reverification

Conversation

@austincalvelage

@austincalvelage austincalvelage commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Description

Adds session reverification to the Mosaic password section. When reverification is enabled, the current-password field is hidden to match legacy. A verification challenge appears inside the password dialog, and successful verification retries the save.

  • Password uses useReverificationFlow directly. The model keeps password-specific error mapping and passes reverification errors through. The existing save() helper maps errors from the wrapped action for the form.
  • Closing verification cancels the submission without an error. If the retry requires verification again, the shared wrapper rejects it and the form retains its draft with an error.
  • Password, confirmation, and device-details dialogs share ReverificationFlow. Password uses useFlowAutoFocus when returning to the form, and the verification error card closes the host dialog.

Based on #10214, with the shared fixes from #10215 and #10216 integrated. #10215 and #10216 target main directly. #10214 is still stacked on Fredrik's branch. Their changes remain in this diff until they land in main.

Checklist

Type of change

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

@vercel

vercel Bot commented Oct 9, 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 13, 2026 7:12pm UTC
swingset Ready Ready Preview Oct 13, 2026 7:12pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 64040fc

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

This PR includes changesets to release 4 packages
Name Type
@clerk/ui Patch
@clerk/nextjs Patch
@clerk/chrome-extension Patch
@clerk/swingset Patch

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 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: c35018a8-c511-48bc-81f8-d6b50151e701

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

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

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 6423c9d

@austincalvelage
austincalvelage force-pushed the austin/password-reverification branch from 3d592b5 to 6423c9d Compare October 13, 2026 16:44
@austincalvelage
austincalvelage changed the base branch from main to fredrik/reverification-handle-row-level-reverification October 13, 2026 16:48

@alexcarpenter alexcarpenter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Section wiring matches Fredrik's stack. Below that, the PR rebuilds useConfirmController by hand because password is a form, and adds pieces nothing else in Mosaic has. The real gap is that useForm doesn't know about reverification. I'd block on the formatError and controller try/catch comments; the rest follow from them.

@austincalvelage
austincalvelage force-pushed the austin/password-reverification branch from 6423c9d to 99e751e Compare October 13, 2026 17:32
@austincalvelage
austincalvelage changed the base branch from fredrik/reverification-handle-row-level-reverification to austin/mosaic-export-is-reverification-error October 13, 2026 17:32
A submit that rejects because the user cancelled a reverification now returns the form to editing with its values and no message, instead of showing the generic error and logging the cancellation.
useReverificationWithState resolved with the reverification hint when the retried action still required verification, so callers saw a success. It now rejects with a ClerkRuntimeError coded reverification_incomplete, which has copy in the errors catalog.

This branch was successfully deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants