From e12f7bcc1f1b88ae754354ee147cb5391cfdd047 Mon Sep 17 00:00:00 2001 From: Spicer Matthews Date: Tue, 12 Nov 2024 20:49:07 -0800 Subject: [PATCH] Testing new logout --- src/utils/auth/logout.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/utils/auth/logout.js b/src/utils/auth/logout.js index 6d765c1b..5ebe56c8 100644 --- a/src/utils/auth/logout.js +++ b/src/utils/auth/logout.js @@ -5,11 +5,19 @@ import { STORAGE_KEY_USERNAME } from 'src/utils/constants' const logout = async (AuthUser) => { try { - await AuthUser.signOut() - // Clear the cache so it does not contain any authed content. await clearAllServiceWorkerCaches() await localStorageMgr.removeItem(STORAGE_KEY_USERNAME) + + // Clear cookie for tabV4OptIn + await localStorageMgr.removeItem('tabV4OptIn') + + // eslint-disable-next-line no-alert + alert('testing....') + + // Must do this last, as it will cause the page to reload. + await AuthUser.signOut() + return true } catch (e) { logger.error(e)