fix: call fetchMe after token acquire regardless of loading state
loading starts as true in the store, so the previous condition `!user && !loading` prevented fetchMe from ever being called after the Azure AD redirect — causing a permanent Loading spinner. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
08710e1a16
commit
0b2b61ee2d
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ function AuthGate({ children }: { children: React.ReactNode }) {
|
|||
scopes: ['openid', 'profile', 'email'],
|
||||
})
|
||||
setToken(result.idToken)
|
||||
if (!user && !loading) fetchMe()
|
||||
if (!user) fetchMe()
|
||||
} catch {
|
||||
instance.loginRedirect({ scopes: ['openid', 'profile', 'email'] })
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue