I wanted to ask if there is a way to logout from keycloak
via a single http request.
I already tried to POST /protocol/openid-connect/logout
or /tokens/logout
, but the result is always a ORIGIN-Problem.
But the calling ORIGIN is configured in keycloak and the login with a request works.
Any chance here to logout without redirecting or open another window?
Best regards and thanks! :)
From the official documentation:
You can log out of a web application in multiple ways. For Java EE servlet containers, you can call
HttpServletRequest.logout()
.For other browser applications, you can redirect the browser to
http://auth-server/auth/realms/{realm-name}/protocol/openid-connect/logout?redirect_uri=encodedRedirectUri
, which logs you out if you have an SSO session with your browser.
To get the exact URL of the app (host, realm and redirect_uri configuration):