feat: update session management to prioritize cookie storage and enhance token retrieval logic

This commit is contained in:
estifanos
2026-08-01 07:52:46 +00:00
parent d16d9840ba
commit 5a95358ea0
3 changed files with 7 additions and 7 deletions

View File

@@ -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;