mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
feat: update session management to prioritize cookie storage and enhance token retrieval logic
This commit is contained in:
@@ -14,7 +14,7 @@ const TOKEN_STORAGE_KEYS = [
|
||||
] as const;
|
||||
|
||||
export function resolveTokenFromStorage(): string | undefined {
|
||||
// cookie first (backoffice stores tokens there), then localStorage (portal / legacy)
|
||||
// cookie first, then localStorage (legacy pre-migration sessions)
|
||||
for (const key of TOKEN_STORAGE_KEYS) {
|
||||
const cookie = Cookies.get(key);
|
||||
if (cookie) return cookie;
|
||||
|
||||
Reference in New Issue
Block a user