Skip to content

feat(ui): Add MFA section + flow - #9802

Merged
austincalvelage merged 41 commits into
mainfrom
austin/mfa-section
Sep 18, 2026
Merged

austincalvelage merged 41 commits into
mainfrom
austin/mfa-section

Conversation

@austincalvelage

Copy link
Copy Markdown
Member

Description

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:

@changeset-bot

changeset-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 572907f

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

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
swingset Ready Ready Preview Sep 18, 2026 10:55pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
clerk-js-sandbox Skipped Skipped Sep 18, 2026 10:55pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Added reusable MFA enrollment views and dialogs for SMS, authenticator apps, and backup codes. Shared phone steps replaced duplicated phone-dialog logic. Added MFA method management, localization, styles, exports, SwingSet fixtures, stories, and extensive Mosaic and fixture tests. Added SwingSet Vitest configuration and package scripts.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~60 minutes

Merge Risk: 🟡 Moderate · up to d407b

The added MFA test can fail because prior clipboard calls remain recorded, and authenticator-only users receive inaccurate backup-code recovery guidance. Resolve these localized defects before merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 36 functions across 44 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description contains only the pull request template and checklist. It does not provide a meaningful summary of the MFA changes or testing instructions. Add a brief description of the MFA section and flow, including the main user-facing changes and the tests or commands used to validate them.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding the MFA section and flow to the UI.
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 5.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 36 functions across 44 files. (2 skipped: 2 unsupported.)


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

@pkg-pr-new

pkg-pr-new Bot commented Sep 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 572907f

@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox September 17, 2026 16:35 Inactive
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox September 17, 2026 17:58 Inactive
@austincalvelage
austincalvelage marked this pull request as ready for review September 17, 2026 22:27

@maxyinger maxyinger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Everything looks good. This is a big boi, so in favor of just getting it in and doing polish followups.

Main question on this one is do we plan on using these dialogs anywhere?

  • user-profile-add-authenticator.dialog.tsx
  • user-profile-add-sms.dialog.tsx
  • user-profile-backup-codes.dialog.tsx

Outside of that only thing that doesn't feel quite right is the copy banner in the authenticator setup view, but feels like something new we should discuss with design

Nice work!

Comment on lines +57 to +67
<UserProfileAuthenticatorSetupView
{...setup}
onCopy={onCopy}
copyStatus={copyStatus}
copyErrorMessage={copyErrorMessage}
/>
) : (
<>
<Card.Header>
<Card.Title>{setupMessages.title}</Card.Title>
</Card.Header>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Polish follow up, but these two being just slightly different heights makes me either want to either:

  • be able to temporarily disable the height animation from inside a flow
  • or force them to be the same height

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Asked Preston here about restructuring in away they maintain the same height. https://www.figma.com/design/yt5qKlfNyIIdaKaMoav1v2/Clerk-Mosaic-2.0?node-id=9578-28439#1933135188

If not we can look into disabling height animations within the flow.

@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox September 18, 2026 21:07 Inactive
@vercel
vercel Bot temporarily deployed to Preview – clerk-js-sandbox September 18, 2026 22:53 Inactive
@austincalvelage
austincalvelage merged commit 4ff463a into main Sep 18, 2026
145 of 148 checks passed
@austincalvelage
austincalvelage deleted the austin/mfa-section branch September 18, 2026 23:56
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.

2 participants