Logout Redirect URI is origin even if a logout uri is specified

HI all,
I am using the Okta Auth JavaScript SDK and when I call the signOut method I am being redirected to the window.location.origin. This throws a 400 error, bad request because that uri is not defined in my app settings.

I have a logout uri defined in the admin panel for the application:
image

In my url I am seeing this: post_logout_redirect_uri=http%3A%2F%2F127.0.0.1%3A5502

The Sign-in uri is working fine and the origin is whitelisted.

What else do I need to do to make this redirect navigate properly?

You need to have the absolute uri for the sign-out redirect uri added to the app in Okta. If your app is passing http://127.0.0.1:5502 as the post_logout_redirect_uri, you need to add that as a “Sign-out redirect URI”

Hmm ok, so I can’t have it redirect to the above uri? - “http://127.0.0.1:5502/okta-pkce-type/logout.html” It has to be the origin?

You can have it redirect there, you just need to pass that value as the post_logout_redirect_uri when your application makes the /logout redirect

This worked for me, thanks again!

1 Like

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