Skip to content

Commit

Permalink
return early when we've already initiated saml login
Browse files Browse the repository at this point in the history
  • Loading branch information
NikkiWines committed Nov 17, 2023
1 parent 6b5236d commit 79e89c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/signin/SAMLSignInPage/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function SAMLSignInPage({credentials}) {
}

// If the login attempt is unsuccessful, set the error message for the account and redirect to sign in page
if (searchParams.has('error')) {;
if (searchParams.has('error')) {
Session.setAccountError(searchParams.get('error'));
Navigation.navigate(ROUTES.HOME);
}
Expand Down
3 changes: 3 additions & 0 deletions src/pages/signin/SignInPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ function SignInPage({credentials, account, isInModal, activeClients, preferredLo
if (shouldInitiateSAMLLogin) {
setHasInitiatedSAMLLogin(true);
Navigation.isNavigationReady().then(() => Navigation.navigate(ROUTES.SAML_SIGN_IN));
} else if (hasInitiatedSAMLLogin) {
// Return early because we're already navigating to a different page
return;
}

let welcomeHeader = '';
Expand Down

0 comments on commit 79e89c2

Please sign in to comment.