@overmap-ai/core 1.0.65-error-message-fix.3 → 1.0.65-error-message-fix.4
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.
|
@@ -4056,7 +4056,6 @@ var __publicField = (obj, key, value) => {
|
|
|
4056
4056
|
}
|
|
4057
4057
|
async initAuth(payload) {
|
|
4058
4058
|
const uuid$1 = uuid.v4();
|
|
4059
|
-
console.debug(this.constructor.name, "Initiating auth");
|
|
4060
4059
|
const promise = this.enqueueRequest({
|
|
4061
4060
|
uuid: uuid$1,
|
|
4062
4061
|
description: "Get token pair",
|
|
@@ -4067,23 +4066,19 @@ var __publicField = (obj, key, value) => {
|
|
|
4067
4066
|
checkAuth: false,
|
|
4068
4067
|
blockers: [],
|
|
4069
4068
|
blocks: []
|
|
4070
|
-
})
|
|
4071
|
-
const timeout =
|
|
4069
|
+
});
|
|
4070
|
+
const timeout = 10;
|
|
4072
4071
|
let timedOut = false;
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
}, timeout * 1e3);
|
|
4079
|
-
});
|
|
4080
|
-
const successPromise = promise.then((tokens) => {
|
|
4072
|
+
setTimeout(() => {
|
|
4073
|
+
timedOut = true;
|
|
4074
|
+
this.dispatch(markForDeletion(uuid$1));
|
|
4075
|
+
}, timeout * 1e3);
|
|
4076
|
+
return promise.then((tokens) => {
|
|
4081
4077
|
if (timedOut) {
|
|
4082
4078
|
return void 0;
|
|
4083
4079
|
}
|
|
4084
|
-
this.setTokens(tokens);
|
|
4080
|
+
this.setTokens(parseTokens(tokens));
|
|
4085
4081
|
});
|
|
4086
|
-
return Promise.race([timeoutPromise, successPromise]);
|
|
4087
4082
|
}
|
|
4088
4083
|
}
|
|
4089
4084
|
class BaseApiService extends BaseService {
|