Facing error too many redirects while trying to login with Authorization code flow

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.

ERR_TOO_MANY_REDIRECTS

And Then it finally redirects to another screen with below message

Login with OAuth 2.0

[authorization_request_not_found]

https://dev-845301.okta.com/oauth2/default

Anyone , anyidea ?

It looks like you’re using Spring Boot for your app. This video shows you how to add auth code flow to a Spring Boot app.

Thanks for sharing this video.
Yes Exactly what I did, strange thing is same application is working fine when I am using in on my personal Laptop but over the VPN behind the proxy I am getting this error.
Is there anything the above issue may be caused by proxy or something.

When I saw the network logs on chrome it keeps on redirecting me back to http://localhost:8080/oauth2/authorization/okta
and finally end up on.
http://localhost:8080/login?error with message Authorization_request_not_found

Hi @pgarg!

I’ve seen this type of issue a few times when the last leg of the OAuth dance failed for some reason (configuration or connection errors).

The last step involves your backend application contacting Okta in order to verify a code.
This means your application MUST be able to make an outbound request. Typically this means setting the https.proxyHost and https.proxyPort (for more details take a look at the Java networking docs )

A few companies have very restrictive firewalls, that block outbound requests that do not come from a browser (or clients configured with a PAC file). If you fall into this camp check with your network admin.

Keep us posted!