fix(ui): redirect signed-in users forward from factor-two#7788
fix(ui): redirect signed-in users forward from factor-two#7788nikosdouvlis wants to merge 2 commits intonikos/fix-factor-two-infinite-spinnerfrom
Conversation
When a signed-in user lands on factor-two without a pending 2FA (e.g. page reload after successful verification in a multi-session app), redirect to afterSignInUrl instead of back to sign-in start.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: b1bbe99 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 |
📝 WalkthroughWalkthroughThis pull request introduces routing improvements and bug fixes for the factor-two sign-in flow in the 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
@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: |
Summary
Follow-up to #7774. Builds on the infinite spinner fix by improving the redirect behavior for multi-session apps.
When a signed-in user lands on factor-two without a pending 2FA session (e.g. the dashboard reloads after successful verification), the previous fix redirected back to sign-in start which isn't ideal since the user is already authenticated.
This changes the behavior so that:
afterSignInUrlThis is experimental - we want to verify on the dashboard before deciding whether to keep it.
Test plan
/sign-in#/factor-twowhile signed in on a multi-session app - should redirect to afterSignInUrl/sign-in#/factor-twowhile signed out - should redirect to sign-in startSummary by CodeRabbit
Bug Fixes
Changes