Fix: Resolve authentication state recognition issues

This commit is contained in:
gpt-engineer-app[bot]
2025-10-11 00:54:27 +00:00
parent 9c5487baff
commit 06ed528d76
4 changed files with 24 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ class AuthStorage {
localStorage.removeItem('__supabase_test__');
this.storage = localStorage;
this.storageType = 'localStorage';
console.log('[AuthStorage] Using localStorage');
console.log('[AuthStorage] Using localStorage');
} catch {
// Try sessionStorage as fallback
try {
@@ -22,11 +22,12 @@ class AuthStorage {
sessionStorage.removeItem('__supabase_test__');
this.storage = sessionStorage;
this.storageType = 'sessionStorage';
console.log('[AuthStorage] localStorage blocked, using sessionStorage');
console.warn('[AuthStorage] localStorage blocked, using sessionStorage ⚠️');
} catch {
// Use in-memory storage as last resort
this.storageType = 'memory';
console.log('[AuthStorage] Both localStorage and sessionStorage blocked, using in-memory storage');
console.error('[AuthStorage] Both localStorage and sessionStorage blocked, using in-memory storage');
console.error('[AuthStorage] Sessions will NOT persist across page reloads!');
}
}
}