@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/global.js CHANGED
@@ -2036,7 +2036,10 @@ 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
+ if (_this._enableSessionCaching) {
2040
+ var expiresIn = 1000 * 300;
2041
+ _this.cache.set("sessionFlowOngoing", false, expiresIn);
2042
+ }
2040
2043
 
2041
2044
  // Internal hack: set to false to always refresh from hassession
2042
2045
  _this._enableSessionCaching = true;
@@ -2383,7 +2386,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
2383
2386
  };
2384
2387
  var _getSession = /*#__PURE__*/function () {
2385
2388
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
2386
- var cachedSession, sessionData, expiresIn, _expiresIn;
2389
+ var cachedSession, sessionData, expiresIn, _expiresIn, _expiresIn2;
2387
2390
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2388
2391
  while (1) switch (_context.prev = _context.next) {
2389
2392
  case 0:
@@ -2426,15 +2429,18 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
2426
2429
  _context.next = 21;
2427
2430
  break;
2428
2431
  }
2429
- _this2.cache.set("sessionFlowOngoing", true);
2432
+ if (_this2._enableSessionCaching) {
2433
+ _expiresIn = 1000 * 300;
2434
+ _this2.cache.set("sessionFlowOngoing", true, _expiresIn);
2435
+ }
2430
2436
  _context.next = 20;
2431
2437
  return _this2.callbackBeforeRedirect();
2432
2438
  case 20:
2433
2439
  return _context.abrupt("return", _this2._sessionService.makeUrl(sessionData.redirectURL));
2434
2440
  case 21:
2435
2441
  if (_this2._enableSessionCaching) {
2436
- _expiresIn = 1000 * (sessionData.expiresIn || 300);
2437
- _this2.cache.set(HAS_SESSION_CACHE_KEY, sessionData, _expiresIn);
2442
+ _expiresIn2 = 1000 * (sessionData.expiresIn || 300);
2443
+ _this2.cache.set(HAS_SESSION_CACHE_KEY, sessionData, _expiresIn2);
2438
2444
  }
2439
2445
  case 22:
2440
2446
  return _context.abrupt("return", _postProcess(sessionData));
@@ -11966,7 +11972,7 @@ __webpack_require__.r(__webpack_exports__);
11966
11972
 
11967
11973
 
11968
11974
 
11969
- var version = '4.8.7-beta.5';
11975
+ var version = '4.8.7-beta.6';
11970
11976
  /* harmony default export */ __webpack_exports__["default"] = (version);
11971
11977
 
11972
11978
  /***/ }),