Skip to content

Commit 72ba21a

Browse files
authored
change function to get the path programatically (#4815)
* change function to get the path programatically * update changelog
1 parent aaa2714 commit 72ba21a

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
@@ -111,9 +111,6 @@ app.run(function ($rootElement) {
111111
// Add plugin help links as extension to plugin platform help menu
112112
addHelpMenuToAppChrome();
113113

114-
115-
const urlToLogout = getHttp().basePath.prepend('/logout');
116-
117114
// Bind deleteExistentToken on Log out component.
118115
$('.euiHeaderSectionItem__button, .euiHeaderSectionItemButton').on('mouseleave', function () {
119116
// opendistro
@@ -123,14 +120,14 @@ app.run(function ($rootElement) {
123120
// x-pack
124121
$('a:contains(Log out)').on('click', function (event) {
125122
// Override href's behaviour and navigate programatically
126-
// to '/logout' once the token has been deleted.
123+
// to the logout path once the token has been deleted.
127124
event.preventDefault();
128125
WzAuthentication.deleteExistentToken()
129126
.catch((err) => {
130127
console.error('[ERROR] - User token could not be deprecated - ', err);
131128
})
132129
.finally(() => {
133-
window.location = urlToLogout;
130+
window.location = event.currentTarget.href;
134131
});
135132
});
136133
});

0 commit comments

Comments
 (0)