@overmap-ai/core 1.0.60-sdk-refactor.6 → 1.0.60-sdk-refactor.7

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.
@@ -15445,14 +15445,14 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
15445
15445
  immediate: true
15446
15446
  }).catch((e) => {
15447
15447
  console.error("Could not renew tokens; logging out due to error:", e);
15448
- void this.clearAuth();
15448
+ this.clearAuth();
15449
15449
  return void 0;
15450
15450
  });
15451
15451
  let response = void 0;
15452
15452
  try {
15453
15453
  response = await promise;
15454
15454
  } catch (e) {
15455
- await this.clearAuth();
15455
+ this.clearAuth();
15456
15456
  }
15457
15457
  if (!response)
15458
15458
  return void 0;
@@ -15466,15 +15466,13 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
15466
15466
  /**
15467
15467
  * Logs the user out
15468
15468
  */
15469
- async clearAuth() {
15469
+ clearAuth() {
15470
15470
  this.dispatch(setLoggedIn(false));
15471
15471
  this.clearTokens();
15472
15472
  this.dispatch(setActiveProjectId(null));
15473
15473
  this.dispatch(setActiveWorkspaceId(null));
15474
15474
  this.dispatch({ type: constants.RESET_STATE });
15475
15475
  this.dispatch({ type: resetStore });
15476
- await localforage.clear();
15477
- window.location.reload();
15478
15476
  }
15479
15477
  /**
15480
15478
  * Attempts to renew tokens
@@ -15493,7 +15491,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
15493
15491
  this.setTokens(tokens);
15494
15492
  } catch (e) {
15495
15493
  console.error("Could not renew tokens; logging out.");
15496
- await this.clearAuth();
15494
+ this.clearAuth();
15497
15495
  throw e;
15498
15496
  }
15499
15497
  }
@@ -15527,7 +15525,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
15527
15525
  await this.renewTokens();
15528
15526
  } catch (e) {
15529
15527
  if (e instanceof APIError) {
15530
- await this.clearAuth();
15528
+ this.clearAuth();
15531
15529
  }
15532
15530
  return Promise.reject(e);
15533
15531
  }
@@ -15539,7 +15537,7 @@ Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
15539
15537
  if (state.authReducer.isLoggedIn) {
15540
15538
  console.warn("No signed-in user to sign out.");
15541
15539
  }
15542
- await this.clearAuth();
15540
+ this.clearAuth();
15543
15541
  throw new APIError({
15544
15542
  message: "You have been signed out due to inactivity.",
15545
15543
  response,