Skip to content

Commit 5ebb243

Browse files
committed
Revert "Show login form immediately when clearing stale SAML sign-in data on web"
This reverts commit eac87f2.
1 parent 6f18aaa commit 5ebb243

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/pages/signin/SignInPage.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,13 @@ function getRenderOptions({
106106
// SAML required users may reload the login page after having already entered their login details, in which
107107
// case we want to clear their sign in data so they don't end up in an infinite loop redirecting back to their
108108
// SSO provider's login page
109-
const isClearingSAMLSignInData = hasLogin && isSAMLRequired && !shouldInitiateSAMLLogin && !hasInitiatedSAMLLogin && !account.isLoading;
110-
if (isClearingSAMLSignInData) {
109+
if (hasLogin && isSAMLRequired && !shouldInitiateSAMLLogin && !hasInitiatedSAMLLogin && !account.isLoading) {
111110
clearSignInData();
112111
}
113112

114113
// Show the Welcome form if a user is signing up for a new account in a domain that is not controlled
115114
const shouldShouldSignUpWelcomeForm = !!credentials?.login && !isAccountValidated && !account?.accountExists && !account?.domainControlled;
116-
// When clearing SAML sign-in data, show the login form immediately rather than waiting for the async Onyx
117-
// update to clear credentials — otherwise the page renders blank with no form visible
118-
const shouldShowLoginForm = !shouldShowAnotherLoginPageOpenedMessage && (!hasLogin || isClearingSAMLSignInData) && !hasValidateCode;
115+
const shouldShowLoginForm = !shouldShowAnotherLoginPageOpenedMessage && !hasLogin && !hasValidateCode;
119116
const shouldShowEmailDeliveryFailurePage = hasLogin && hasEmailDeliveryFailure && !shouldShowChooseSSOOrMagicCode && !shouldInitiateSAMLLogin;
120117
const shouldShowSMSDeliveryFailurePage = !!(hasLogin && hasSMSDeliveryFailure && !shouldShowChooseSSOOrMagicCode && !shouldInitiateSAMLLogin && account?.accountExists);
121118
const isUnvalidatedSecondaryLogin = hasLogin && !isPrimaryLogin && !isAccountValidated && !hasEmailDeliveryFailure && !hasSMSDeliveryFailure;

0 commit comments

Comments
 (0)