Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong redirect after login #3701

Merged
merged 5 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ All notable changes to the Wazuh app project will be documented in this file.
- Fixing double flyout clicking in a policy [#3676](https://github.com/wazuh/wazuh-kibana-app/pull/3676)
- Fixed error conflict setting kibana settings from the health check [#3678](https://github.com/wazuh/wazuh-kibana-app/pull/3678)
- Fixed compatibility to get the valid index patterns and refresh fields for Kibana 7.10.2-7.13.4 [3681](https://github.com/wazuh/wazuh-kibana-app/pull/3681)
- Fixed wrong redirect after login [3701](https://github.com/wazuh/wazuh-kibana-app/pull/3701)
- Fixed error getting the index pattern data when there is not `attributes.fields` in the saved object [3689](https://github.com/wazuh/wazuh-kibana-app/pull/3698)

## Wazuh v4.2.4 - Kibana 7.10.2, 7.11.2, 7.12.1 - Revision 4205
Expand Down
5 changes: 3 additions & 2 deletions public/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ app.run([
* Set trigger for logout
*/
app.run(function ($rootElement) {
$rootElement.append(`
$rootElement.append(`
<div>
<div class="wazuhNotReadyYet"></div>
<div ng-view class="mainView"></div>
Expand All @@ -111,6 +111,7 @@ app.run(function ($rootElement) {
// Add plugin help links as extension to Kibana help menu
addHelpMenuToAppChrome();


const urlToLogout = window.location.origin + '/logout';

// Bind deleteExistentToken on Log out component.
Expand All @@ -129,7 +130,7 @@ app.run(function ($rootElement) {
console.error('[ERROR] - User token could not be deprecated - ', err);
})
.finally(() => {
window.location.replace(urlToLogout);
window.location = urlToLogout;
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion public/react-services/wz-authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class WzAuthentication {
*/
static async deleteExistentToken() {
try {
const response = await WzRequest.apiReq('DELETE', '/security/user/authenticate', {});
const response = await WzRequest.apiReq('DELETE', '/security/user/authenticate', {delay: 5000});

return ((response || {}).data || {}).data || {};
} catch (error) {
Expand Down