chore: Pass sso_account_id to select the account during SSO Login (#4103)

This commit is contained in:
Pranav Raj S 2022-03-03 20:49:51 +05:30 committed by GitHub
parent 11adfd2384
commit 9583a2dbad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 61 additions and 9 deletions

View file

@ -38,13 +38,15 @@ export const setAuthCredentials = response => {
setUser(response.data.data, expiryDate);
};
export const clearBrowserSessionCookies = () => {
Cookies.remove('auth_data');
Cookies.remove('user');
};
export const clearCookiesOnLogout = () => {
window.bus.$emit(CHATWOOT_RESET);
window.bus.$emit(ANALYTICS_RESET);
Cookies.remove('auth_data');
Cookies.remove('user');
clearBrowserSessionCookies();
const globalConfig = window.globalConfig || {};
const logoutRedirectLink =
globalConfig.LOGOUT_REDIRECT_LINK || frontendURL('login');