@schibsted/account-sdk-browser 4.8.7-beta.5 → 4.8.7-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/index.js CHANGED
@@ -1159,7 +1159,10 @@ 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
+ if (_this._enableSessionCaching) {
1163
+ var expiresIn = 1000 * 300;
1164
+ _this.cache.set("sessionFlowOngoing", false, expiresIn);
1165
+ }
1163
1166
 
1164
1167
  // Internal hack: set to false to always refresh from hassession
1165
1168
  _this._enableSessionCaching = true;
@@ -1506,7 +1509,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
1506
1509
  };
1507
1510
  var _getSession = /*#__PURE__*/function () {
1508
1511
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1509
- var cachedSession, sessionData, expiresIn, _expiresIn;
1512
+ var cachedSession, sessionData, expiresIn, _expiresIn, _expiresIn2;
1510
1513
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1511
1514
  while (1) switch (_context.prev = _context.next) {
1512
1515
  case 0:
@@ -1549,15 +1552,18 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
1549
1552
  _context.next = 21;
1550
1553
  break;
1551
1554
  }
1552
- _this2.cache.set("sessionFlowOngoing", true);
1555
+ if (_this2._enableSessionCaching) {
1556
+ _expiresIn = 1000 * 300;
1557
+ _this2.cache.set("sessionFlowOngoing", true, _expiresIn);
1558
+ }
1553
1559
  _context.next = 20;
1554
1560
  return _this2.callbackBeforeRedirect();
1555
1561
  case 20:
1556
1562
  return _context.abrupt("return", _this2._sessionService.makeUrl(sessionData.redirectURL));
1557
1563
  case 21:
1558
1564
  if (_this2._enableSessionCaching) {
1559
- _expiresIn = 1000 * (sessionData.expiresIn || 300);
1560
- _this2.cache.set(HAS_SESSION_CACHE_KEY, sessionData, _expiresIn);
1565
+ _expiresIn2 = 1000 * (sessionData.expiresIn || 300);
1566
+ _this2.cache.set(HAS_SESSION_CACHE_KEY, sessionData, _expiresIn2);
1561
1567
  }
1562
1568
  case 22:
1563
1569
  return _context.abrupt("return", _postProcess(sessionData));
@@ -11938,7 +11944,7 @@ __webpack_require__.r(__webpack_exports__);
11938
11944
 
11939
11945
 
11940
11946
 
11941
- var version = '4.8.7-beta.5';
11947
+ var version = '4.8.7-beta.6';
11942
11948
  /* harmony default export */ __webpack_exports__["default"] = (version);
11943
11949
 
11944
11950
  /***/ }),