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

fix: Keycloak Authentication logout error with keycloak 18 or newer #5513

Closed

Conversation

aurorasmiles
Copy link

As described in #5213 trying to log-out when using the keycloak authentication strategy and Logout from Keycloak on Logout enabled you will currently receive an Invalid parameter: redirect_uri error in keycloak, making logout essentially useless.
As described in the discussion linked above and in https://www.keycloak.org/docs/latest/upgrading/index.html#openid-connect-logout the ideal solution would be to use an id_token_hint together with post_logout_redirect_uri in the logout request to achieve a seamless logout.
I was however not sure how to get that ID Token in the logout function, so I went with the second option to restore logout functionality.
This temporarly adds an additional step for the user having to seperately click on "Logout" in keycloak and doesn't redirect the user back to the wiki, which isn't ideal, but IMO better than having no logout at all.

@auto-assign auto-assign bot requested a review from NGPixel August 1, 2022 10:08
@FR-ADDIX
Copy link

FR-ADDIX commented Nov 9, 2022

If your application directly uses links to logout endpoint with the redirect_uri parameter, you may be required to change this as described above. Consider either removing the redirect_uri parameter entirely or replacing it with the id_token_hint and post_logout_redirect_uri parameters.

https://www.keycloak.org/2022/04/keycloak-1800-released

@aurorasmiles
Copy link
Author

Not really sure what your comment mentions that I don't already mention in the PR text

@aurorasmiles
Copy link
Author

Superseded by #5878

@aurorasmiles aurorasmiles deleted the fix/keycloak-v18-logout branch January 29, 2023 17:10
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