Different behavior of auth0-spa-js in Incognito Chrome?

Hello, I’ve built a simple login APP following this tutorial Auth0 JavaScript SDK Quickstarts: Login with @auth0/auth0-spa-js version 2.1.3. This app can recognize whether the user is authenticated or not, then it updates the UI accordingly.

I tried this app with Google Chrome. If I’m already logged in, the app updates its UI and shows my user profile, as expected. The same happens if I refresh the app page.

I tried with the Incognito mode as well, but the app behavior is different. All works fine until the first login. In this case, when I refresh the page after the login, the app doesn’t detect that I’m logged in anymore. If I press login again, I’m redirected to Auth0. This time, I’m not prompted for username and password (since I’m logged in!), and finally I’m redirected back to the app page that now understands that I’m logged in. If I press refresh again, the problem happens again.

This issue looks related to the incognito mode, but I can’t understand why. Looking forward to your help.

Thanks!

Hi @iset !

Thanks for posting!

This is related to authentication cookies availability under incognito mode. Could you verify if third party cookies are blocked while on the incognito mode in your browser? ( chrome://settings/cookies )

1 Like

Hi @marcelina.barycka! Yep, you are right. I can confirm that third party cookies are blocked. Thank you very much for your explanation!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.