@auth0/auth0-spa-js 1.22.3 → 1.22.4

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.
@@ -3614,7 +3614,7 @@ if (typeof globalNS["Promise"] !== "function") {
3614
3614
  })(typeof self !== "undefined" ? self : commonjsGlobal);
3615
3615
  }));
3616
3616
 
3617
- var version = "1.22.3";
3617
+ var version = "1.22.4";
3618
3618
 
3619
3619
  var DEFAULT_AUTHORIZE_TIMEOUT_IN_SECONDS = 60;
3620
3620
 
@@ -4874,8 +4874,24 @@ var getCustomInitialOptions = function(options) {
4874
4874
 
4875
4875
  var Auth0Client = function() {
4876
4876
  function Auth0Client(options) {
4877
+ var _this = this;
4877
4878
  var _a, _b;
4878
4879
  this.options = options;
4880
+ this._releaseLockOnPageHide = function() {
4881
+ return __awaiter(_this, void 0, void 0, (function() {
4882
+ return __generator(this, (function(_a) {
4883
+ switch (_a.label) {
4884
+ case 0:
4885
+ return [ 4, lock.releaseLock(GET_TOKEN_SILENTLY_LOCK_KEY) ];
4886
+
4887
+ case 1:
4888
+ _a.sent();
4889
+ window.removeEventListener("pagehide", this._releaseLockOnPageHide);
4890
+ return [ 2 ];
4891
+ }
4892
+ }));
4893
+ }));
4894
+ };
4879
4895
  typeof window !== "undefined" && validateCrypto();
4880
4896
  if (options.cache && options.cacheLocation) {
4881
4897
  console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`.");
@@ -5344,6 +5360,7 @@ var Auth0Client = function() {
5344
5360
 
5345
5361
  case 4:
5346
5362
  _b.trys.push([ 4, , 12, 14 ]);
5363
+ window.addEventListener("pagehide", this._releaseLockOnPageHide);
5347
5364
  if (!!ignoreCache) return [ 3, 6 ];
5348
5365
  return [ 4, this._getEntryFromCache({
5349
5366
  scope: getTokenOptions.scope,
@@ -5405,6 +5422,7 @@ var Auth0Client = function() {
5405
5422
 
5406
5423
  case 13:
5407
5424
  _b.sent();
5425
+ window.removeEventListener("pagehide", this._releaseLockOnPageHide);
5408
5426
  return [ 7 ];
5409
5427
 
5410
5428
  case 14: