Okta login Redirected too many times

I am following this tutorial: 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.

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

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

3rd url: http://localhost:8080/oauth2/authorization/okta

1 Like

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

dev-845301.okta.com redirected you too many times.


And Then it says

Login with OAuth 2.0



Anyone , anyidea ?