@schibsted/account-sdk-browser 5.0.1-beta.3 → 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 +9 -12
- 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 +9 -12
- 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 +9 -12
- 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 +1 -1
- package/src/identity.js +32 -26
- 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
|
|
|
@@ -2085,7 +2084,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2085
2084
|
/**
|
|
2086
2085
|
* Checks if calling GET session is blocked
|
|
2087
2086
|
* @private
|
|
2088
|
-
* @returns {
|
|
2087
|
+
* @returns {string|null}
|
|
2089
2088
|
*/
|
|
2090
2089
|
}, {
|
|
2091
2090
|
key: "_isSessionCallBlocked",
|
|
@@ -2456,8 +2455,8 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2456
2455
|
while (1) switch (_context.prev = _context.next) {
|
|
2457
2456
|
case 0:
|
|
2458
2457
|
_context.prev = 0;
|
|
2459
|
-
|
|
2460
|
-
|
|
2458
|
+
/* Blocking future calls to session-service. This lock is removed after the response is processed
|
|
2459
|
+
to account for redirection that can happen towards session-service too */
|
|
2461
2460
|
_this2._blockSessionCall();
|
|
2462
2461
|
_context.next = 4;
|
|
2463
2462
|
return _this2._sessionService.get('/v2/session', {
|
|
@@ -2596,9 +2595,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2596
2595
|
randomWaitTime = MIN_SESSION_CALL_WAIT_TIME + randomWaitingStep * 100;
|
|
2597
2596
|
_context4.next = 5;
|
|
2598
2597
|
return new Promise(function (resolve) {
|
|
2599
|
-
setTimeout(
|
|
2600
|
-
return resolve();
|
|
2601
|
-
}, randomWaitTime);
|
|
2598
|
+
return setTimeout(resolve, randomWaitTime);
|
|
2602
2599
|
});
|
|
2603
2600
|
case 5:
|
|
2604
2601
|
_context4.next = 7;
|
|
@@ -2898,9 +2895,9 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2898
2895
|
throw new _SDKError_js__WEBPACK_IMPORTED_MODULE_63__["default"]('externalParty cannot be empty');
|
|
2899
2896
|
case 9:
|
|
2900
2897
|
_toHexDigest = function _toHexDigest(hashBuffer) {
|
|
2901
|
-
//
|
|
2898
|
+
// Convert buffer to byte array
|
|
2902
2899
|
var hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
2903
|
-
//
|
|
2900
|
+
// Convert bytes to hex string
|
|
2904
2901
|
return hashArray.map(function (b) {
|
|
2905
2902
|
return b.toString(16).padStart(2, '0');
|
|
2906
2903
|
}).join('');
|
|
@@ -3231,7 +3228,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
3231
3228
|
_ref9$prompt = _ref9.prompt,
|
|
3232
3229
|
prompt = _ref9$prompt === void 0 ? 'select_account' : _ref9$prompt;
|
|
3233
3230
|
if (_typeof(arguments[0]) !== 'object') {
|
|
3234
|
-
//
|
|
3231
|
+
// Backward compatibility
|
|
3235
3232
|
state = arguments[0];
|
|
3236
3233
|
acrValues = arguments[1];
|
|
3237
3234
|
scope = arguments[2] || scope;
|
|
@@ -12174,7 +12171,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12174
12171
|
|
|
12175
12172
|
|
|
12176
12173
|
|
|
12177
|
-
var version = '5.0.1-beta.
|
|
12174
|
+
var version = '5.0.1-beta.5';
|
|
12178
12175
|
/* harmony default export */ __webpack_exports__["default"] = (version);
|
|
12179
12176
|
|
|
12180
12177
|
/***/ }),
|