@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.
@@ -15482,13 +15482,13 @@ class JWTService extends BaseAuthService {
15482
15482
  * Logs the user out
15483
15483
  */
15484
15484
  clearAuth() {
15485
+ console.debug(this.constructor.name, "clearing auth;");
15485
15486
  this.dispatch(setLoggedIn(false));
15486
15487
  this.clearTokens();
15487
15488
  this.dispatch(setActiveProjectId(null));
15488
15489
  this.dispatch(setActiveWorkspaceId(null));
15489
15490
  this.dispatch({ type: RESET_STATE });
15490
15491
  this.dispatch({ type: resetStore });
15491
- console.debug(this.constructor.name, "clearing auth;");
15492
15492
  }
15493
15493
  /**
15494
15494
  * Attempts to renew tokens
@@ -15498,6 +15498,7 @@ class JWTService extends BaseAuthService {
15498
15498
  if (!dyingRefreshToken) {
15499
15499
  throw new Error("No refresh token found");
15500
15500
  }
15501
+ console.debug(this.constructor.name, "renewing tokens");
15501
15502
  try {
15502
15503
  const tokens = await this._getRenewedTokens(dyingRefreshToken);
15503
15504
  if (!tokens) {
@@ -15528,12 +15529,12 @@ class JWTService extends BaseAuthService {
15528
15529
  }
15529
15530
  getAuthHeader() {
15530
15531
  const accessToken = this.getAccessToken();
15531
- console.debug("getAuthHeader", accessToken);
15532
15532
  return `Bearer ${accessToken}`;
15533
15533
  }
15534
15534
  async prepareAuth() {
15535
15535
  if (!this.tokenIsExpiringSoon())
15536
15536
  return;
15537
+ console.debug(this.constructor.name, "preparing auth");
15537
15538
  try {
15538
15539
  await this.renewTokens();
15539
15540
  } catch (e) {
@@ -15570,6 +15571,7 @@ class JWTService extends BaseAuthService {
15570
15571
  }
15571
15572
  async initAuth(payload) {
15572
15573
  const uuid = v4();
15574
+ console.debug(this.constructor.name, "Initiating auth");
15573
15575
  const promise = this.enqueueRequest({
15574
15576
  uuid,
15575
15577
  description: "Get token pair",