-
Notifications
You must be signed in to change notification settings - Fork 55
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
CORS issue while logging out from OAuth2/OIDC provider configured in Spring #2858
Comments
The default What we need for the logout button is a navigation to the provider's logout page. |
We could make |
So far, the implementation of the Normally, a logout URL for an OIDC provider contains some sort of token to identify the user which should be logged out (in case of key-cloak it is called What I tried was to let the The alternatives could be:
|
The first alternative seems to be the way. |
Describe the bug
A CORS issue happens in the preflight request when using a fetch request while logging out from OAuth2/OIDC provider configured in Spring.
An example of the issue:
fetch
request to/logout
(Spring’s default logout handler) setting Spring’s CRSF token/logout
handler redirects to the provider's RP-Initiated logout endpoint (different host) and the preflight request fails since the customx-csrf-token
header is not allowed by the provider.Expected-behavior
The application should be redirected to the expected logout success URI without issues.
Could the
fetch
request handle the redirect and redirect the user to the provider's RP-Initiated logout endpoint?Reproduction
logout()
method to logout the userSystem Info
Hilla 24.5.0
The text was updated successfully, but these errors were encountered: