Oidc-client-js: Not being able to receive post-logout-redirect

Created on 28 Dec 2018  路  2Comments  路  Source: IdentityModel/oidc-client-js

I'm following the setup explained here to add a Javascript client using this library to connect to my IdentityServer4.

My setup is pretty similar to that, except that my JS client is a React app.

I use the UserManager class to trigger the redirect signin, process the signin callback and trigger the logout.
IdentityServer4 expects a logoutId param in their logout action endpoint. In that example, that's indeed being received correctly. But in my case, I just get null. Hence the post-logout-redirect URI cannot be retrieved.

I'm indeed setting the post_logout_redirect_uri option when initializing the UserManager.

What could be the reason that I'm not getting this if I'm just simply doing userManager.signoutRedirect();?

Not sure if it's a problem with my oidc-client or IdentityServer setup. Appreciate any guidelines!

question

Most helpful comment

IdentityServer4 logs reported "Invalid redirect URI".

The problem was that the post-logout-redirect-uri was different in the IdentitiyServer and in the UserManager. I was using http://localhost:5001 on one and http://localhost:5001/ on the other (notice the ending forward slash.

Thanks!

All 2 comments

But in my case, I just get null. Hence the post-logout-redirect URI cannot be retrieved.

Check the logs at IdentityServer to find out more.

IdentityServer4 logs reported "Invalid redirect URI".

The problem was that the post-logout-redirect-uri was different in the IdentitiyServer and in the UserManager. I was using http://localhost:5001 on one and http://localhost:5001/ on the other (notice the ending forward slash.

Thanks!

Was this page helpful?
0 / 5 - 0 ratings