mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 17:11:13 -05:00
Fix: Resolve authentication state recognition issues
This commit is contained in:
@@ -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!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user