User loading issue
germanamz opened this issue · 1 comments
germanamz commented
When loading a session from a subdomain useStytchUser
has not finished loading the user but its isInitialized
flag is true
and the user
prop is null
. This makes harder to detect when the user is actually authenticated or not. I believe adding a isLoading
flag will be helpful for these situations.
Example:
Having two apps,
A) The Authentication app that handles stytch flows
B) The business logic app
Steps:
- App B redirect to App A to authenticate
- App A authenticates the user and redirects back to App B
- When stytch is loading
isInitialized
first isfalse
after some time it changes totrue
butuser
is stillnull
.
germanamz commented
This only happens one time after authentication