Custom login redirect_uri error

Hi Team,

Its regarding the project on https://github.com/okta/samples-java-spring/tree/master/custom-login

I have imported the above project and made necessary changes related to my Okta tenant. When I run this project its server was up and I’m able to access the home page where it shows Login button, after clicking the login button its redirects to below url where its throws 400 bad request.

https://{myOrg}/oauth2/default/v1/authorize?client_id={client_id}&redirect_uri=http://localhost:8080/authorization-code/callback&response_type=code&scope=openid&state=uCoy3S

Error code: invalid_request
Error msg: “The reditect_uri must be an absolute URI that is whitelisted in the client app settings”

attached screenshots for reference.

Please help.

What that is saying is in your application settings inside of the Developer console, you need to go to the application settings and set a whitelisted redirect uri. see below.

Make sure in the highlighted field, you have http://localhost:8080/authorization-code/callback set

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.