Skip to content

Commit 4defa10

Browse files
Tosttigithub-actions[bot]
authored andcommitted
change function to get the path programatically (#4815)
* change function to get the path programatically * update changelog (cherry picked from commit 72ba21a)
1 parent 7926004 commit 4defa10

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ All notable changes to the Wazuh app project will be documented in this file.
2727
- Fixed persistence of the plugin registry file between updates [#4359](https://github.com/wazuh/wazuh-kibana-app/pull/4359)
2828
- Fixed searchbar error on SCA Inventory table [#4367](https://github.com/wazuh/wazuh-kibana-app/pull/4367)
2929
- Fixed a routes loop when reinstalling Wazuh indexer [#4373](https://github.com/wazuh/wazuh-kibana-app/pull/4373)
30+
- Fixed issue when logging out from Wazuh when SAML is enabled [#4815](https://github.com/wazuh/wazuh-kibana-app/issues/4815)
3031

3132
# Removed
3233

public/app.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ app.run(['$rootElement', function ($rootElement) {
107107
// Add plugin help links as extension to plugin platform help menu
108108
addHelpMenuToAppChrome();
109109

110-
111-
const urlToLogout = getHttp().basePath.prepend('/logout');
112-
113110
// Bind deleteExistentToken on Log out component.
114111
$('.euiHeaderSectionItem__button, .euiHeaderSectionItemButton').on('mouseleave', function () {
115112
// opendistro
@@ -119,14 +116,14 @@ app.run(['$rootElement', function ($rootElement) {
119116
// x-pack
120117
$('a:contains(Log out)').on('click', function (event) {
121118
// Override href's behaviour and navigate programatically
122-
// to '/logout' once the token has been deleted.
119+
// to the logout path once the token has been deleted.
123120
event.preventDefault();
124121
WzAuthentication.deleteExistentToken()
125122
.catch((err) => {
126123
console.error('[ERROR] - User token could not be deprecated - ', err);
127124
})
128125
.finally(() => {
129-
window.location = urlToLogout;
126+
window.location = event.currentTarget.href;
130127
});
131128
});
132129
});

0 commit comments

Comments
 (0)