Skip to Content
Menu
This question has been flagged
2 Replies
5771 Views

i have successfully integrated keycloak with odoo with the apps auth_keycloak and the auth_oidc but i have the same problem in those two applications:

The problem is that i can't logout from Keycloak, when i logged in odoo account using Keycloak, but when i logout its just from odoo server and the session still opens in Keycloak when i try to log in again it opens automatically without inputs.

If there is a solution it can help me ...


Thanks

Avatar
Discard
Author Best Answer

Thanks for your reply.

But there is no  "Logout" tab in Keycloak client interface and in those apps there is no configuration about the logout URL.

Thanks again

Avatar
Discard
Best Answer

The issue you are facing is likely related to the Single Sign-On (SSO) functionality provided by Keycloak. When you authenticate with Keycloak using the auth_keycloak or auth_oidc module in Odoo, a session is created between Odoo and Keycloak. When you log out of Odoo, only the session with Odoo is terminated, but the session with Keycloak remains active.

To fully log out of Keycloak, you will need to terminate the session on the Keycloak server. This can be achieved by redirecting the user to the Keycloak logout endpoint when the user logs out of Odoo. The auth_keycloak and auth_oidc modules in Odoo should provide an option to configure a logout URL.

To configure the logout URL, you will need to do the following:

  1. Log in to the Keycloak admin console.
  2. Click on the "Clients" menu item and select the client that represents your Odoo application.
  3. Click on the "Logout" tab and make a note of the "Logout URL" value.
  4. In Odoo, navigate to the authentication provider settings (either auth_keycloak or auth_oidc) and find the option to configure a logout URL.
  5. Set the logout URL to the value you noted in step 3.

With this configuration in place, when a user logs out of Odoo, they will be redirected to the Keycloak logout URL, which will terminate the session on the Keycloak server and log the user out completely.

I hope this helps you resolve the issue you are facing.

Avatar
Discard