# Auth0-react in incognito mode running infinite redirect loop

**URL:** <https://community.auth0.com/t/auth0-react-in-incognito-mode-running-infinite-redirect-loop/96918>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, auth0-react, login-experience\
**Created:** [December 21, 2022, 5:52pm UTC](https://community.auth0.com/t/auth0-react-in-incognito-mode-running-infinite-redirect-loop/96918 "2022-12-21T17:52:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shahar.s](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shahar.s/32/35131_2.png) [@shahar.s](https://community.auth0.com/u/shahar.s)\
**Post date:** [December 21, 2022, 5:52pm UTC](https://community.auth0.com/t/auth0-react-in-incognito-mode-running-infinite-redirect-loop/96918/1 "2022-12-21T17:52:56Z")

</div>

Hey,  
I’m using auth0-react in my website and I’m running into an infinite redirect loop when trying to access it from incognito or Safari. After investigation, I understand that it is due to blocking 3rd party cookies. My auth0 domain is not a custom one, it’s a “[myapp.auth0.com](http://myapp.auth0.com)” domain.

I read [this troubleshoot](https://auth0.com/docs/troubleshoot/authentication-issues/renew-tokens-when-using-safari#itp-and-browser-behavior) from your website and I tried changing the Auth0Provider code to use refresh tokens and saving the cache in the localstorage, but it did not work.

Here’s my Auth0Provider code:

```auto
<Auth0Provider
  domain={AUTH0_DOMAIN}
  audience={`https://${AUTH0_DOMAIN}/api/v2/`}
  clientId={AUTH0_CLIENT_ID}
  onRedirectCallback={onRedirectCallback}
  redirectUri={`${window.origin}/`}
  cacheLocation="localstorage"
  useRefreshTokens
>

```

Do you have any suggestion on how I can make incognito & Safari logins work, preferably without changing to a custom subdomain?

---

<div class="post-metadata">

**Author:** ![dgeo](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@dgeo](https://community.auth0.com/u/dgeo)\
**Post date:** [April 18, 2023, 8:02pm UTC](https://community.auth0.com/t/auth0-react-in-incognito-mode-running-infinite-redirect-loop/96918/2 "2023-04-18T20:02:34Z")

</div>

hey, I am running into the same issue. Did you find a solution?

---

<div class="post-metadata">

**Author:** ![alex.brett](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alex.brett/32/60157_2.png) [@alex.brett](https://community.auth0.com/u/alex.brett)\
**Post date:** [December 4, 2024, 7:22pm UTC](https://community.auth0.com/t/auth0-react-in-incognito-mode-running-infinite-redirect-loop/96918/3 "2024-12-04T19:22:32Z")

</div>

Hello @shahar.s!

I found a related post that gives a solution to the infinite loop problem. It has links to a few others so if be sure to check those out if the initial post doesn’t solve the issue.

I hope this helps!

Best,  
Alex

---

<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:** [December 18, 2024, 7:22pm UTC](https://community.auth0.com/t/auth0-react-in-incognito-mode-running-infinite-redirect-loop/96918/4 "2024-12-18T19:22:59Z")

</div>

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