auth0 / auth0-react

Auth0 SDK for React Single Page Applications (SPA)
MIT License
891 stars 259 forks source link

Can't stay isAuthenticated=true in Google Incognito Mode #804

Open pureJim opened 2 months ago

pureJim commented 2 months ago

Checklist

Description

In a specific environment: the computer CPU uses AMD and the browser is in Chrome Incognito mode

When I use const { isAuthenticated } = useAuth0();, it will repeatedly return false even after logging in. I call loginWithRedirect() through polling, and it returns true to me on the fourth render.

Reproduction

  1. Use a computer with AMD CPU
  2. Enable Chrome Incognito Mode
    useEffect(() => {
    //...
    if (isAuthenticated) {
    setIsLogin(true);
    getIdTokenClaims()
      .then((tokenRst) => {
        // setToken(tokenRst?.__raw || '');
      })
      .catch(() => {
        // clearStore();
      });
    } else if (!isAuthenticated && !isLoading) {
    loginWithRedirect();
    }
    //...
    },[deps])

Additional context

No response

auth0-react version

2.2.1

React version

18.2.0

Which browsers have you tested in?

Chrome