Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nikospapcom
Copy link
Member

@nikospapcom nikospapcom commented Mar 14, 2025

Description

In this pr we're handling the redirect to two-factor when user try to login with web3 and has enabled the Multi-factor authentication

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:

BEFORE

Screen.Recording.2025-03-18.at.11.19.54.AM.mov

AFTER

Screen.Recording.2025-03-18.at.11.18.31.AM.mov

@nikospapcom nikospapcom self-assigned this Mar 14, 2025
Copy link

vercel bot commented Mar 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 9:24am

@nikospapcom nikospapcom force-pushed the nikospap/user-1350-we-fail-to-navigate-to-mfa-page-using-web3-wallet branch from 3902d48 to 091af83 Compare March 18, 2025 07:47
Copy link

changeset-bot bot commented Mar 18, 2025

🦋 Changeset detected

Latest commit: f57c9d1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch

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

@nikospapcom nikospapcom force-pushed the nikospap/user-1350-we-fail-to-navigate-to-mfa-page-using-web3-wallet branch from 091af83 to 054d34e Compare March 18, 2025 07:50
@nikospapcom nikospapcom changed the title fix(clerk-js): Navigate to factor-two when authenticate with web3 and response status is needs_second_factor fix(clerk-js): Handle two factor redirect when authenticate with web3 Mar 18, 2025
…nd response status is `needs_second_factor`
@nikospapcom nikospapcom force-pushed the nikospap/user-1350-we-fail-to-navigate-to-mfa-page-using-web3-wallet branch from 054d34e to f57c9d1 Compare March 18, 2025 09:23
@nikospapcom nikospapcom marked this pull request as ready for review March 18, 2025 09:23
Copy link
Member

@anagstef anagstef left a 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? 🤔

});
switch (signInOrSignUp.status) {
case 'needs_second_factor':
await navigate('factor-two');
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants