@schibsted/account-sdk-browser 4.8.7-beta.5 → 4.8.7-beta.7

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