@stemy/ngx-utils 19.5.0 → 19.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2913,10 +2913,10 @@ class BaseHttpService {
|
|
|
2913
2913
|
const authKey = "Authorization";
|
|
2914
2914
|
// If we use token auth
|
|
2915
2915
|
if (this.client.renewTokenFunc && headers.has(authKey)) {
|
|
2916
|
-
const currentTime =
|
|
2916
|
+
const currentTime = Date.now() + 60_000;
|
|
2917
2917
|
const userTokenTime = this.getUserTokenTime() || currentTime;
|
|
2918
|
-
// And the
|
|
2919
|
-
if (currentTime
|
|
2918
|
+
// And the stored token expiration time is almost ended
|
|
2919
|
+
if (currentTime >= userTokenTime) {
|
|
2920
2920
|
this.client.renewTokenFunc();
|
|
2921
2921
|
}
|
|
2922
2922
|
}
|