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!