mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 01:32:33 +00:00
UI: Redirect after logging in from token expiry (#25335)
* Redirect after logging in from token expiry. Fixes #10963 * Add changelog
This commit is contained in:
3
changelog/25335.txt
Normal file
3
changelog/25335.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:improvement
|
||||
ui: redirect back to current route after reauthentication when token expires
|
||||
```
|
||||
@@ -10,7 +10,13 @@
|
||||
Your auth token expired on
|
||||
{{date-format @expirationDate "MMMM do yyyy, h:mm:ss a"}}. You will need to re-authenticate.
|
||||
</A.Description>
|
||||
<A.Link::Standalone @icon="arrow-right" @iconPosition="trailing" @text="Reauthenticate" @route="vault.cluster.logout" />
|
||||
<A.Link::Standalone
|
||||
@icon="arrow-right"
|
||||
@iconPosition="trailing"
|
||||
@text="Reauthenticate"
|
||||
@route="vault.cluster.logout"
|
||||
@query={{this.queryParams}}
|
||||
/>
|
||||
</Hds::Alert>
|
||||
{{else}}
|
||||
<section class="section">
|
||||
|
||||
@@ -36,6 +36,11 @@ export default class TokenExpireWarning extends Component {
|
||||
yield this.handleRenew();
|
||||
}
|
||||
|
||||
get queryParams() {
|
||||
// Bring user back to current page after login
|
||||
return { redirect_to: this.router.currentURL };
|
||||
}
|
||||
|
||||
get showWarning() {
|
||||
const currentRoute = this.router.currentRouteName;
|
||||
if ('vault.cluster.oidc-provider' === currentRoute) {
|
||||
|
||||
Reference in New Issue
Block a user