# Login redirect with infinite loop

**URL:** <https://community.auth0.com/t/login-redirect-with-infinite-loop/101807>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [March 4, 2023, 2:31pm UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807 "2023-03-04T14:31:00Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![edinson.martinez](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@edinson.martinez](https://community.auth0.com/u/edinson.martinez)\
**Post date:** [March 4, 2023, 2:31pm UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/1 "2023-03-04T14:31:00Z")

</div>

Hi everyone, I hope you are okay.

I’m having the same issue than this topic: [Authorization\_code grant](https://community.auth0.com/t/authorization-code-grant/38800)

I don’t know why, The account handles two tenants, the production one with same settings is okay, but the dev one isn’t. I hope you can help me, because this is preventing us user creation normally, for creating users we need to go to machine to machine application and set token endpoint to POST instead of NONE, and after creating the user we need to set it back to NONE for login and this is really annoying because we have the client app ready for a normal operation, not this, and for creating users I need to do it to the backend level. Please help with this.

---

<div class="post-metadata">

**Author:** ![edinson.martinez](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@edinson.martinez](https://community.auth0.com/u/edinson.martinez)\
**Post date:** [March 8, 2023, 3:47pm UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/2 "2023-03-08T15:47:35Z")

</div>

This topic is unsolved, why nobody is answering to this? None of the answer in this forum solves this.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [March 9, 2023, 10:12am UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/3 "2023-03-09T10:12:54Z")

</div>

Hey there!

It seems like there were some people in the past looking for the similar thing. Did you have a chance to review those solutions?

- [App infinitely redirecting after login - #7 by stephanie.chamblee](https://community.auth0.com/t/app-infinitely-redirecting-after-login/62798/7)
- [App infinitely redirecting after login ReactJS {PLEASE HELP}](https://community.auth0.com/t/app-infinitely-redirecting-after-login-reactjs-please-help/87782)
- [Redirect Loop after Authentication](https://community.auth0.com/t/redirect-loop-after-authentication/88507)

---

<div class="post-metadata">

**Author:** ![edinson.martinez](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@edinson.martinez](https://community.auth0.com/u/edinson.martinez)\
**Post date:** [March 9, 2023, 6:07pm UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/4 "2023-03-09T18:07:09Z")

</div>

Thanks for your answer.

I’ve checked all answer, nothing has changed, the application still redirecting. And the weird thing here is that we have a production environment running without this issue. Same branch deployed, so I know is not a code issue.

---

<div class="post-metadata">

**Author:** ![erick](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@erick](https://community.auth0.com/u/erick)\
**Post date:** [March 9, 2023, 8:47pm UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/5 "2023-03-09T20:47:40Z")

</div>

Up for this topic. I’m having the same issue since the beginning of this week. In my case this is happening for a specific user, when I tried with others It works as expected - It’s worth saying I also have multiple environments, the issue doesn’t happen on live as I’m able to login with my user perfectly however It doesn’t work in my local env.  
The issue “seems” related to the other links Konrad shared - I’m checking if one of these can help me to find a solution but nothing so far.

---

<div class="post-metadata">

**Author:** ![edinson.martinez](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@edinson.martinez](https://community.auth0.com/u/edinson.martinez)\
**Post date:** [March 16, 2023, 7:05am UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/6 "2023-03-16T07:05:21Z")

</div>

somebody is thinking about this topic or do I have to talk to my team and just leave the project because you’re not giving any solution to this?

---

<div class="post-metadata">

**Author:** ![shanif-locusive](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shanif-locusive/32/46964_2.png) [@shanif-locusive](https://community.auth0.com/u/shanif-locusive)\
**Post date:** [May 6, 2023, 4:58pm UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/7 "2023-05-06T16:58:31Z")

</div>

For what it’s worth, I’ve now started having the same issue

---

<div class="post-metadata">

**Author:** ![edinson.martinez](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@edinson.martinez](https://community.auth0.com/u/edinson.martinez)\
**Post date:** [May 9, 2023, 6:01pm UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/8 "2023-05-09T18:01:58Z")

</div>

Did you get some solution about this? This guy @konrad.sopala told me “send a dm” but until now I have no answer, not even telling me, hey I won’t help you

---

<div class="post-metadata">

**Author:** ![shanif-locusive](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shanif-locusive/32/46964_2.png) [@shanif-locusive](https://community.auth0.com/u/shanif-locusive)\
**Post date:** [May 9, 2023, 6:11pm UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/9 "2023-05-09T18:11:52Z")

</div>

I ended up figuring it out. I was using a call to get an access token silently, and while I was properly specifying the audience I needed for that call, I wasn’t doing it in the `Auth0ProviderWithNavigate` file, so I had to add the audience to the Auth0 Provider like this:

```auto
<Auth0Provider
            domain={domain}
            clientId={clientId}
            cacheLocation="localstorage"
            authorizationParams={{
                audience: process.env.REACT_APP_API_SERVICE_AUDIENCE, // I had to add this
                redirect_uri: redirectUri,
            }}
            onRedirectCallback={onRedirectCallback}
        >
            {children}
        </Auth0Provider>

```

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 10, 2023, 8:50am UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/10 "2023-05-10T08:50:55Z")

</div>

Glad you tackled it and thanks for sharing with the rest of community!

---

<div class="post-metadata">

**Author:** ![edinson.martinez](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@edinson.martinez](https://community.auth0.com/u/edinson.martinez)\
**Post date:** [May 10, 2023, 3:10pm UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/11 "2023-05-10T15:10:35Z")

</div>

@konrad.sopala What about the configuration I sent you? I’m still waiting your answer and shanif solution is not my solution yet

---

<div class="post-metadata">

**Author:** ![arun.karthick](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/arun.karthick/32/48796_2.png) [@arun.karthick](https://community.auth0.com/u/arun.karthick)\
**Post date:** [July 24, 2023, 8:43pm UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/12 "2023-07-24T20:43:21Z")

</div>

Hi @edinson.martinez , If you’re facing this issue on one particular machine and not in all other machines, It could be due to incorrect system time configuration. We faced a similar infinite loop issue on one machine where the system time wasn’t configured correctly.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 3, 2024, 9:04pm UTC](https://community.auth0.com/t/login-redirect-with-infinite-loop/101807/13 "2024-07-03T21:04:06Z")

</div>


