diff --git a/CHANGELOG.md b/CHANGELOG.md index c3c87ba4a9..f715d32008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ All notable changes to the Wazuh app project will be documented in this file. - Improved Agents Overview performance [#4363](https://github.com/wazuh/wazuh-kibana-app/pull/4363) - Fixed a bug where the Wazuh logo was used instead of the custom one [#4539](https://github.com/wazuh/wazuh-kibana-app/pull/4539) - Fixed rendering problems of the `Agent Overview` section in low resolutions [#4516](https://github.com/wazuh/wazuh-kibana-app/pull/4516) +- Fixed issue when logging out from Wazuh when SAML is enabled [#4595](https://github.com/wazuh/wazuh-kibana-app/issues/4595) ## Wazuh v4.3.8 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4309 diff --git a/public/app.js b/public/app.js index 5509c868b0..39da7fc8e5 100644 --- a/public/app.js +++ b/public/app.js @@ -107,8 +107,6 @@ app.run(['$rootElement', function ($rootElement) { // Add plugin help links as extension to plugin platform help menu addHelpMenuToAppChrome(); - - const urlToLogout = getHttp().basePath.prepend('/logout'); // Bind deleteExistentToken on Log out component. $('.euiHeaderSectionItem__button, .euiHeaderSectionItemButton').on('mouseleave', function () { @@ -119,14 +117,14 @@ app.run(['$rootElement', function ($rootElement) { // x-pack $('a:contains(Log out)').on('click', function (event) { // Override href's behaviour and navigate programatically - // to '/logout' once the token has been deleted. + // to the logout path once the token has been deleted. event.preventDefault(); WzAuthentication.deleteExistentToken() .catch((err) => { console.error('[ERROR] - User token could not be deprecated - ', err); }) .finally(() => { - window.location = urlToLogout; + window.location = event.currentTarget.href; }); }); });