fix: always call fetchMe() on mount — loading:true blocked initial auth check

This commit is contained in:
Vadym Samoilenko 2026-03-23 14:37:10 +00:00
parent 15bf9d3935
commit dc1add0b1b

View file

@ -24,7 +24,7 @@ function AuthGate({ children }: { children: React.ReactNode }) {
const acquire = async () => {
// Dev mode: skip MSAL, just call /auth/me directly
if (import.meta.env.DEV || accounts.length === 0) {
if (!user && !loading) fetchMe()
if (!user) fetchMe()
return
}
try {