You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I just use Browser history router, it works well.
But if I refresh the browser the example code not work, because #setState() methods called 3 times.
First on initial rendering, second on toggleLoading(), and finally on fetchSuccess()/ Fail().
The UserInfo is null when initial rendering, so the example code trigger redirection to login url.
I think some other property is required that distinguish between initial rendering and the last rendering to solve this problem.
Thanks.
The text was updated successfully, but these errors were encountered:
Very useful component, thank you.
In the Redirection example on the Readme Doc,
https://github.com/hasura/react-check-auth#3-redirect-not-logged-in-users-to-login
If I just use Browser history router, it works well.
But if I refresh the browser the example code not work, because #setState() methods called 3 times.
First on initial rendering, second on toggleLoading(), and finally on fetchSuccess()/ Fail().
The UserInfo is null when initial rendering, so the example code trigger redirection to login url.
I think some other property is required that distinguish between initial rendering and the last rendering to solve this problem.
Thanks.
The text was updated successfully, but these errors were encountered: