From c80913947045e8dbe9d4fb940b3d103e3feaee06 Mon Sep 17 00:00:00 2001 From: SmartUp Developer Date: Sun, 17 May 2026 13:01:53 +0800 Subject: [PATCH] fix: authStorage key depends on pathname, F5 refresh logs out location.pathname changes between /login and /upstreams, causing different localStorage keys. Use static 'smartup' instead. --- frontend/src/authStorage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/authStorage.ts b/frontend/src/authStorage.ts index 2ef7087..e8d487b 100644 --- a/frontend/src/authStorage.ts +++ b/frontend/src/authStorage.ts @@ -1,4 +1,4 @@ -const appKey = import.meta.env.VITE_APP_KEY || location.pathname.replace(/\W+/g, '_') || 'smartup' +const appKey = import.meta.env.VITE_APP_KEY || 'smartup' const prefix = `smartup_${appKey}` export const authStorageKeys = {