400 Bad request redirect uri on 'http://Asplap1608.Aspiresys.com:18077' but works on different url 'https://platform.boomi.com/account/asystemconsultingpte-41FMS/oauth2/callback'

Hi all,

I am building a gateway authentication using Okta. http://Asplap1608.Aspiresys.com:18077 is the portal url where I have to setup authentication using Okta. When authorization request is send, it gives 400 bad request saying ‘The ‘redirect_uri’ parameter must be a Login redirect URI in the client app settings:’. I am attaching the authorize request URL here. ‘https://dev-58123126.okta.com/oauth2/default/v1/authorize?client_id=0oafborn69v91e65d7&redirect_uri=http://asplap1608.aspiresys.com:18077&response_type=code&scope=openid%20email%20profile&state=46045126003814644’. I have configured this URL as sign in redirect URI in client app settings. Not sure why is this error. But when I use a diff URL like https://platform.boomi.com/account/asystemconsultingpte-41FMS/oauth2/callback it succeeds. Is there some conventions followed in redirect URI. Because I see a similar post resolved this issue using different URL. Or if https is the issue, I am facing same problem in production where https is used.

Please help me find a solution for this. Thanks in advance.

Regards,
Varsha.

Okta does not support dynamic port numbers in redirect_uris and you may be running into this if you have omitted the port number when configuring the app in Okta. You must add each potential redirect_uri as an allowed Sign-in redirect URIs within Okta and ensure that any redirect_uri you provide exactly matches one of the allowed redirect URIs for the application to avoid this error

Thanks Andrea. It is resolved. It is not the port number causing problem. Missed the case sensitivity in the URL. Changed the url to ‘http://asplap1608.aspiresys.com:18077’ and it worked.

1 Like

Oh nice! Glad to hear it was an easy solution.

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