@overmap-ai/core 1.0.60-sdk-refactor.15 → 1.0.60-sdk-refactor.16
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.
|
@@ -15471,13 +15471,13 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
15471
15471
|
* Logs the user out
|
|
15472
15472
|
*/
|
|
15473
15473
|
clearAuth() {
|
|
15474
|
+
console.debug(this.constructor.name, "clearing auth;");
|
|
15474
15475
|
this.dispatch(setLoggedIn(false));
|
|
15475
15476
|
this.clearTokens();
|
|
15476
15477
|
this.dispatch(setActiveProjectId(null));
|
|
15477
15478
|
this.dispatch(setActiveWorkspaceId(null));
|
|
15478
15479
|
this.dispatch({ type: constants.RESET_STATE });
|
|
15479
15480
|
this.dispatch({ type: resetStore });
|
|
15480
|
-
console.debug(this.constructor.name, "clearing auth;");
|
|
15481
15481
|
}
|
|
15482
15482
|
/**
|
|
15483
15483
|
* Attempts to renew tokens
|
|
@@ -15487,6 +15487,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
15487
15487
|
if (!dyingRefreshToken) {
|
|
15488
15488
|
throw new Error("No refresh token found");
|
|
15489
15489
|
}
|
|
15490
|
+
console.debug(this.constructor.name, "renewing tokens");
|
|
15490
15491
|
try {
|
|
15491
15492
|
const tokens = await this._getRenewedTokens(dyingRefreshToken);
|
|
15492
15493
|
if (!tokens) {
|
|
@@ -15517,12 +15518,12 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
15517
15518
|
}
|
|
15518
15519
|
getAuthHeader() {
|
|
15519
15520
|
const accessToken = this.getAccessToken();
|
|
15520
|
-
console.debug("getAuthHeader", accessToken);
|
|
15521
15521
|
return `Bearer ${accessToken}`;
|
|
15522
15522
|
}
|
|
15523
15523
|
async prepareAuth() {
|
|
15524
15524
|
if (!this.tokenIsExpiringSoon())
|
|
15525
15525
|
return;
|
|
15526
|
+
console.debug(this.constructor.name, "preparing auth");
|
|
15526
15527
|
try {
|
|
15527
15528
|
await this.renewTokens();
|
|
15528
15529
|
} catch (e) {
|
|
@@ -15559,6 +15560,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
|
15559
15560
|
}
|
|
15560
15561
|
async initAuth(payload) {
|
|
15561
15562
|
const uuid$1 = uuid.v4();
|
|
15563
|
+
console.debug(this.constructor.name, "Initiating auth");
|
|
15562
15564
|
const promise = this.enqueueRequest({
|
|
15563
15565
|
uuid: uuid$1,
|
|
15564
15566
|
description: "Get token pair",
|