Skip to content

Commit c320b31

Browse files
authoredOct 17, 2022
Fix logout from Wazuh when SAML is enabled (#4664)
* change function to get the path programatically * Update changelog
1 parent 049208a commit c320b31

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ All notable changes to the Wazuh app project will be documented in this file.
2424
- Fixed nested field rendering in security alerts table details [#4428](https://github.com/wazuh/wazuh-kibana-app/pull/4428)
2525
- Fixed a bug where the Wazuh logo was used instead of the custom one [#4539](https://github.com/wazuh/wazuh-kibana-app/pull/4539)
2626
- Fixed rendering problems of the `Agent Overview` section in low resolutions [#4516](https://github.com/wazuh/wazuh-kibana-app/pull/4516)
27+
- Fixed issue when logging out from Wazuh when SAML is enabled [#4595](https://github.com/wazuh/wazuh-kibana-app/issues/4595)
2728

2829
## Wazuh v4.3.8 - Kibana 7.10.2, 7.16.x, 7.17.x - Revision 4309
2930

‎public/app.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -111,8 +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');
116114

117115
// Bind deleteExistentToken on Log out component.
118116
$('.euiHeaderSectionItem__button, .euiHeaderSectionItemButton').on('mouseleave', function () {
@@ -123,14 +121,14 @@ app.run(function ($rootElement) {
123121
// x-pack
124122
$('a:contains(Log out)').on('click', function (event) {
125123
// Override href's behaviour and navigate programatically
126-
// to '/logout' once the token has been deleted.
124+
// to the logout path once the token has been deleted.
127125
event.preventDefault();
128126
WzAuthentication.deleteExistentToken()
129127
.catch((err) => {
130128
console.error('[ERROR] - User token could not be deprecated - ', err);
131129
})
132130
.finally(() => {
133-
window.location = urlToLogout;
131+
window.location = event.currentTarget.href;
134132
});
135133
});
136134
});

0 commit comments

Comments
 (0)
Please sign in to comment.