Open
Description
Environment
No response
Reproduction
No response
Describe the bug
With enableRefreshPeriodically
enabled, while the session is being fetched the authenticated state is set to "loading"
. This means that when the middleware check happens, since it checks for the state to be "authenticated"
, it gets treated as the user is unauthenticated while the data is being fetched.
If the user attempts to navigate to another page, during the time the session is in the process of being re-fetched, they are sent to the login page.
Additional context
No response
Logs
No response