[NO QA] Revert "fix: Signing with magic link doesn't lead to 2FA page for account with 2FA enabled"#81437
Conversation
…ount with 2FA enabled"
|
@Valforte not sure we need this yet but getting it ready to speed things up. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ca4bd04d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // True, if the user has SAML required, and we haven't yet initiated SAML for their account | ||
| const shouldInitiateSAMLLogin = hasAccount && hasLogin && isSAMLRequired && !hasInitiatedSAMLLogin && !!account.isLoading; | ||
| const shouldShowChooseSSOOrMagicCode = hasAccount && hasLogin && isSAMLEnabled && !isSAMLRequired && !isUsingMagicCode && !hasValidateCode; | ||
| const shouldShowChooseSSOOrMagicCode = hasAccount && hasLogin && isSAMLEnabled && !isSAMLRequired && !isUsingMagicCode; |
There was a problem hiding this comment.
Gate SSO/magic choice when a validate code is present
For SAML-enabled (but not required) accounts signing in via a magic link or deep link, credentials.validateCode is already set. With the reverted condition, shouldShowChooseSSOOrMagicCode becomes true even when a validate code exists, which suppresses shouldShowValidateCodeForm later in the same function. That blocks the 2FA/magic-code prompt and recreates the “magic link doesn’t lead to 2FA” regression that this revert brings back. Reinstating the !hasValidateCode guard prevents the choice screen from overriding the validate-code flow for these users.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I am reverting to previous logic. It's better than a deploy blocker.
|
Ignoring checklists, this is a revert |
|
@Julesssss looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
🚧 @Julesssss has triggered a test Expensify/App build. You can view the workflow run here. |
|
Not emergency, see above |
[HOLD] Revert "fix: Signing with magic link doesn't lead to 2FA page for account with 2FA enabled" (cherry picked from commit d192319) (cherry-picked to staging by Julesssss)
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.3.11-51 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.3.12-1 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.3.13-1 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 9.3.15-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.15-10 🚀
|
Reverts #78261