Files
SmartUp/frontend/src/authStorage.ts
T
SmartUp Developer c809139470 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.
2026-05-17 13:01:53 +08:00

8 lines
184 B
TypeScript

const appKey = import.meta.env.VITE_APP_KEY || 'smartup'
const prefix = `smartup_${appKey}`
export const authStorageKeys = {
token: `${prefix}_token`,
email: `${prefix}_email`,
}