Repository navigation
feat(mosaic): add reverification to password updates - #10194
austincalvelage wants to merge 21 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 64040fc The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
3d592b5 to
6423c9d
Compare
alexcarpenter
left a comment
There was a problem hiding this comment.
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.
The model catches again and lets reverification errors through, as save() does, so the controller and section no longer carry a formatError callback.
6423c9d to
99e751e
Compare
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.
isReverificationCancelledError throws on a falsy value, which left the form stuck submitting when onSubmit rejected with no reason.
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.
useReverificationFlowdirectly. The model keeps password-specific error mapping and passes reverification errors through. The existingsave()helper maps errors from the wrapped action for the form.ReverificationFlow. Password usesuseFlowAutoFocuswhen 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
pnpm testruns as expected.pnpm buildruns as expected.Type of change