Skip to content

Commit

Permalink
Testing new logout
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudmanic committed Nov 13, 2024
1 parent d93bc1d commit 7c4a6e9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/utils/auth/logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ import { STORAGE_KEY_USERNAME } from 'src/utils/constants'

const logout = async (AuthUser) => {

Check failure on line 6 in src/utils/auth/logout.js

View workflow job for this annotation

GitHub Actions / test

'AuthUser' is defined but never used
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')

console.log('testing....')

Check failure on line 15 in src/utils/auth/logout.js

View workflow job for this annotation

GitHub Actions / test

Unexpected console statement

// Must do this last, as it will cause the page to reload.
// await AuthUser.signOut()

return true
} catch (e) {
logger.error(e)
Expand Down

0 comments on commit 7c4a6e9

Please sign in to comment.