From 8b54a2303bd69d7b83a549eaa8e2b8b8ef4daf34 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 17:02:40 +0000 Subject: [PATCH] Fix: Synchronize loading state for initial session --- src/hooks/useAuth.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hooks/useAuth.tsx b/src/hooks/useAuth.tsx index d3aa4612..72056060 100644 --- a/src/hooks/useAuth.tsx +++ b/src/hooks/useAuth.tsx @@ -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);