Fixed auth not removing session token.

This commit is contained in:
Tom Butcher 2025-08-30 23:39:01 +01:00
parent 71c83f6147
commit c38ed74f21

View File

@ -209,7 +209,12 @@ const AuthProvider = ({ children }) => {
}, [token]) }, [token])
const setUnauthenticated = () => { const setUnauthenticated = () => {
setAuthenticated(false) setToken(null)
setExpiresAt(null)
setUserProfile(null)
sessionStorage.removeItem('authToken')
sessionStorage.removeItem('authExpiresAt')
sessionStorage.removeItem('user')
setShowUnauthorizedModal(true) setShowUnauthorizedModal(true)
} }