Skip to content

Commit

Permalink
fix(auth): logout not working, logs you back in again
Browse files Browse the repository at this point in the history
Closes SWAP-3018
  • Loading branch information
Jekabs Karklins authored and Jekabs Karklins committed Feb 16, 2023
1 parent 43cb770 commit c792f9f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,11 @@ export const UserContextProvider: React.FC = (props): JSX.Element => {
SettingsId.EXTERNAL_AUTH_LOGOUT_URL
)?.settingsValue;
clearSession();
dispatch({ type: ActionType.LOGOFFUSER, payload: null });
if (logoutUrl) {
window.location.assign(logoutUrl);
} else {
// if there is no logout url, just clear the user context
dispatch({ type: ActionType.LOGOFFUSER, payload: null });
}
});
}
Expand Down

0 comments on commit c792f9f

Please sign in to comment.