eco-vue-js 0.11.36 → 0.11.37
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.
@@ -17,7 +17,7 @@ function deleteCookie(name) {
|
|
17
17
|
}
|
18
18
|
const EXP_FACTOR = 1e3;
|
19
19
|
function checkExpirationDate() {
|
20
|
-
const exp = Number.parseFloat(getCookie(EXPIRATION_DATE_KEY));
|
20
|
+
const exp = Number.parseFloat(localStorage.getItem(EXPIRATION_DATE_KEY) ?? getCookie(EXPIRATION_DATE_KEY));
|
21
21
|
if (!exp || !Number.isFinite(exp)) return null;
|
22
22
|
return exp > Date.now() / EXP_FACTOR;
|
23
23
|
}
|
package/dist/utils/ApiClient.js
CHANGED
@@ -16,7 +16,7 @@ const HEADERS_FORMDATA = {
|
|
16
16
|
class ApiClientInstance {
|
17
17
|
constructor(config) {
|
18
18
|
this.config = config;
|
19
|
-
if (typeof window !== "undefined")
|
19
|
+
if (typeof window !== "undefined") setInterval(this.checkAuth, 500);
|
20
20
|
this.useAuth = () => {
|
21
21
|
return this.auth;
|
22
22
|
};
|