diff --git a/apps/portal/src/features/auth/services/auth.store.ts b/apps/portal/src/features/auth/services/auth.store.ts index af1e644c..bbbb01d4 100644 --- a/apps/portal/src/features/auth/services/auth.store.ts +++ b/apps/portal/src/features/auth/services/auth.store.ts @@ -343,7 +343,15 @@ export const useAuthStore = create()( if (user) { set({ user, isAuthenticated: true, loading: false, error: null, hasCheckedAuth: true }); } else { - set({ loading: false, hasCheckedAuth: true }); + // No user data returned, clear auth state + set({ + user: null, + tokens: null, + isAuthenticated: false, + loading: false, + error: null, + hasCheckedAuth: true, + }); } } catch (error) { // Token is invalid, clear auth state