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.
This commit is contained in:
SmartUp Developer
2026-05-17 13:01:53 +08:00
parent 84b714ced3
commit c809139470
+1 -1
View File
@@ -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 = {