# Authenticated browser session and new tabs in incognito mode

**URL:** <https://community.auth0.com/t/authenticated-browser-session-and-new-tabs-in-incognito-mode/64535>\
**Category:** Get Help\
**Created:** [June 15, 2021, 3:54pm UTC](https://community.auth0.com/t/authenticated-browser-session-and-new-tabs-in-incognito-mode/64535 "2021-06-15T15:54:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joseph4](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joseph4/32/12921_2.png) [@joseph4](https://community.auth0.com/u/joseph4)\
**Post date:** [June 15, 2021, 3:54pm UTC](https://community.auth0.com/t/authenticated-browser-session-and-new-tabs-in-incognito-mode/64535/1 "2021-06-15T15:54:22Z")

</div>

When logged into our app in Incognito / Private mode or using privacy addons such as Privacy Badger, new tabs opened with composed URL’s in the same browser session goes through part of the authentication process e.g. authorize and code and kicks the user to the landing page.

The session is clearly active and valid as the user doesn’t have to login again.

Is there some setting or workaround in code to prevent the re-authentication / refresh process or redirect the user to the URL path once this process is complete?

Example:

1. Logged into app in Incognito window
2. Open a tab to [https://myapp.com/path?query=value](https://myapp.com/path?query=value)
3. Authorizes and redirects user to [https://myapp.com](https://myapp.com) instead

Thanks.

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [June 15, 2021, 4:14pm UTC](https://community.auth0.com/t/authenticated-browser-session-and-new-tabs-in-incognito-mode/64535/3 "2021-06-15T16:14:45Z")

</div>

Hi @joseph4,

Would you mind providing details on which Auth0 SDK you are using (e.g. `auth0-react`)?

It sounds like the tokens might be stored in app memory, which is the default and recommended approach ([Token Storage](https://auth0.com/docs/security/data-security/token-storage#browser-in-memory-scenarios)).

> The in-memory method for browser storage **does not** provide persistence across page refreshes and browser tabs.

---

<div class="post-metadata">

**Author:** ![joseph4](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joseph4/32/12921_2.png) [@joseph4](https://community.auth0.com/u/joseph4)\
**Post date:** [June 15, 2021, 5:57pm UTC](https://community.auth0.com/t/authenticated-browser-session-and-new-tabs-in-incognito-mode/64535/4 "2021-06-15T17:57:55Z")

</div>

Hi,

Yes we’re using auth0-react. I suppose then going with local storage would be a viable solution as per the provided link?

Thanks.

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [June 15, 2021, 6:00pm UTC](https://community.auth0.com/t/authenticated-browser-session-and-new-tabs-in-incognito-mode/64535/5 "2021-06-15T18:00:07Z")

</div>

Yes, if you add `cacheLocation="localstorage"` to the `Auth0Provider` component, the session should persist in different tabs. Also note the security considerations with using local storage in the docs.

---

<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:** [June 30, 2021, 6:00pm UTC](https://community.auth0.com/t/authenticated-browser-session-and-new-tabs-in-incognito-mode/64535/6 "2021-06-30T18:00:54Z")

</div>

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