@okta/okta-auth-js 6.3.0 → 6.3.1

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/esm/esm.node.mjs CHANGED
@@ -4490,11 +4490,11 @@ var TransactionManager = function () {
4490
4490
  if (!storage) {
4491
4491
  return null;
4492
4492
  }
4493
- var idxResponse = storage.getStorage();
4494
- if (!isRawIdxResponse(idxResponse)) {
4493
+ var storedValue = storage.getStorage();
4494
+ if (!storedValue || !isRawIdxResponse(storedValue.rawIdxResponse)) {
4495
4495
  return null;
4496
4496
  }
4497
- return idxResponse;
4497
+ return storedValue;
4498
4498
  }
4499
4499
  }, {
4500
4500
  key: "clearIdxResponse",
@@ -7527,13 +7527,13 @@ function remediate(_x, _x2, _x3) {
7527
7527
  function _remediate() {
7528
7528
  _remediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(idxResponse, values, options) {
7529
7529
  var _context3;
7530
- var _idxResponse, neededToProceed, interactionCode, remediators, flow, terminal, messages, actionFromValues, actionFromOptions, actions, _iterator2, _step2, _loop, _ret, remediator, nextStep, _nextStep, name, data;
7530
+ var _idxResponse, neededToProceed, interactionCode, flow, terminal, messages, remediator, actionFromValues, actionFromOptions, actions, _iterator2, _step2, _loop, _ret, nextStep, _nextStep, name, data;
7531
7531
  return _regeneratorRuntime.wrap(function _callee$(_context5) {
7532
7532
  while (1) {
7533
7533
  switch (_context5.prev = _context5.next) {
7534
7534
  case 0:
7535
7535
  _idxResponse = idxResponse, neededToProceed = _idxResponse.neededToProceed, interactionCode = _idxResponse.interactionCode;
7536
- remediators = options.remediators, flow = options.flow;
7536
+ flow = options.flow;
7537
7537
  if (!interactionCode) {
7538
7538
  _context5.next = 4;
7539
7539
  break;
@@ -7554,15 +7554,16 @@ function _remediate() {
7554
7554
  messages: messages
7555
7555
  });
7556
7556
  case 8:
7557
+ remediator = getRemediator(neededToProceed, values, options);
7557
7558
  actionFromValues = getActionFromValues(values, idxResponse);
7558
7559
  actionFromOptions = options.actions || [];
7559
7560
  actions = _concatInstanceProperty(_context3 = []).call(_context3, _toConsumableArray(actionFromOptions), _toConsumableArray(actionFromValues && [actionFromValues] || []));
7560
7561
  if (!actions) {
7561
- _context5.next = 31;
7562
+ _context5.next = 32;
7562
7563
  break;
7563
7564
  }
7564
7565
  _iterator2 = _createForOfIteratorHelper(actions);
7565
- _context5.prev = 13;
7566
+ _context5.prev = 14;
7566
7567
  _loop = _regeneratorRuntime.mark(function _loop() {
7567
7568
  var action, valuesWithoutExecutedAction, optionsWithoutExecutedAction, remediationAction;
7568
7569
  return _regeneratorRuntime.wrap(function _loop$(_context4) {
@@ -7592,7 +7593,7 @@ function _remediate() {
7592
7593
  _context4.prev = 11;
7593
7594
  _context4.t0 = _context4["catch"](4);
7594
7595
  return _context4.abrupt("return", {
7595
- v: handleIdxError(_context4.t0, remediators)
7596
+ v: handleIdxError(_context4.t0, remediator)
7596
7597
  });
7597
7598
  case 14:
7598
7599
  if (!(action === 'cancel')) {
@@ -7630,7 +7631,7 @@ function _remediate() {
7630
7631
  _context4.prev = 26;
7631
7632
  _context4.t1 = _context4["catch"](19);
7632
7633
  return _context4.abrupt("return", {
7633
- v: handleIdxError(_context4.t1, remediators)
7634
+ v: handleIdxError(_context4.t1, remediator)
7634
7635
  });
7635
7636
  case 29:
7636
7637
  return _context4.abrupt("return", {
@@ -7644,35 +7645,34 @@ function _remediate() {
7644
7645
  }, _loop, null, [[4, 11], [19, 26]]);
7645
7646
  });
7646
7647
  _iterator2.s();
7647
- case 16:
7648
+ case 17:
7648
7649
  if ((_step2 = _iterator2.n()).done) {
7649
- _context5.next = 23;
7650
+ _context5.next = 24;
7650
7651
  break;
7651
7652
  }
7652
- return _context5.delegateYield(_loop(), "t0", 18);
7653
- case 18:
7653
+ return _context5.delegateYield(_loop(), "t0", 19);
7654
+ case 19:
7654
7655
  _ret = _context5.t0;
7655
7656
  if (!(_typeof(_ret) === "object")) {
7656
- _context5.next = 21;
7657
+ _context5.next = 22;
7657
7658
  break;
7658
7659
  }
7659
7660
  return _context5.abrupt("return", _ret.v);
7660
- case 21:
7661
- _context5.next = 16;
7661
+ case 22:
7662
+ _context5.next = 17;
7662
7663
  break;
7663
- case 23:
7664
- _context5.next = 28;
7664
+ case 24:
7665
+ _context5.next = 29;
7665
7666
  break;
7666
- case 25:
7667
- _context5.prev = 25;
7668
- _context5.t1 = _context5["catch"](13);
7667
+ case 26:
7668
+ _context5.prev = 26;
7669
+ _context5.t1 = _context5["catch"](14);
7669
7670
  _iterator2.e(_context5.t1);
7670
- case 28:
7671
- _context5.prev = 28;
7671
+ case 29:
7672
+ _context5.prev = 29;
7672
7673
  _iterator2.f();
7673
- return _context5.finish(28);
7674
- case 31:
7675
- remediator = getRemediator(neededToProceed, values, options);
7674
+ return _context5.finish(29);
7675
+ case 32:
7676
7676
  if (remediator) {
7677
7677
  _context5.next = 49;
7678
7678
  break;
@@ -7749,7 +7749,7 @@ function _remediate() {
7749
7749
  return _context5.stop();
7750
7750
  }
7751
7751
  }
7752
- }, _callee, null, [[13, 25, 28, 31], [35, 43], [57, 67]]);
7752
+ }, _callee, null, [[14, 26, 29, 32], [35, 43], [57, 67]]);
7753
7753
  }));
7754
7754
  return _remediate.apply(this, arguments);
7755
7755
  }
@@ -8706,7 +8706,7 @@ function createGlobalRequestInterceptor(sdk) {
8706
8706
  var OktaUserAgent = function () {
8707
8707
  function OktaUserAgent() {
8708
8708
  _classCallCheck(this, OktaUserAgent);
8709
- this.environments = ["okta-auth-js/".concat("6.3.0")];
8709
+ this.environments = ["okta-auth-js/".concat("6.3.1")];
8710
8710
  }
8711
8711
  _createClass(OktaUserAgent, [{
8712
8712
  key: "addEnvironment",
@@ -8724,7 +8724,7 @@ var OktaUserAgent = function () {
8724
8724
  }, {
8725
8725
  key: "getVersion",
8726
8726
  value: function getVersion() {
8727
- return "6.3.0";
8727
+ return "6.3.1";
8728
8728
  }
8729
8729
  }, {
8730
8730
  key: "maybeAddNodeEnvironment",