feat(auth): remove all old localstorage if no session

This commit is contained in:
2025-03-17 16:16:06 -05:00
parent e258aaead9
commit 8fb06c71d3
4 changed files with 44 additions and 16 deletions

View File

@@ -17,6 +17,16 @@ const fetchSession = async () => {
});
// console.log(res);
if (!res.ok) {
localStorage.removeItem("auth_token");
// remove these for a while if no session just until fully to 2.0 and clearly no one has ran lstv1 in a long time
localStorage.removeItem("ally-supports-cache");
localStorage.removeItem("auth-storage");
localStorage.removeItem("nextauth.message");
localStorage.removeItem("prod");
localStorage.removeItem("cards");
localStorage.removeItem("rememberMe");
localStorage.removeItem("username");
throw new Error("Session not found");
}