-
Notifications
You must be signed in to change notification settings - Fork 402
fix(clerk-js): Handle two factor redirect when authenticate with web3 #5352
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
fix(clerk-js): Handle two factor redirect when authenticate with web3 #5352
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
3902d48 to
091af83
Compare
🦋 Changeset detectedLatest commit: 23e05da The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
091af83 to
054d34e
Compare
factor-two when authenticate with web3 and response status is needs_second_factor054d34e to
f57c9d1
Compare
anagstef
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add an integration test for this? 🤔
packages/clerk-js/src/core/clerk.ts
Outdated
| }); | ||
| switch (signInOrSignUp.status) { | ||
| case 'needs_second_factor': | ||
| await navigate('factor-two'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes usage is always with in our components which is not the case.
Sounds like we need to borrow a few things from handleRedirectCallback.
f57c9d1 to
540e1b5
Compare
540e1b5 to
7df6eba
Compare
7df6eba to
290aaf3
Compare
290aaf3 to
f2f804c
Compare
f2f804c to
eabb329
Compare
eabb329 to
09f38bd
Compare
…nd response status is `needs_second_factor`
09f38bd to
23e05da
Compare
@anagstef we don't have e2e for web3 apps right, that's the reason I didn't add tests |
Description
In this pr we're handling the redirect to
two-factorwhen user try to login with web3 and has enabled theMulti-factor authenticationChecklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
BEFORE
Screen.Recording.2025-03-18.at.11.19.54.AM.mov
AFTER
Screen.Recording.2025-03-18.at.11.18.31.AM.mov