@schibsted/account-sdk-browser 4.8.7-beta.4 → 4.8.7-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 +14 -8
- 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 +14 -8
- 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 +14 -8
- 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.js +8 -0
- package/src/version.js +1 -1
package/es5/global.js
CHANGED
|
@@ -2036,6 +2036,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2036
2036
|
_this.log = log;
|
|
2037
2037
|
_this.callbackBeforeRedirect = callbackBeforeRedirect;
|
|
2038
2038
|
_this._sessionDomain = sessionDomain;
|
|
2039
|
+
_this.cache.set("sessionFlowOngoing", false);
|
|
2039
2040
|
|
|
2040
2041
|
// Internal hack: set to false to always refresh from hassession
|
|
2041
2042
|
_this._enableSessionCaching = true;
|
|
@@ -2359,6 +2360,10 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2359
2360
|
key: "hasSession",
|
|
2360
2361
|
value: function hasSession() {
|
|
2361
2362
|
var _this2 = this;
|
|
2363
|
+
var checkIfSessionOngoing = this.cache.get("sessionFlowOngoing");
|
|
2364
|
+
if (checkIfSessionOngoing) {
|
|
2365
|
+
return this._session;
|
|
2366
|
+
}
|
|
2362
2367
|
if (this._hasSessionInProgress) {
|
|
2363
2368
|
return this._hasSessionInProgress;
|
|
2364
2369
|
}
|
|
@@ -2414,25 +2419,26 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
2414
2419
|
throw _context.t0;
|
|
2415
2420
|
case 15:
|
|
2416
2421
|
if (!sessionData) {
|
|
2417
|
-
_context.next =
|
|
2422
|
+
_context.next = 22;
|
|
2418
2423
|
break;
|
|
2419
2424
|
}
|
|
2420
2425
|
if (!_checkRedirectionNeed(sessionData)) {
|
|
2421
|
-
_context.next =
|
|
2426
|
+
_context.next = 21;
|
|
2422
2427
|
break;
|
|
2423
2428
|
}
|
|
2424
|
-
|
|
2429
|
+
_this2.cache.set("sessionFlowOngoing", true);
|
|
2430
|
+
_context.next = 20;
|
|
2425
2431
|
return _this2.callbackBeforeRedirect();
|
|
2426
|
-
case 19:
|
|
2427
|
-
return _context.abrupt("return", _this2._sessionService.makeUrl(sessionData.redirectURL));
|
|
2428
2432
|
case 20:
|
|
2433
|
+
return _context.abrupt("return", _this2._sessionService.makeUrl(sessionData.redirectURL));
|
|
2434
|
+
case 21:
|
|
2429
2435
|
if (_this2._enableSessionCaching) {
|
|
2430
2436
|
_expiresIn = 1000 * (sessionData.expiresIn || 300);
|
|
2431
2437
|
_this2.cache.set(HAS_SESSION_CACHE_KEY, sessionData, _expiresIn);
|
|
2432
2438
|
}
|
|
2433
|
-
case 21:
|
|
2434
|
-
return _context.abrupt("return", _postProcess(sessionData));
|
|
2435
2439
|
case 22:
|
|
2440
|
+
return _context.abrupt("return", _postProcess(sessionData));
|
|
2441
|
+
case 23:
|
|
2436
2442
|
case "end":
|
|
2437
2443
|
return _context.stop();
|
|
2438
2444
|
}
|
|
@@ -11960,7 +11966,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11960
11966
|
|
|
11961
11967
|
|
|
11962
11968
|
|
|
11963
|
-
var version = '4.8.7-beta.
|
|
11969
|
+
var version = '4.8.7-beta.5';
|
|
11964
11970
|
/* harmony default export */ __webpack_exports__["default"] = (version);
|
|
11965
11971
|
|
|
11966
11972
|
/***/ }),
|