'redirect_uri' parameter must be a Login redirect URI error only appears when I'm not logged into the developer console

When I try my oauth link and I’m logged into okta, everything works fine, but when I log out of okta, I get this error. I’m having trouble finding anyone who’s run into this, so I’m wondering if someone would be able to help out. Thanks so much.

Hi @aurelio.rama,

Can you let us know if you are using a sdk/widget (which version ?) or the oidc endpoints directly in your application ?

If you are able to capture the request that throws this error, please create a support case to Okta with the network logs and error screen shot for further assistance.

I’m using the oidc endpoints directly. So here’s my oauth link (I’ve sanitized some of the information).

https://dev-XXXXX.okta.com/oauth2/v1/authorize?idp=XXXX&client_id=XXXXXX&response_type=code&response_mode=fragment&scope=openid email phone profile &redirect_uri=https://{myUrl}/account/postauthorization&state=n10603y&nonce=localSecure

This request gets redirected to

In the meantime, I’ve opened a case per your request.

Thanks for the details, @aurelio.rama.

Could you make sure the url passed in the redirect_uri is also configured under LoginRedirectUri in the client application in okta ? Also, make sure you configure this url as a Trusted Origin under Security->API->Trusted Origin and ‘Redirect’ is checked.