@schibsted/account-sdk-browser 5.0.1-beta.4 → 5.0.1-beta.6
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/identity.js
CHANGED
|
@@ -1102,7 +1102,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
1102
1102
|
|
|
1103
1103
|
var HAS_SESSION_CACHE_KEY = 'hasSession-cache';
|
|
1104
1104
|
var SESSION_CALL_BLOCKED_CACHE_KEY = 'sessionCallBlocked-cache';
|
|
1105
|
-
var SESSION_CALL_BLOCKED_TTL = 1000 *
|
|
1105
|
+
var SESSION_CALL_BLOCKED_TTL = 1000 * 15; //set to 15s, to not block calls much longer than the time attempting retries
|
|
1106
1106
|
|
|
1107
1107
|
var TAB_ID_KEY = 'tab-id-cache';
|
|
1108
1108
|
var TAB_ID = Math.floor(Math.random() * 100000);
|
|
@@ -1176,7 +1176,6 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1176
1176
|
_this._setBffServerUrl(env);
|
|
1177
1177
|
_this._setOauthServerUrl(env);
|
|
1178
1178
|
_this._setGlobalSessionServiceUrl(env);
|
|
1179
|
-
_this._unblockSessionCallByTab();
|
|
1180
1179
|
return _this;
|
|
1181
1180
|
}
|
|
1182
1181
|
|
|
@@ -1200,15 +1199,14 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1200
1199
|
}
|
|
1201
1200
|
|
|
1202
1201
|
/**
|
|
1203
|
-
* Checks if calling GET session is blocked
|
|
1202
|
+
* Checks if calling GET session is blocked
|
|
1204
1203
|
* @private
|
|
1205
|
-
* @param {Cache} cache - cache to check
|
|
1206
1204
|
* @returns {string|null}
|
|
1207
1205
|
*/
|
|
1208
1206
|
}, {
|
|
1209
1207
|
key: "_isSessionCallBlocked",
|
|
1210
|
-
value: function _isSessionCallBlocked(
|
|
1211
|
-
return
|
|
1208
|
+
value: function _isSessionCallBlocked() {
|
|
1209
|
+
return this.localStorageCache.get(SESSION_CALL_BLOCKED_CACHE_KEY);
|
|
1212
1210
|
}
|
|
1213
1211
|
|
|
1214
1212
|
/**
|
|
@@ -1219,10 +1217,6 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1219
1217
|
}, {
|
|
1220
1218
|
key: "_blockSessionCall",
|
|
1221
1219
|
value: function _blockSessionCall() {
|
|
1222
|
-
// session storage block protects against single tab, multiple identity instance concurrency
|
|
1223
|
-
this.sessionStorageCache.set(SESSION_CALL_BLOCKED_CACHE_KEY, this._tabId, SESSION_CALL_BLOCKED_TTL);
|
|
1224
|
-
|
|
1225
|
-
// local storage block protects against cross-tab concurrency
|
|
1226
1220
|
this.localStorageCache.set(SESSION_CALL_BLOCKED_CACHE_KEY, this._tabId, SESSION_CALL_BLOCKED_TTL);
|
|
1227
1221
|
}
|
|
1228
1222
|
|
|
@@ -1234,10 +1228,9 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1234
1228
|
}, {
|
|
1235
1229
|
key: "_unblockSessionCallByTab",
|
|
1236
1230
|
value: function _unblockSessionCallByTab() {
|
|
1237
|
-
if (this._isSessionCallBlocked(
|
|
1231
|
+
if (this._isSessionCallBlocked() === this._tabId) {
|
|
1238
1232
|
this.localStorageCache.delete(SESSION_CALL_BLOCKED_CACHE_KEY);
|
|
1239
1233
|
}
|
|
1240
|
-
this.sessionStorageCache.delete(SESSION_CALL_BLOCKED_CACHE_KEY);
|
|
1241
1234
|
}
|
|
1242
1235
|
|
|
1243
1236
|
/**
|
|
@@ -1662,7 +1655,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1662
1655
|
}
|
|
1663
1656
|
return _context3.abrupt("return", _postProcess(cachedSession));
|
|
1664
1657
|
case 4:
|
|
1665
|
-
if (!
|
|
1658
|
+
if (!_this2._isSessionCallBlocked()) {
|
|
1666
1659
|
_context3.next = 13;
|
|
1667
1660
|
break;
|
|
1668
1661
|
}
|
|
@@ -12144,7 +12137,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12144
12137
|
|
|
12145
12138
|
|
|
12146
12139
|
|
|
12147
|
-
var version = '5.0.1-beta.
|
|
12140
|
+
var version = '5.0.1-beta.6';
|
|
12148
12141
|
/* harmony default export */ __webpack_exports__["default"] = (version);
|
|
12149
12142
|
|
|
12150
12143
|
/***/ })
|