@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.
@@ -15456,14 +15456,14 @@ class JWTService extends BaseAuthService {
15456
15456
  immediate: true
15457
15457
  }).catch((e) => {
15458
15458
  console.error("Could not renew tokens; logging out due to error:", e);
15459
- void this.clearAuth();
15459
+ this.clearAuth();
15460
15460
  return void 0;
15461
15461
  });
15462
15462
  let response = void 0;
15463
15463
  try {
15464
15464
  response = await promise;
15465
15465
  } catch (e) {
15466
- await this.clearAuth();
15466
+ this.clearAuth();
15467
15467
  }
15468
15468
  if (!response)
15469
15469
  return void 0;
@@ -15477,15 +15477,13 @@ class JWTService extends BaseAuthService {
15477
15477
  /**
15478
15478
  * Logs the user out
15479
15479
  */
15480
- async clearAuth() {
15480
+ clearAuth() {
15481
15481
  this.dispatch(setLoggedIn(false));
15482
15482
  this.clearTokens();
15483
15483
  this.dispatch(setActiveProjectId(null));
15484
15484
  this.dispatch(setActiveWorkspaceId(null));
15485
15485
  this.dispatch({ type: RESET_STATE });
15486
15486
  this.dispatch({ type: resetStore });
15487
- await localforage.clear();
15488
- window.location.reload();
15489
15487
  }
15490
15488
  /**
15491
15489
  * Attempts to renew tokens
@@ -15504,7 +15502,7 @@ class JWTService extends BaseAuthService {
15504
15502
  this.setTokens(tokens);
15505
15503
  } catch (e) {
15506
15504
  console.error("Could not renew tokens; logging out.");
15507
- await this.clearAuth();
15505
+ this.clearAuth();
15508
15506
  throw e;
15509
15507
  }
15510
15508
  }
@@ -15538,7 +15536,7 @@ class JWTService extends BaseAuthService {
15538
15536
  await this.renewTokens();
15539
15537
  } catch (e) {
15540
15538
  if (e instanceof APIError) {
15541
- await this.clearAuth();
15539
+ this.clearAuth();
15542
15540
  }
15543
15541
  return Promise.reject(e);
15544
15542
  }
@@ -15550,7 +15548,7 @@ class JWTService extends BaseAuthService {
15550
15548
  if (state.authReducer.isLoggedIn) {
15551
15549
  console.warn("No signed-in user to sign out.");
15552
15550
  }
15553
- await this.clearAuth();
15551
+ this.clearAuth();
15554
15552
  throw new APIError({
15555
15553
  message: "You have been signed out due to inactivity.",
15556
15554
  response,