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

UI: Automatically refresh page on logout #12035

Merged
merged 8 commits into from Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/12035.txt
@@ -0,0 +1,3 @@
```release-note:bug
ui: Automatically refresh the page when user logs out
```
5 changes: 3 additions & 2 deletions ui/app/routes/vault/cluster/logout.js
Expand Up @@ -16,14 +16,15 @@ export default Route.extend(ModelBoundaryRoute, {
}),

beforeModel() {
let authType = this.auth.getAuthType();
const authType = this.auth.getAuthType();
const baseUrl = window.location.origin;
this.auth.deleteCurrentToken();
this.controlGroup.deleteTokens();
this.namespaceService.reset();
this.console.set('isOpen', false);
this.console.clearLog(true);
this.flashMessages.clearMessages();
this.permissions.reset();
this.replaceWith('vault.cluster.auth', { queryParams: { with: authType } });
hashishaw marked this conversation as resolved.
Show resolved Hide resolved
location.assign(`${baseUrl}/ui/vault/auth?with=${authType}`);
},
});