Conversation
…able on setup mfa session task
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 7961aec The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
📝 WalkthroughWalkthroughThis change introduces logic to skip the MFA strategy selection screen when only one strategy is available in the setup MFA task. A new constant defines wizard step mappings for start, phone code, and TOTP flows. The default step is computed dynamically based on enabled second factors: if multiple factors exist, the wizard starts at the selection screen; otherwise it proceeds directly to the appropriate flow. Correspondingly, test coverage was expanded to exercise both single and multiple MFA factor scenarios, with fixtures adjusted to validate conditional navigation and UI rendering aligned with available factors. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/ui/src/components/SessionTasks/tasks/TaskSetupMfa/index.tsx`:
- Around line 47-51: The wizard currently computes defaultStep and may jump to
the TOTP flow even when secondFactorsAvailableToAdd is empty; update the logic
so defaultStep and the useWizard call first check for an empty
secondFactorsAvailableToAdd and in that case set defaultStep to
WIZARD_STEPS.start (or trigger an explicit error state), otherwise pick
phoneCode or totp only if those factors actually exist; modify the computation
around defaultStep and the useWizard({ defaultStep: ... }) invocation
(referencing secondFactorsAvailableToAdd, defaultStep, useWizard, and
WIZARD_STEPS) to guard against length === 0 and avoid routing to unavailable
flows.
Description
Only phone number enabled
CleanShot.2026-02-04.at.15.50.15.mp4
Only TOTP enabled
CleanShot.2026-02-04.at.15.51.04.mp4
Both enabled
CleanShot.2026-02-04.at.15.50.15.mp4
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change