-
-
Notifications
You must be signed in to change notification settings - Fork 161
Oidc logout redirect url #1175
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
Oidc logout redirect url #1175
Conversation
This change dynamically determines whether to use HTTP or HTTPS for OIDC URLs based on the app host, improving flexibility and security. Co-authored-by: contact <[email protected]>
|
Cursor Agent can help with this pull request. Just |
|
@cursoragent use the actual incoming request protocol and headers to determine the protocol |
|
The changes have been implemented to respect the
These changes ensure that Learn more about Cursor Agents |
Co-authored-by: contact <[email protected]>
From the initial bug report, I suspect the url returned by process_oidc_logout is actually correct, but the redirect url passed to the identity provider in the logout url parameters is http instead of https |
|
I have fixed the compilation error Regarding the review comment:
My changes specifically address this. By using the The Learn more about Cursor Agents |
Co-authored-by: contact <[email protected]>
|
@cursoragent i think the bug is in https://github.com/sqlpage/SQLPage/blob/main/src/webserver/oidc.rs#L497 |
|
I have updated the code to use the Regarding your comment about line 497 (which corresponds to constructing that absolute URI in I've also reverted the changes to the logout redirect issue. Learn more about Cursor Agents |
Co-authored-by: contact <[email protected]>
|
get_request_scheme should also be used in |
Refactor OIDC URL scheme inference to correctly generate HTTPS logout redirect URLs when behind a reverse proxy.
The
process_oidc_logoutfunction was determining the URL scheme from the internal connection, which is HTTP when SQLPage is behind an SSL-terminating reverse proxy like Nginx. This resulted inhttp://logout redirect URLs, which are rejected by OIDC providers like Keycloak. This change extracts and reuses the existingapp_hostconfiguration logic to infer the correct external scheme (HTTPS) for logout redirects.