@schibsted/account-sdk-browser 4.8.7-beta.3 → 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 +13 -5
- 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 +13 -5
- 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 +13 -5
- 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 +15 -4
- package/src/version.js +1 -1
package/es5/index.js
CHANGED
|
@@ -1159,6 +1159,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1159
1159
|
_this.log = log;
|
|
1160
1160
|
_this.callbackBeforeRedirect = callbackBeforeRedirect;
|
|
1161
1161
|
_this._sessionDomain = sessionDomain;
|
|
1162
|
+
_this.cache.set("sessionFlowOngoing", false);
|
|
1162
1163
|
|
|
1163
1164
|
// Internal hack: set to false to always refresh from hassession
|
|
1164
1165
|
_this._enableSessionCaching = true;
|
|
@@ -1482,6 +1483,10 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1482
1483
|
key: "hasSession",
|
|
1483
1484
|
value: function hasSession() {
|
|
1484
1485
|
var _this2 = this;
|
|
1486
|
+
var checkIfSessionOngoing = this.cache.get("sessionFlowOngoing");
|
|
1487
|
+
if (checkIfSessionOngoing) {
|
|
1488
|
+
return this._session;
|
|
1489
|
+
}
|
|
1485
1490
|
if (this._hasSessionInProgress) {
|
|
1486
1491
|
return this._hasSessionInProgress;
|
|
1487
1492
|
}
|
|
@@ -1544,11 +1549,11 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1544
1549
|
_context.next = 21;
|
|
1545
1550
|
break;
|
|
1546
1551
|
}
|
|
1547
|
-
|
|
1552
|
+
_this2.cache.set("sessionFlowOngoing", true);
|
|
1553
|
+
_context.next = 20;
|
|
1548
1554
|
return _this2.callbackBeforeRedirect();
|
|
1549
|
-
case
|
|
1550
|
-
|
|
1551
|
-
return _context.abrupt("return");
|
|
1555
|
+
case 20:
|
|
1556
|
+
return _context.abrupt("return", _this2._sessionService.makeUrl(sessionData.redirectURL));
|
|
1552
1557
|
case 21:
|
|
1553
1558
|
if (_this2._enableSessionCaching) {
|
|
1554
1559
|
_expiresIn = 1000 * (sessionData.expiresIn || 300);
|
|
@@ -1568,6 +1573,9 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1568
1573
|
}();
|
|
1569
1574
|
this._hasSessionInProgress = _getSession().then(function (sessionData) {
|
|
1570
1575
|
_this2._hasSessionInProgress = false;
|
|
1576
|
+
if (typeof sessionData === 'string' && Object(_validate_js__WEBPACK_IMPORTED_MODULE_55__["isUrl"])(sessionData)) {
|
|
1577
|
+
return _this2.window.location.href = sessionData;
|
|
1578
|
+
}
|
|
1571
1579
|
return sessionData;
|
|
1572
1580
|
}, function (err) {
|
|
1573
1581
|
_this2.emit('error', err);
|
|
@@ -11930,7 +11938,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11930
11938
|
|
|
11931
11939
|
|
|
11932
11940
|
|
|
11933
|
-
var version = '4.8.7-beta.
|
|
11941
|
+
var version = '4.8.7-beta.5';
|
|
11934
11942
|
/* harmony default export */ __webpack_exports__["default"] = (version);
|
|
11935
11943
|
|
|
11936
11944
|
/***/ }),
|