# Okta login Redirected too many times

**URL:** <https://devforum.okta.com/t/okta-login-redirected-too-many-times/4322>\
**Category:** Questions\
**Created:** [February 26, 2019, 9:57am UTC](https://devforum.okta.com/t/okta-login-redirected-too-many-times/4322 "2019-02-26T09:57:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aqbytecorp](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@aqbytecorp](https://devforum.okta.com/u/aqbytecorp)\
**Post date:** [February 26, 2019, 9:57am UTC](https://devforum.okta.com/t/okta-login-redirected-too-many-times/4322/1 "2019-02-26T09:57:45Z")

</div>

I am following this tutorial: [https://developer.okta.com/blog/2018/07/19/simple-crud-react-and-spring-boot](https://developer.okta.com/blog/2018/07/19/simple-crud-react-and-spring-boot)

My app is split into two separate projects client and server. My server (spring-boot) runs on port 8080 whilst, client (react app) runs on 3000.

My redirect url is set to: [http://localhost:8080/auth/callback](http://localhost:8080/auth/callback).

Whenever I sign into my app, I can see that authorisation is successful, then after that it displays the error " **localhost** redirected you too many times".

Having a look at the Networks tab in chrome dev tools, I can see three different request url repeatedly:

1st url: [https://XXX.okta.com/oauth2/default/v1/authorize?response\_type=code&client\_id=XXXXXXXXXXX&scope=openid+email+profile&state=XXXXXXXXXXX%3D&redirect\_uri=http%3A%2F%2Flocalhost%3A8080%2Fauth%2Fcallback](https://XXX.okta.com/oauth2/default/v1/authorize?response_type=code&client_id=XXXXXXXXXXX&scope=openid+email+profile&state=XXXXXXXXXXX%3D&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fauth%2Fcallback)

2nd url: [http://localhost:8080/auth/callback?code=xxxxxxxxx&state=xxxxxxxxxxxx%3D](http://localhost:8080/auth/callback?code=xxxxxxxxx&state=xxxxxxxxxxxx%3D)

3rd url: [http://localhost:8080/oauth2/authorization/okta](http://localhost:8080/oauth2/authorization/okta)

---

<div class="post-metadata">

**Author:** ![pgarg](https://avatars.discourse-cdn.com/v4/letter/p/e9c0ed/32.png) [@pgarg](https://devforum.okta.com/u/pgarg)\
**Post date:** [June 16, 2020, 12:32pm UTC](https://devforum.okta.com/t/okta-login-redirected-too-many-times/4322/2 "2020-06-16T12:32:01Z")

</div>

I am new to Okta and facing the same issue.  
Its keeps redirecting to [http://localhost:8080/oauth2/authorization/okta](http://localhost:8080/oauth2/authorization/okta)

**[dev-845301.okta.com](http://dev-845301.okta.com)** redirected you too many times.

- [Try clearing your cookies](https://support.google.com/chrome?p=rl_error&hl=en-GB).

ERR\_TOO\_MANY\_REDIRECTS

And Then it says

## Login with OAuth 2.0

[authorization\_request\_not\_found]

[https://dev-845301.okta.com/oauth2/default](http://localhost:8080/oauth2/authorization/okta)

Anyone , anyidea ?

---

<div class="post-metadata">

**Author:** ![dharm](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@dharm](https://devforum.okta.com/u/dharm)\
**Post date:** [February 13, 2021, 7:51am UTC](https://devforum.okta.com/t/okta-login-redirected-too-many-times/4322/3 "2021-02-13T07:51:06Z")

</div>

Hi @pgarg @aqbytecorp , I also started trying spring security with Okta oauth2 login and I am facing the same issue, Were you able to resolve ? How?  
your help would be appreciated.

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [January 26, 2024, 7:25pm UTC](https://devforum.okta.com/t/okta-login-redirected-too-many-times/4322/4 "2024-01-26T19:25:56Z")

</div>

Closed on January 26, 2024, 7:25pm UTC


