isAuthenticated is not behaving as expected

Hi,I am using auth0/auth0-react and using the useAuth0 hook that returns isAuthenticated. Right now in localhost (http://localhost) I get this weird behaviour that when I am authenticated (isAuthenticated flag is true) and I reload, the isAuthenticated flag will show False (which redirects me to loginWithRedirect in my application). But this is not happening in another environment (stage envirnoment, not http://localhost), where isAuthenticated is always True even after refreshing the page. Is there a different treatment of the authentication if the host is localhost? This localhost is not built react application and not https vs stage build stage is build and https

Does anyone know how to fix this or a workaround, would be much appreciated.

Versions: “@auth0/auth0-react”: “^1.8.0”,

1 Like