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