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

**URL:** <https://devforum.okta.com/t/facing-error-too-many-redirects-while-trying-to-login-with-authorization-code-flow/9787>\
**Category:** Questions\
**Created:** [June 16, 2020, 3:47pm UTC](https://devforum.okta.com/t/facing-error-too-many-redirects-while-trying-to-login-with-authorization-code-flow/9787 "2020-06-16T15:47:48Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![bdemers](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/bdemers/32/23_2.png) [@bdemers](https://devforum.okta.com/u/bdemers)\
**Post date:** [June 17, 2020, 4:57pm UTC](https://devforum.okta.com/t/facing-error-too-many-redirects-while-trying-to-login-with-authorization-code-flow/9787/4 "2020-06-17T16:57:20Z")

</div>

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](https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html#Proxies) )

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!

---

_[View the full topic](https://devforum.okta.com/t/facing-error-too-many-redirects-while-trying-to-login-with-authorization-code-flow/9787)._
