Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pages/LogOutPreviousUserPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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, isSAML} = route?.params ?? {};
const {authTokenType, shortLivedAuthToken = '', exitTo} = route?.params ?? {};

useEffect(() => {
const sessionEmail = session?.email;
Expand Down Expand Up @@ -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, !!isSAML);
signInWithShortLivedAuthToken(shortLivedAuthToken);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve SAML context during transition reauthentication

When /transition is opened for an already-authenticated user and the deep link includes isSAML=true, this call now always reauthenticates as non-SAML because signInWithShortLivedAuthToken defaults isSAML to false. In this flow, getShortLivedLoginParams() no longer sets session.signedInWithSAML/hybridApp.signingInWithSAML, so later sign-out paths treat the session as non-SAML and skip SAML-specific logout handling. This regresses SAML account transitions specifically in LogOutPreviousUserPage.

Useful? React with 👍 / 👎.


// 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
Expand Down
Loading