Follow the steps below to configure Single Logout (SLO) between your Drupal site and Keycloak:
1. Update the Logout URL in the Drupal miniOrange OAuth Client module Configuration
- Navigate to the miniOrange OAuth Client module configuration.
- Go to the Client Settings tab of your App Client configuration.
- Scroll down to the Logout Settings section.
- Enable the Single Logout checkbox.
- In the IdP Session Logout Endpoint URL field, add your provider’s logout URL. (http://{keycloak-server}/realms/{realm-name}/protocol/openid-connect/logout)
- Check the box “Include ID Token in End Session Endpoint”.
2. Update Logout Settings in Keycloak
- Log in to your Keycloak Admin Console.
- Navigate to your client configuration (the client representing your Drupal site).
- Scroll down to the field Valid Post Logout Redirect URIs.
- Add your Drupal site Base URL
- Save the configuration.
3. Test the SLO Flow
- Log in via Keycloak SSO.
- Log out from Drupal and confirm that the session is terminated both in Drupal and Keycloak.
- Verify that you are redirected correctly after logout.
You have now successfully set up Single Logout (SLO) between Drupal and Keycloak.
If you encounter any issues, please feel free to reach out to us at drupalsupport@xecurify.com.