@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/identity.js
CHANGED
|
@@ -1153,6 +1153,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1153
1153
|
_this.log = log;
|
|
1154
1154
|
_this.callbackBeforeRedirect = callbackBeforeRedirect;
|
|
1155
1155
|
_this._sessionDomain = sessionDomain;
|
|
1156
|
+
_this.cache.set("sessionFlowOngoing", false);
|
|
1156
1157
|
|
|
1157
1158
|
// Internal hack: set to false to always refresh from hassession
|
|
1158
1159
|
_this._enableSessionCaching = true;
|
|
@@ -1476,6 +1477,10 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1476
1477
|
key: "hasSession",
|
|
1477
1478
|
value: function hasSession() {
|
|
1478
1479
|
var _this2 = this;
|
|
1480
|
+
var checkIfSessionOngoing = this.cache.get("sessionFlowOngoing");
|
|
1481
|
+
if (checkIfSessionOngoing) {
|
|
1482
|
+
return this._session;
|
|
1483
|
+
}
|
|
1479
1484
|
if (this._hasSessionInProgress) {
|
|
1480
1485
|
return this._hasSessionInProgress;
|
|
1481
1486
|
}
|
|
@@ -1531,25 +1536,26 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1531
1536
|
throw _context.t0;
|
|
1532
1537
|
case 15:
|
|
1533
1538
|
if (!sessionData) {
|
|
1534
|
-
_context.next =
|
|
1539
|
+
_context.next = 22;
|
|
1535
1540
|
break;
|
|
1536
1541
|
}
|
|
1537
1542
|
if (!_checkRedirectionNeed(sessionData)) {
|
|
1538
|
-
_context.next =
|
|
1543
|
+
_context.next = 21;
|
|
1539
1544
|
break;
|
|
1540
1545
|
}
|
|
1541
|
-
|
|
1546
|
+
_this2.cache.set("sessionFlowOngoing", true);
|
|
1547
|
+
_context.next = 20;
|
|
1542
1548
|
return _this2.callbackBeforeRedirect();
|
|
1543
|
-
case 19:
|
|
1544
|
-
return _context.abrupt("return", _this2._sessionService.makeUrl(sessionData.redirectURL));
|
|
1545
1549
|
case 20:
|
|
1550
|
+
return _context.abrupt("return", _this2._sessionService.makeUrl(sessionData.redirectURL));
|
|
1551
|
+
case 21:
|
|
1546
1552
|
if (_this2._enableSessionCaching) {
|
|
1547
1553
|
_expiresIn = 1000 * (sessionData.expiresIn || 300);
|
|
1548
1554
|
_this2.cache.set(HAS_SESSION_CACHE_KEY, sessionData, _expiresIn);
|
|
1549
1555
|
}
|
|
1550
|
-
case 21:
|
|
1551
|
-
return _context.abrupt("return", _postProcess(sessionData));
|
|
1552
1556
|
case 22:
|
|
1557
|
+
return _context.abrupt("return", _postProcess(sessionData));
|
|
1558
|
+
case 23:
|
|
1553
1559
|
case "end":
|
|
1554
1560
|
return _context.stop();
|
|
1555
1561
|
}
|
|
@@ -11926,7 +11932,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11926
11932
|
|
|
11927
11933
|
|
|
11928
11934
|
|
|
11929
|
-
var version = '4.8.7-beta.
|
|
11935
|
+
var version = '4.8.7-beta.5';
|
|
11930
11936
|
/* harmony default export */ __webpack_exports__["default"] = (version);
|
|
11931
11937
|
|
|
11932
11938
|
/***/ })
|