@auth0/auth0-spa-js 2.0.2 → 2.0.3

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.
@@ -472,7 +472,7 @@
472
472
  exports.default = SuperTokensLock;
473
473
  }));
474
474
  var Lock = unwrapExports(browserTabsLock);
475
- var version = "2.0.2";
475
+ var version = "2.0.3";
476
476
  const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
477
477
  const DEFAULT_POPUP_CONFIG_OPTIONS = {
478
478
  timeoutInSeconds: DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS
@@ -1244,6 +1244,9 @@
1244
1244
  if (options === null || options === void 0 ? void 0 : options.daysUntilExpire) {
1245
1245
  cookieAttributes.expires = options.daysUntilExpire;
1246
1246
  }
1247
+ if (options === null || options === void 0 ? void 0 : options.cookieDomain) {
1248
+ cookieAttributes.domain = options.cookieDomain;
1249
+ }
1247
1250
  esCookie_5(`${LEGACY_PREFIX}${key}`, JSON.stringify(value), cookieAttributes);
1248
1251
  CookieStorage.save(key, value, options);
1249
1252
  },
@@ -1694,7 +1697,11 @@
1694
1697
  }
1695
1698
  async logout(options = {}) {
1696
1699
  const _a = patchOpenUrlWithOnRedirect(options), {openUrl: openUrl} = _a, logoutOptions = __rest(_a, [ "openUrl" ]);
1697
- await this.cacheManager.clear();
1700
+ if (options.clientId === null) {
1701
+ await this.cacheManager.clear();
1702
+ } else {
1703
+ await this.cacheManager.clear(options.clientId || this.options.clientId);
1704
+ }
1698
1705
  this.cookieStorage.remove(this.orgHintCookieName, {
1699
1706
  cookieDomain: this.options.cookieDomain
1700
1707
  });