diff --git a/appAuthHelper.js b/appAuthHelper.js index ebf6fc8..0951bae 100644 --- a/appAuthHelper.js +++ b/appAuthHelper.js @@ -257,6 +257,12 @@ }, registerIdentityProxy: function () { return new Promise((function (resolve) { + // handle the case when the identity proxy was already registered + if (this.identityProxy) { + resolve(); + return; + } + if (this.identityProxyPreference === "serviceWorker" && "serviceWorker" in navigator) { var savedReg,tick; var registerServiceWorker = (function() { diff --git a/appAuthHelperBundle.js b/appAuthHelperBundle.js index f1c14e3..0c3eeeb 100644 --- a/appAuthHelperBundle.js +++ b/appAuthHelperBundle.js @@ -43,4 +43,4 @@ License for AppAuthHelper (Apache 2.0) : Copyright (c) 2019 ForgeRock, Inc. */ -"use strict";function _typeof(a){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}(function(a){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,b.AppAuthHelper=a()}})(function(){return function(){function b(d,e,g){function a(j,i){if(!e[j]){if(!d[j]){var f="function"==typeof require&&require;if(!i&&f)return f(j,!0);if(h)return h(j,!0);var c=new Error("Cannot find module '"+j+"'");throw c.code="MODULE_NOT_FOUND",c}var k=e[j]={exports:{}};d[j][0].call(k.exports,function(b){var c=d[j][1][b];return a(c||b)},k,k.exports,b,d,e,g)}return e[j].exports}for(var h="function"==typeof require&&require,c=0;carguments.length)&&h.call(arguments,1);return i[b]=!0,f(function(){i[b]&&(d?a.apply(null,d):a.call(null),c.clearImmediate(b))}),b},c.clearImmediate="function"==typeof d?d:function(a){delete i[a]}}).call(this,a("timers").setImmediate,a("timers").clearImmediate)},{"process/browser.js":5,timers:7}],8:[function(){(function(a){(function(a){var b=function checkIfIteratorIsSupported(){try{return!!Symbol.iterator}catch(a){return!1}}(),c=function(a){var c={next:function next(){var b=a.shift();return{done:void 0===b,value:b}}};return b&&(c[Symbol.iterator]=function(){return c}),c},d=function(a){return encodeURIComponent(a).replace(/%20/g,"+")},e=function(a){return decodeURIComponent((a+"").replace(/\+/g," "))};(function checkIfURLSearchParamsSupported(){try{var b=a.URLSearchParams;return"a=1"===new b("?a=1").toString()&&"function"==typeof b.prototype.set&&"function"==typeof b.prototype.entries}catch(a){return!1}})()||function polyfillURLSearchParams(){var e=function(a){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var b=_typeof(a);if("undefined"===b);else if("string"===b)""!==a&&this._fromString(a);else if(a instanceof e){var c=this;a.forEach(function(a,b){c.append(b,a)})}else if(!(null!==a&&"object"===b))throw new TypeError("Unsupported input's type for URLSearchParams");else if("[object Array]"===Object.prototype.toString.call(a)){for(var d,f=0;fa[0]?1:0}),a._entries&&(a._entries={});for(var c=0;carguments.length)&&h.call(arguments,1);return i[b]=!0,f(function(){i[b]&&(d?a.apply(null,d):a.call(null),c.clearImmediate(b))}),b},c.clearImmediate="function"==typeof d?d:function(a){delete i[a]}}).call(this,a("timers").setImmediate,a("timers").clearImmediate)},{"process/browser.js":5,timers:7}],8:[function(){(function(a){(function(a){var b=function checkIfIteratorIsSupported(){try{return!!Symbol.iterator}catch(a){return!1}}(),c=function(a){var c={next:function next(){var b=a.shift();return{done:void 0===b,value:b}}};return b&&(c[Symbol.iterator]=function(){return c}),c},d=function(a){return encodeURIComponent(a).replace(/%20/g,"+")},e=function(a){return decodeURIComponent((a+"").replace(/\+/g," "))};(function checkIfURLSearchParamsSupported(){try{var b=a.URLSearchParams;return"a=1"===new b("?a=1").toString()&&"function"==typeof b.prototype.set&&"function"==typeof b.prototype.entries}catch(a){return!1}})()||function polyfillURLSearchParams(){var e=function(a){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var b=_typeof(a);if("undefined"===b);else if("string"===b)""!==a&&this._fromString(a);else if(a instanceof e){var c=this;a.forEach(function(a,b){c.append(b,a)})}else if(!(null!==a&&"object"===b))throw new TypeError("Unsupported input's type for URLSearchParams");else if("[object Array]"===Object.prototype.toString.call(a)){for(var d,f=0;fa[0]?1:0}),a._entries&&(a._entries={});for(var c=0;c