Showing
1 changed file
with
1 additions
and
1 deletions
@@ -120,7 +120,7 @@ export class VAxios { | @@ -120,7 +120,7 @@ export class VAxios { | ||
120 | if (userStore && userStore.jwtToken) { | 120 | if (userStore && userStore.jwtToken) { |
121 | try { | 121 | try { |
122 | const res = jwt_decode(userStore.jwtToken) as JwtModel; | 122 | const res = jwt_decode(userStore.jwtToken) as JwtModel; |
123 | - const currentTime = new Date().getTime() / 1000; | 123 | + const currentTime = (new Date().getTime() + (config.timeout || 0)) / 1000; |
124 | if (currentTime >= res.exp && this.isNeedTokenURL(config.url)) { | 124 | if (currentTime >= res.exp && this.isNeedTokenURL(config.url)) { |
125 | await this.refreshTokenBeforeReq(userStore.doRefresh); | 125 | await this.refreshTokenBeforeReq(userStore.doRefresh); |
126 | } | 126 | } |