From ec6c5ab488bfcf744f1fa5fe9d889a302c130e94 Mon Sep 17 00:00:00 2001 From: Jan Nowakowski Date: Thu, 7 May 2026 10:58:58 +0200 Subject: [PATCH] Preserve information about saml session when loging out previous user --- src/pages/LogOutPreviousUserPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/LogOutPreviousUserPage.tsx b/src/pages/LogOutPreviousUserPage.tsx index 251beda95043..ec7160977b0e 100644 --- a/src/pages/LogOutPreviousUserPage.tsx +++ b/src/pages/LogOutPreviousUserPage.tsx @@ -26,7 +26,7 @@ function LogOutPreviousUserPage({route}: LogOutPreviousUserPageProps) { const [session] = useOnyx(ONYXKEYS.SESSION); const [account] = useOnyx(ONYXKEYS.ACCOUNT); const isAccountLoading = account?.isLoading; - const {authTokenType, shortLivedAuthToken = '', exitTo} = route?.params ?? {}; + const {authTokenType, shortLivedAuthToken = '', exitTo, isSAML} = route?.params ?? {}; useEffect(() => { const sessionEmail = session?.email; @@ -57,7 +57,7 @@ function LogOutPreviousUserPage({route}: LogOutPreviousUserPageProps) { // Even if the user was already authenticated in NewDot, we need to reauthenticate them with shortLivedAuthToken, // because the old authToken stored in Onyx may be invalid. - signInWithShortLivedAuthToken(shortLivedAuthToken); + signInWithShortLivedAuthToken(shortLivedAuthToken, !!isSAML); // We only want to run this effect once on mount (when the page first loads after transitioning from OldDot) // eslint-disable-next-line react-hooks/exhaustive-deps