Logout Redirect not working after setting URIs in portal

I have been working on implementing logout functionality for an app that was setup a couple years ago. The login has been working without issue for some time, and it looked like the only issue for logging out was not having a proper logout redirect URI set in the admin portal for the app integration.

Currently, to sign users out I am opening the following URL in the mobile app’s browser:

This will successfully sign the user out, but it will not redirect back to the application. Instead it redirects to the following url: Euro Garages America - Sign In

After doing some googling, it looked like this was the default redirect used when a logout redirect URI was not set in the app integration. Thus, I reached out to our sys admin to have the redirect URIs from login mirrored under logout since they worked without issue for logging in. Here is a screenshot for reference:

However when trying to navigate to the logout endpoint using the following, https://eg-america.oktapreview.com/oauth2/v1/logout?id_token_hint={id_token}&post_logout_redirect_uri=exp://localhost:19000/+expo-auth-session, I recieve this error in my mobile application. (I blurred out my client_id but can provide it if needed)

I just wanted to check if I was missing any configuration changes that were required in the app integration, unfortunately our initial implementation of this whole authorization process was not really documented. Apologies in advance if any of that is confusing, and thanks for any help!

Hi @mmendes do you have any luck if you urlencode the post_logout_redirect_uri in the /logout request? Perhaps the literal ‘+’ may be causing an issue.

1 Like

Hey there, thanks for reaching out!

Ended up solving this a little while ago; I think the issue ended up just being that our sys admin had to set up a trusted origin for expo (see screenshot).

Not 100% sure if that was the only adjustment needed, but wanted to include it here in case anyone else runs into similar issues.

1 Like

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