@overmap-ai/core 1.0.65-error-message-fix.3 → 1.0.65-error-message-fix.5
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.
package/dist/overmap-core.js
CHANGED
|
@@ -4068,7 +4068,6 @@ class JWTService extends BaseAuthService {
|
|
|
4068
4068
|
}
|
|
4069
4069
|
async initAuth(payload) {
|
|
4070
4070
|
const uuid = v4();
|
|
4071
|
-
console.debug(this.constructor.name, "Initiating auth");
|
|
4072
4071
|
const promise = this.enqueueRequest({
|
|
4073
4072
|
uuid,
|
|
4074
4073
|
description: "Get token pair",
|
|
@@ -4080,22 +4079,18 @@ class JWTService extends BaseAuthService {
|
|
|
4080
4079
|
blockers: [],
|
|
4081
4080
|
blocks: []
|
|
4082
4081
|
}).then(parseTokens);
|
|
4083
|
-
const timeout =
|
|
4082
|
+
const timeout = 10;
|
|
4084
4083
|
let timedOut = false;
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
const successPromise = promise.then((tokens) => {
|
|
4093
|
-
if (timedOut) {
|
|
4094
|
-
return void 0;
|
|
4095
|
-
}
|
|
4084
|
+
setTimeout(() => {
|
|
4085
|
+
timedOut = true;
|
|
4086
|
+
this.dispatch(markForDeletion(uuid));
|
|
4087
|
+
}, timeout * 1e3);
|
|
4088
|
+
void promise.then((tokens) => {
|
|
4089
|
+
if (timedOut)
|
|
4090
|
+
return;
|
|
4096
4091
|
this.setTokens(tokens);
|
|
4097
4092
|
});
|
|
4098
|
-
return
|
|
4093
|
+
return promise;
|
|
4099
4094
|
}
|
|
4100
4095
|
}
|
|
4101
4096
|
class BaseApiService extends BaseService {
|