Skip to content

Commit 1fa8b1f

Browse files
authored
UI: remove stored token if cluster needs init (#26985)
1 parent c6af47f commit 1fa8b1f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

changelog/26985.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
ui: Prevent perpetual loading screen when Vault needs initialization
3+
```

ui/app/routes/vault/cluster.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ export default Route.extend(ModelBoundaryRoute, ClusterRoute, {
123123
afterModel(model, transition) {
124124
this._super(...arguments);
125125
this.currentCluster.setCluster(model);
126+
if (model.needsInit && this.auth.currentToken) {
127+
// clear token to prevent infinite load state
128+
this.auth.deleteCurrentToken();
129+
}
126130

127131
// Check that namespaces is enabled and if not,
128132
// clear the namespace by transition to this route w/o it

0 commit comments

Comments
 (0)