1) Log in to Routed, i.e. as an EMS user and end up at /ems in the URL path
2) Manually edit the url in the browser bar to remove the path and just go to /
3) Observe: app redirects to /login even though user is already logged in, and a blank screen is shown
When a hard refresh/reload of the webapp occurs, the starting state of the auth context is "not logged in", i.e. user is undefined/null, until the app has a chance to hit /api/users/me and verify that the user is logged in and get that data. Meanwhile, the app redirects to /login, but once the user is loaded, the /login route is conditionally excluded, so there's no route match and the app displays an empty page.
Reproduce:
1) Log in to Routed, i.e. as an EMS user and end up at
/ems
in the URL path 2) Manually edit the url in the browser bar to remove the path and just go to/
3) Observe: app redirects to/login
even though user is already logged in, and a blank screen is shownWhen a hard refresh/reload of the webapp occurs, the starting state of the auth context is "not logged in", i.e.
user
is undefined/null, until the app has a chance to hit/api/users/me
and verify that the user is logged in and get that data. Meanwhile, the app redirects to/login
, but once the user is loaded, the/login
route is conditionally excluded, so there's no route match and the app displays an empty page.