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:
- Log in to the Keycloak admin console.
- Click on the "Clients" menu item and select the client that represents your Odoo application.
- Click on the "Logout" tab and make a note of the "Logout URL" value.
- In Odoo, navigate to the authentication provider settings (either auth_keycloak or auth_oidc) and find the option to configure a logout URL.
- 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.