Skip to content

Commit 2a6a028

Browse files
authored
UI: show banner when batch token expired (#26396) (#26433)
* allow token expiry for batch token * add changelog
1 parent 7834ccf commit 2a6a028

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

changelog/26396.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:improvement
2+
ui: show banner instead of permission denied error when batch token is expired
3+
```

ui/app/services/auth.js

+5
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ export default Service.extend({
285285

286286
if (resp.renewable) {
287287
assign(data, this.calculateExpiration(resp));
288+
} else if (resp.type === 'batch') {
289+
// if it's a batch token, it's not renewable but has an expire time
290+
// so manually set tokenExpirationEpoch and allow expiration
291+
data.tokenExpirationEpoch = new Date(resp.expire_time).getTime();
292+
this.set('allowExpiration', true);
288293
}
289294

290295
if (!data.displayName) {

0 commit comments

Comments
 (0)