completionId: cgen-a24837f6b41847acab05e6def167c408

cgen-a24837f6b41847acab05e6def167c408
This commit is contained in:
Builder.io 2025-11-10 02:52:14 +00:00
parent 371aaba38a
commit 27695fe46b

View file

@ -168,12 +168,13 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
let sessionRestored = false;
// Add timeout to ensure loading doesn't get stuck
// Increased from 3s to 5s to allow more time for session restoration after OAuth
const loadingTimeout = setTimeout(() => {
console.log("Auth loading timeout - forcing loading to false");
if (!sessionRestored) {
setLoading(false);
}
}, 3000);
}, 5000);
if (!storageClearedRef.current && typeof window !== "undefined") {
try {