@schibsted/account-sdk-browser 5.0.1-beta.4 → 5.0.1-beta.5
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.
- package/es5/global.js +7 -14
- package/es5/global.js.map +1 -1
- package/es5/global.min.js +1 -1
- package/es5/global.min.js.map +1 -1
- package/es5/identity.js +7 -14
- package/es5/identity.js.map +1 -1
- package/es5/identity.min.js +1 -1
- package/es5/identity.min.js.map +1 -1
- package/es5/index.js +7 -14
- package/es5/index.js.map +1 -1
- package/es5/index.min.js +1 -1
- package/es5/index.min.js.map +1 -1
- package/es5/monetization.js +1 -1
- package/es5/monetization.js.map +1 -1
- package/es5/monetization.min.js +1 -1
- package/es5/monetization.min.js.map +1 -1
- package/package.json +1 -1
- package/src/identity.d.ts +2 -3
- package/src/identity.js +6 -19
- package/src/version.js +1 -1
package/es5/global.js
CHANGED
|
@@ -1985,7 +1985,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
1985
1985
|
|
|
1986
1986
|
var HAS_SESSION_CACHE_KEY = 'hasSession-cache';
|
|
1987
1987
|
var SESSION_CALL_BLOCKED_CACHE_KEY = 'sessionCallBlocked-cache';
|
|
1988
|
-
var SESSION_CALL_BLOCKED_TTL = 1000 *
|
|
1988
|
+
var SESSION_CALL_BLOCKED_TTL = 1000 * 15; //set to 15s, to not block calls much longer than the time attempting retries
|
|
1989
1989
|
|
|
1990
1990
|
var TAB_ID_KEY = 'tab-id-cache';
|
|
1991
1991
|
var TAB_ID = Math.floor(Math.random() * 100000);
|
|
@@ -2059,7 +2059,6 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2059
2059
|
_this._setBffServerUrl(env);
|
|
2060
2060
|
_this._setOauthServerUrl(env);
|
|
2061
2061
|
_this._setGlobalSessionServiceUrl(env);
|
|
2062
|
-
_this._unblockSessionCallByTab();
|
|
2063
2062
|
return _this;
|
|
2064
2063
|
}
|
|
2065
2064
|
|
|
@@ -2083,15 +2082,14 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2083
2082
|
}
|
|
2084
2083
|
|
|
2085
2084
|
/**
|
|
2086
|
-
* Checks if calling GET session is blocked
|
|
2085
|
+
* Checks if calling GET session is blocked
|
|
2087
2086
|
* @private
|
|
2088
|
-
* @param {Cache} cache - cache to check
|
|
2089
2087
|
* @returns {string|null}
|
|
2090
2088
|
*/
|
|
2091
2089
|
}, {
|
|
2092
2090
|
key: "_isSessionCallBlocked",
|
|
2093
|
-
value: function _isSessionCallBlocked(
|
|
2094
|
-
return
|
|
2091
|
+
value: function _isSessionCallBlocked() {
|
|
2092
|
+
return this.localStorageCache.get(SESSION_CALL_BLOCKED_CACHE_KEY);
|
|
2095
2093
|
}
|
|
2096
2094
|
|
|
2097
2095
|
/**
|
|
@@ -2102,10 +2100,6 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2102
2100
|
}, {
|
|
2103
2101
|
key: "_blockSessionCall",
|
|
2104
2102
|
value: function _blockSessionCall() {
|
|
2105
|
-
// session storage block protects against single tab, multiple identity instance concurrency
|
|
2106
|
-
this.sessionStorageCache.set(SESSION_CALL_BLOCKED_CACHE_KEY, this._tabId, SESSION_CALL_BLOCKED_TTL);
|
|
2107
|
-
|
|
2108
|
-
// local storage block protects against cross-tab concurrency
|
|
2109
2103
|
this.localStorageCache.set(SESSION_CALL_BLOCKED_CACHE_KEY, this._tabId, SESSION_CALL_BLOCKED_TTL);
|
|
2110
2104
|
}
|
|
2111
2105
|
|
|
@@ -2117,10 +2111,9 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2117
2111
|
}, {
|
|
2118
2112
|
key: "_unblockSessionCallByTab",
|
|
2119
2113
|
value: function _unblockSessionCallByTab() {
|
|
2120
|
-
if (this._isSessionCallBlocked(
|
|
2114
|
+
if (this._isSessionCallBlocked() === this._tabId) {
|
|
2121
2115
|
this.localStorageCache.delete(SESSION_CALL_BLOCKED_CACHE_KEY);
|
|
2122
2116
|
}
|
|
2123
|
-
this.sessionStorageCache.delete(SESSION_CALL_BLOCKED_CACHE_KEY);
|
|
2124
2117
|
}
|
|
2125
2118
|
|
|
2126
2119
|
/**
|
|
@@ -2545,7 +2538,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2545
2538
|
}
|
|
2546
2539
|
return _context3.abrupt("return", _postProcess(cachedSession));
|
|
2547
2540
|
case 4:
|
|
2548
|
-
if (!
|
|
2541
|
+
if (!_this2._isSessionCallBlocked()) {
|
|
2549
2542
|
_context3.next = 13;
|
|
2550
2543
|
break;
|
|
2551
2544
|
}
|
|
@@ -12178,7 +12171,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12178
12171
|
|
|
12179
12172
|
|
|
12180
12173
|
|
|
12181
|
-
var version = '5.0.1-beta.
|
|
12174
|
+
var version = '5.0.1-beta.5';
|
|
12182
12175
|
/* harmony default export */ __webpack_exports__["default"] = (version);
|
|
12183
12176
|
|
|
12184
12177
|
/***/ }),
|