completionId: cgen-a24837f6b41847acab05e6def167c408
cgen-a24837f6b41847acab05e6def167c408
This commit is contained in:
parent
371aaba38a
commit
27695fe46b
1 changed files with 2 additions and 1 deletions
|
|
@ -168,12 +168,13 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
|
||||||
let sessionRestored = false;
|
let sessionRestored = false;
|
||||||
|
|
||||||
// Add timeout to ensure loading doesn't get stuck
|
// 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(() => {
|
const loadingTimeout = setTimeout(() => {
|
||||||
console.log("Auth loading timeout - forcing loading to false");
|
console.log("Auth loading timeout - forcing loading to false");
|
||||||
if (!sessionRestored) {
|
if (!sessionRestored) {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
}, 3000);
|
}, 5000);
|
||||||
|
|
||||||
if (!storageClearedRef.current && typeof window !== "undefined") {
|
if (!storageClearedRef.current && typeof window !== "undefined") {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue