react-query-auth
react-query-auth copied to clipboard
After logged in when user Referesh the page useAuth dont have user info
Hi team, Can anyone help me with useAuth user info? After successfully logging in if the user refreshes browser user info from useAUth got null, it tried to fetch new info from API in that case user logged in, and the user can not stay logged in that case. though we already have token/ user info in our session storage it will return null. I tied to access useAuth at top-level routes where I am rending routes based on user info if it null It will redirect to login page So basically I got logged out when I refresh the page. but the same user auth can have user info inside protected routes.
Hi @marxyes ,
Can you create a reproducible codesandbox or add your configuration here so I can take a look at it in more detail?