Fix: Synchronize loading state for initial session

This commit is contained in:
gpt-engineer-app[bot]
2025-10-13 17:02:40 +00:00
parent daf4f6bf19
commit 8b54a2303b

View File

@@ -199,6 +199,8 @@ function AuthProviderComponent({ children }: { children: React.ReactNode }) {
setSession(session);
setUser(session.user);
sessionVerifiedRef.current = true;
// Keep loading true until profile is fetched (same as SIGNED_IN)
setLoading(true);
} else {
authLog('[Auth] INITIAL_SESSION with no user - setting loading to false');
setSession(null);