@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.
@@ -481,7 +481,7 @@ var browserTabsLock = createCommonjsModule((function(module, exports) {
481
481
 
482
482
  var Lock = unwrapExports(browserTabsLock);
483
483
 
484
- var version = "2.0.2";
484
+ var version = "2.0.3";
485
485
 
486
486
  const DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
487
487
 
@@ -1325,6 +1325,9 @@ const CookieStorageWithLegacySameSite = {
1325
1325
  if (options === null || options === void 0 ? void 0 : options.daysUntilExpire) {
1326
1326
  cookieAttributes.expires = options.daysUntilExpire;
1327
1327
  }
1328
+ if (options === null || options === void 0 ? void 0 : options.cookieDomain) {
1329
+ cookieAttributes.domain = options.cookieDomain;
1330
+ }
1328
1331
  esCookie_5(`${LEGACY_PREFIX}${key}`, JSON.stringify(value), cookieAttributes);
1329
1332
  CookieStorage.save(key, value, options);
1330
1333
  },
@@ -1794,7 +1797,11 @@ class Auth0Client {
1794
1797
  }
1795
1798
  async logout(options = {}) {
1796
1799
  const _a = patchOpenUrlWithOnRedirect(options), {openUrl: openUrl} = _a, logoutOptions = __rest(_a, [ "openUrl" ]);
1797
- await this.cacheManager.clear();
1800
+ if (options.clientId === null) {
1801
+ await this.cacheManager.clear();
1802
+ } else {
1803
+ await this.cacheManager.clear(options.clientId || this.options.clientId);
1804
+ }
1798
1805
  this.cookieStorage.remove(this.orgHintCookieName, {
1799
1806
  cookieDomain: this.options.cookieDomain
1800
1807
  });