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

CreateEndSessionUrl extra parameters? #440

Open
RsZoli opened this issue Jul 11, 2024 · 2 comments
Open

CreateEndSessionUrl extra parameters? #440

RsZoli opened this issue Jul 11, 2024 · 2 comments

Comments

@RsZoli
Copy link

RsZoli commented Jul 11, 2024

I need to pass the "client_id" to Keycloak logout endpoint for the function to work, however i see no option, to provide extra parameters to the LogoutRequest object!

The RequestUrlExtension does include it though:

public static string CreateEndSessionUrl(this RequestUrl request, string? idTokenHint = null, string? postLogoutRedirectUri = null, string? state = null, Parameters? extra = null) { Parameters parameters = new Parameters(); parameters.AddOptional("id_token_hint", idTokenHint); parameters.AddOptional("post_logout_redirect_uri", postLogoutRedirectUri); parameters.AddOptional("state", state); return request.Create(parameters.Merge(extra)); }

However the function in the AuthorizeClient does not provide a way to pass it:

internal string CreateEndSessionUrl(string endpoint, LogoutRequest request) { _logger.LogTrace("CreateEndSessionUrl"); return new RequestUrl(endpoint).CreateEndSessionUrl(request.IdTokenHint, _options.PostLogoutRedirectUri, request.State); }

Please, help me solve this, thank you!

@zbellerose
Copy link

zbellerose commented Jul 17, 2024

I am also running into the same issue with Azure not redirecting after logout, and I believe it is due to the fact I am not passing the client_id in the endpoint.

@RsZoli have you found a solution to this?

edit: I confirmed this was not the case. Unsure why it's not redirecting now, but I don't believe it's an issue with this.

@RsZoli
Copy link
Author

RsZoli commented Jul 17, 2024

@zbellerose Sadly, no! I'm still waiting for the answer here, however if i manually alter the URL generated by the client, the redirect is working for me!

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

No branches or pull requests

2 participants