Skip to content

Commit

Permalink
merge Session key updates
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Sep 10, 2021
1 parent 9e4565f commit 1d3369d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/libs/actions/SignInRedirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ function redirectToSignIn(errorMessage) {
if (preferredLocale) {
Onyx.set(ONYXKEYS.NVP_PREFERRED_LOCALE, preferredLocale);
}
if (errorMessage) {
Onyx.set(ONYXKEYS.SESSION, {error: errorMessage});
}
if (activeClients && activeClients.length > 0) {
Onyx.set(ONYXKEYS.ACTIVE_CLIENTS, activeClients);
}

// We must set the authToken to null so that signOut action is triggered across other clients
// https://github.com/Expensify/App/issues/4971#issuecomment-916101493
Onyx.set(ONYXKEYS.SESSION, {authToken: null});
const session = {
// We must set the authToken to null so that signOut action is triggered across other clients
// https://github.com/Expensify/App/issues/4971#issuecomment-916101493
authToken: null,
};
if (errorMessage) {
session.error = errorMessage;
}
Onyx.merge(ONYXKEYS.SESSION, session);
});
}

Expand Down

0 comments on commit 1d3369d

Please sign in to comment.