Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post-logout redirect support #244

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

omon77
Copy link

@omon77 omon77 commented Oct 31, 2024

This PR adds support for auto-redirecting the user after signing out of STS, if the client has PostLogoutRedirectUri configured.
Resolves issue #226 .

@omon77
Copy link
Author

omon77 commented Nov 1, 2024

Due to Duende.IdentityServer project switching from MVC to Razor Pages, it didn't make sense to try to retrofit just the post-logout redirect changes.

Perhaps it would be a good idea to catch up STS project to Razor Pages as original project transitioned to them with v6.0.0.

@skoruba
Copy link
Owner

skoruba commented Nov 1, 2024

Hi @omon77 - I fully agree with you, I have not had a time to do it. Can you help me with this migration from MVC to Razor Pages for STS?
Thanks!

@omon77
Copy link
Author

omon77 commented Nov 1, 2024

Might be a while, but I can give it a shot...

I added an issue/enhancement request #245 so that it can be tracked...

@apetrut
Copy link
Contributor

apetrut commented Dec 11, 2024

@omon77 @skoruba The PostLogoutRedirectUri is always empty even if I set it up in the [ClientPostLogoutRedirectUris] db table. Did you experience the same issue?

Also, what if I want to pass a different logout redirect uri based on the environment I am running in? The Duende instance is the same, but it's being called from dev and prod environments separately and each is having its own redirect uri.

@omon77
Copy link
Author

omon77 commented Dec 11, 2024

@omon77 @skoruba The PostLogoutRedirectUri is always empty even if I set it up in the [ClientPostLogoutRedirectUris] db table. Did you experience the same issue?

Also, what if I want to pass a different logout redirect uri based on the environment I am running in? The Duende instance is the same, but it's being called from dev and prod environments separately and each is having its own redirect uri.

@apetrut ,
This PR should solve the client's post logout uri being empty, even though populated in config table.

As for different logout uris, wouldn't having a different client per logical environment, solve it? Or if you have to have only one client, specify all post logout uris. If the one requested by the logout process matches, the redirect will work.

@apetrut
Copy link
Contributor

apetrut commented Dec 11, 2024

@omon77 It turns out that I had to specify the redirect uri in this format: http://[subdomain].[domain]/signout-callback-oidc and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants