Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/signin/SignInPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function getRenderOptions({

// 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;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am reverting to previous logic. It's better than a deploy blocker.


// SAML required users may reload the login page after having already entered their login details, in which
// case we want to clear their sign in data so they don't end up in an infinite loop redirecting back to their
Expand Down
Loading