Unable to make authorize request in postman

Can please somebody help me? I have struggled with this problem for a long time and I don’t seem to go even a step forward.
Those are my app settings in okta admin:
Login redirect URIs
http://localhost:8080/login/oauth2/code/okta
https://oidcdebugger.com/debug
Logout redirect URIs
Login initiated by
App Only
Initiate login URI
http://localhost:8080/login/oauth2/code/okta

those are my settings in my spring boot app:
okta:
oauth2:
client-id: xxx
client-secret: xxxx
issuer: https://dev-933944.okta.com/oauth2/default
redirect-uri: /login/oauth2/code/okta

when I try to specify the full redirect_uri in my spring boot app, it doesn’t work, I get this error:
The ‘redirect_uri’ parameter must be an absolute URI that is whitelisted in the client app settings.

with these settings I can access my spring boot app rest api from the browser, log in with the okta login dialog and receive results.

However when I try to use postman and the authorize method, whether I enter http://localhost:8080/login/oauth2/code/okta or /login/oauth2/code/okta the call always fails with the wrong redirect_uri and even though I set the parameter to prompt=none, I always get a html response which is mega frustrating.

when I use the oidcdebugger.com webpage, the call works but only when I enter as redirect_uri. when I enter the second one, I always get the same redirect_uri error.

any idea what might be wrong?

The initiate login URI should be something more like http://localhost:8080. As far as the login redirect URI, that’s created and handled by Spring Security so it should always be something like http://localhost:8080/login/oauth2/code/okta or http://your.production.domain/login/oauth2/code/okta.

If you want to use Postman, you’ll need to get an access token from oidcdebugger.com, then send it in your request in an Authorization header. Or you could try communicating directly with Okta to get an access token rather than talking to your Spring Boot app.

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