Skip to content

Commit c262600

Browse files
authored
Merge pull request #89894 from software-mansion-labs/jnowakow/fix-saml-slo-once-again
Preserve information about saml session when loging out previous user
2 parents 4e710ae + ec6c5ab commit c262600

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/LogOutPreviousUserPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function LogOutPreviousUserPage({route}: LogOutPreviousUserPageProps) {
2626
const [session] = useOnyx(ONYXKEYS.SESSION);
2727
const [account] = useOnyx(ONYXKEYS.ACCOUNT);
2828
const isAccountLoading = account?.isLoading;
29-
const {authTokenType, shortLivedAuthToken = '', exitTo} = route?.params ?? {};
29+
const {authTokenType, shortLivedAuthToken = '', exitTo, isSAML} = route?.params ?? {};
3030

3131
useEffect(() => {
3232
const sessionEmail = session?.email;
@@ -57,7 +57,7 @@ function LogOutPreviousUserPage({route}: LogOutPreviousUserPageProps) {
5757

5858
// Even if the user was already authenticated in NewDot, we need to reauthenticate them with shortLivedAuthToken,
5959
// because the old authToken stored in Onyx may be invalid.
60-
signInWithShortLivedAuthToken(shortLivedAuthToken);
60+
signInWithShortLivedAuthToken(shortLivedAuthToken, !!isSAML);
6161

6262
// We only want to run this effect once on mount (when the page first loads after transitioning from OldDot)
6363
// eslint-disable-next-line react-hooks/exhaustive-deps

0 commit comments

Comments
 (0)