-
Notifications
You must be signed in to change notification settings - Fork 419
feat(clerk-js,localizations,types): email_code & email_link as 2FA when signing in on new device
#7116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 0d07fae The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds email-based second-factor flows (email_code and email_link) with new UI cards and dynamic preparation/verification logic, expands localization keys across many locales, updates sign-in types and flow metadata, adjusts Alert/styling behavior, includes a changeset and a small bundle size cap bump. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant C as Client / SDK
participant S as Server
participant UI as SignIn UI
participant EC as EmailCodeCard
participant EL as EmailLinkCard
U->>C: submit credentials
C->>S: prepareFirstFactor()
S-->>C: status (ok | needs_second_factor)
alt needs_second_factor
C->>UI: load second-factor options
UI->>EC: render when email_code available
UI->>EL: render/init when email_link available
EC->>S: prepareSecondFactor({ emailAddressId, strategy: email_code })
EL->>C: startEmailLinkFlow(redirectUrl)
EL->>S: prepareSecondFactor({ ...email_link config })
Note right of EL: waits for verification callback or resend
S-->>EL: verificationResult (verified | expired | error)
alt verified (same client)
EL->>C: show verification modal / activate session
C->>U: redirect to afterSignInUrl
else expired / error
EL->>UI: surface error / allow restart
end
else continue_first_factor
C->>S: continue first-factor verification
end
S-->>U: final auth result / redirect
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
email_code as a second factor
email_code as a second factoremail_code as a second factor
4ee26f2 to
1b81587
Compare
f63f334 to
5db2bb6
Compare
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/elements
@clerk/clerk-expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/clerk-react
@clerk/react-router
@clerk/remix
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/themes
@clerk/types
@clerk/upgrade
@clerk/vue
commit: |
… to Client and SignIn resources - Trusted users automatically see password - Untrusted users automatically don't see password - Added Expo dummy data.
…tors to Client and SignIn resources for fraud protection
… to Client and SignIn resources - Trusted users automatically see password - Untrusted users automatically don't see password - Added Expo dummy data.
email_code as a second factoremail_code and email_link as a second factor when user is signing in on a new device.
email_code and email_link as a second factor when user is signing in on a new device.email_code and email_link as 2FA when signing in on new device
email_code and email_link as 2FA when signing in on new deviceemail_code & email_link as 2FA when signing in on new device
Description
(NOTE: Currently behind a feature flag.)
Enables support for
email_codeandemail_linkas a second factor in the AIO components.This flow is hit when a user is signing-in on a new device. If they are using email alongside password as their first factor, and don't have any MFA options enabled, they will be required to verify.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
New Features
Bug Fixes / UX
Localization
Chores