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

**URL:** <https://community.auth0.com/t/different-behavior-of-auth0-spa-js-in-incognito-chrome/124037>\
**Category:** Get Help\
**Tags:** application, sso\
**Created:** [January 3, 2024, 9:45am UTC](https://community.auth0.com/t/different-behavior-of-auth0-spa-js-in-incognito-chrome/124037 "2024-01-03T09:45:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iset](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@iset](https://community.auth0.com/u/iset)\
**Post date:** [January 3, 2024, 9:45am UTC](https://community.auth0.com/t/different-behavior-of-auth0-spa-js-in-incognito-chrome/124037/1 "2024-01-03T09:45:54Z")

</div>

Hello, I’ve built a simple login APP following this tutorial [Auth0 JavaScript SDK Quickstarts: Login](https://auth0.com/docs/quickstart/spa/vanillajs/01-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!

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [January 3, 2024, 3:44pm UTC](https://community.auth0.com/t/different-behavior-of-auth0-spa-js-in-incognito-chrome/124037/3 "2024-01-03T15:44:34Z")

</div>

Hi @iset !

Thanks for posting!

> [@iset](#):
>
> 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.

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` )

 ![image](https://global.discourse-cdn.com/auth0/original/3X/5/0/5036d2a59a276963f999cf0d5efe7fdf351db394.png)

---

<div class="post-metadata">

**Author:** ![iset](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@iset](https://community.auth0.com/u/iset)\
**Post date:** [January 3, 2024, 3:50pm UTC](https://community.auth0.com/t/different-behavior-of-auth0-spa-js-in-incognito-chrome/124037/4 "2024-01-03T15:50:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 17, 2024, 3:51pm UTC](https://community.auth0.com/t/different-behavior-of-auth0-spa-js-in-incognito-chrome/124037/5 "2024-01-17T15:51:14Z")

</div>

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