@okta/okta-auth-js 6.4.4 → 6.5.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +1 -1
  3. package/cjs/OktaUserAgent.js +2 -2
  4. package/cjs/idx/flow/AuthenticationFlow.js.map +1 -1
  5. package/cjs/idx/idxState/v1/idxResponseParser.js +10 -5
  6. package/cjs/idx/idxState/v1/idxResponseParser.js.map +1 -1
  7. package/cjs/idx/idxState/v1/makeIdxState.js +6 -0
  8. package/cjs/idx/idxState/v1/makeIdxState.js.map +1 -1
  9. package/cjs/idx/interact.js +16 -16
  10. package/cjs/idx/interact.js.map +1 -1
  11. package/cjs/idx/remediate.js +9 -9
  12. package/cjs/idx/remediate.js.map +1 -1
  13. package/cjs/idx/remediators/AuthenticatorEnrollmentData.js +17 -8
  14. package/cjs/idx/remediators/AuthenticatorEnrollmentData.js.map +1 -1
  15. package/cjs/idx/remediators/AuthenticatorVerificationData.js +2 -1
  16. package/cjs/idx/remediators/AuthenticatorVerificationData.js.map +1 -1
  17. package/cjs/idx/remediators/Base/AuthenticatorData.js +4 -3
  18. package/cjs/idx/remediators/Base/AuthenticatorData.js.map +1 -1
  19. package/cjs/idx/remediators/Base/Remediator.js +1 -1
  20. package/cjs/idx/remediators/Base/Remediator.js.map +1 -1
  21. package/cjs/idx/remediators/Base/SelectAuthenticator.js +20 -7
  22. package/cjs/idx/remediators/Base/SelectAuthenticator.js.map +1 -1
  23. package/cjs/idx/remediators/Base/VerifyAuthenticator.js +2 -2
  24. package/cjs/idx/remediators/Base/VerifyAuthenticator.js.map +1 -1
  25. package/cjs/idx/remediators/EnrollPoll.js +2 -2
  26. package/cjs/idx/remediators/EnrollPoll.js.map +1 -1
  27. package/cjs/idx/remediators/EnrollmentChannelData.js +2 -2
  28. package/cjs/idx/remediators/EnrollmentChannelData.js.map +1 -1
  29. package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js +103 -0
  30. package/cjs/idx/remediators/GenericRemediator/GenericRemediator.js.map +1 -0
  31. package/cjs/idx/remediators/GenericRemediator/index.js +17 -0
  32. package/cjs/idx/remediators/GenericRemediator/index.js.map +1 -0
  33. package/cjs/idx/remediators/GenericRemediator/util.js +141 -0
  34. package/cjs/idx/remediators/GenericRemediator/util.js.map +1 -0
  35. package/cjs/idx/remediators/Identify.js.map +1 -1
  36. package/cjs/idx/remediators/SelectAuthenticatorAuthenticate.js.map +1 -1
  37. package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js +1 -1
  38. package/cjs/idx/remediators/SelectAuthenticatorUnlockAccount.js.map +1 -1
  39. package/cjs/idx/remediators/SelectEnrollmentChannel.js +3 -2
  40. package/cjs/idx/remediators/SelectEnrollmentChannel.js.map +1 -1
  41. package/cjs/idx/remediators/index.js +13 -0
  42. package/cjs/idx/remediators/index.js.map +1 -1
  43. package/cjs/idx/run.js +27 -14
  44. package/cjs/idx/run.js.map +1 -1
  45. package/cjs/idx/transactionMeta.js +4 -2
  46. package/cjs/idx/transactionMeta.js.map +1 -1
  47. package/cjs/idx/types/api.js.map +1 -1
  48. package/cjs/idx/types/idx-js.js.map +1 -1
  49. package/cjs/idx/types/index.js.map +1 -1
  50. package/cjs/idx/util.js +70 -22
  51. package/cjs/idx/util.js.map +1 -1
  52. package/cjs/options/index.js +6 -0
  53. package/cjs/options/index.js.map +1 -1
  54. package/dist/okta-auth-js.min.js +1 -1
  55. package/dist/okta-auth-js.min.js.map +1 -1
  56. package/dist/okta-auth-js.umd.js +1 -1
  57. package/dist/okta-auth-js.umd.js.map +1 -1
  58. package/esm/esm.browser.js +533 -257
  59. package/esm/esm.browser.js.map +1 -1
  60. package/esm/esm.node.mjs +533 -257
  61. package/esm/esm.node.mjs.map +1 -1
  62. package/lib/idx/interact.d.ts +1 -0
  63. package/lib/idx/remediate.d.ts +2 -1
  64. package/lib/idx/remediators/AuthenticatorEnrollmentData.d.ts +1 -11
  65. package/lib/idx/remediators/AuthenticatorVerificationData.d.ts +1 -0
  66. package/lib/idx/remediators/Base/AuthenticatorData.d.ts +5 -1
  67. package/lib/idx/remediators/Base/Remediator.d.ts +4 -3
  68. package/lib/idx/remediators/Base/SelectAuthenticator.d.ts +8 -3
  69. package/lib/idx/remediators/Base/VerifyAuthenticator.d.ts +2 -1
  70. package/lib/idx/remediators/EnrollPoll.d.ts +2 -2
  71. package/lib/idx/remediators/EnrollmentChannelData.d.ts +7 -3
  72. package/lib/idx/remediators/GenericRemediator/GenericRemediator.d.ts +9 -0
  73. package/lib/idx/remediators/GenericRemediator/index.d.ts +1 -0
  74. package/lib/idx/remediators/GenericRemediator/util.d.ts +3 -0
  75. package/lib/idx/remediators/SelectAuthenticatorUnlockAccount.d.ts +1 -1
  76. package/lib/idx/remediators/SelectEnrollmentChannel.d.ts +7 -3
  77. package/lib/idx/remediators/index.d.ts +1 -0
  78. package/lib/idx/types/api.d.ts +12 -2
  79. package/lib/idx/types/idx-js.d.ts +6 -2
  80. package/lib/idx/types/index.d.ts +1 -1
  81. package/lib/idx/types/options.d.ts +2 -0
  82. package/lib/idx/util.d.ts +4 -3
  83. package/lib/types/OktaAuthOptions.d.ts +1 -0
  84. package/package.json +5 -5
@@ -58,11 +58,11 @@ import _Number$isInteger from '@babel/runtime-corejs3/core-js-stable/number/is-i
58
58
  import _URL2 from '@babel/runtime-corejs3/core-js-stable/url';
59
59
  import Emitter from 'tiny-emitter';
60
60
 
61
- function _createSuper$x(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$x(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
62
- function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
61
+ function _createSuper$y(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$y(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
62
+ function _isNativeReflectConstruct$y() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
63
63
  var CustomError = function (_Error) {
64
64
  _inherits(CustomError, _Error);
65
- var _super = _createSuper$x(CustomError);
65
+ var _super = _createSuper$y(CustomError);
66
66
  function CustomError(message) {
67
67
  var _this;
68
68
  _classCallCheck(this, CustomError);
@@ -73,11 +73,11 @@ var CustomError = function (_Error) {
73
73
  return CustomError;
74
74
  }( _wrapNativeSuper(Error));
75
75
 
76
- function _createSuper$w(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$w(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
77
- function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
76
+ function _createSuper$x(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$x(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
77
+ function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
78
78
  var AuthApiError = function (_CustomError) {
79
79
  _inherits(AuthApiError, _CustomError);
80
- var _super = _createSuper$w(AuthApiError);
80
+ var _super = _createSuper$x(AuthApiError);
81
81
  function AuthApiError(err, xhr) {
82
82
  var _this;
83
83
  _classCallCheck(this, AuthApiError);
@@ -97,11 +97,11 @@ var AuthApiError = function (_CustomError) {
97
97
  return AuthApiError;
98
98
  }(CustomError);
99
99
 
100
- function _createSuper$v(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$v(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
101
- function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
100
+ function _createSuper$w(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$w(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
101
+ function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
102
102
  var AuthPollStopError = function (_CustomError) {
103
103
  _inherits(AuthPollStopError, _CustomError);
104
- var _super = _createSuper$v(AuthPollStopError);
104
+ var _super = _createSuper$w(AuthPollStopError);
105
105
  function AuthPollStopError() {
106
106
  _classCallCheck(this, AuthPollStopError);
107
107
  var message = 'The poll was stopped by the sdk';
@@ -110,11 +110,11 @@ var AuthPollStopError = function (_CustomError) {
110
110
  return AuthPollStopError;
111
111
  }(CustomError);
112
112
 
113
- function _createSuper$u(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$u(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
114
- function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
113
+ function _createSuper$v(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$v(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
114
+ function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
115
115
  var AuthSdkError = function (_CustomError) {
116
116
  _inherits(AuthSdkError, _CustomError);
117
- var _super = _createSuper$u(AuthSdkError);
117
+ var _super = _createSuper$v(AuthSdkError);
118
118
  function AuthSdkError(msg, xhr) {
119
119
  var _this;
120
120
  _classCallCheck(this, AuthSdkError);
@@ -133,11 +133,11 @@ var AuthSdkError = function (_CustomError) {
133
133
  return AuthSdkError;
134
134
  }(CustomError);
135
135
 
136
- function _createSuper$t(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$t(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
137
- function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
136
+ function _createSuper$u(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$u(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
137
+ function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
138
138
  var OAuthError = function (_CustomError) {
139
139
  _inherits(OAuthError, _CustomError);
140
- var _super = _createSuper$t(OAuthError);
140
+ var _super = _createSuper$u(OAuthError);
141
141
  function OAuthError(errorCode, summary) {
142
142
  var _this;
143
143
  _classCallCheck(this, OAuthError);
@@ -4658,6 +4658,7 @@ function mergeOptions(options, args) {
4658
4658
  }
4659
4659
  function buildOptions() {
4660
4660
  var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4661
+ var _a;
4661
4662
  assertValidConfig(args);
4662
4663
  args = mergeOptions(getDefaultOptions(), args);
4663
4664
  return removeNils({
@@ -4691,6 +4692,9 @@ function buildOptions() {
4691
4692
  codeChallengeMethod: args.codeChallengeMethod,
4692
4693
  recoveryToken: args.recoveryToken,
4693
4694
  activationToken: args.activationToken,
4695
+ idx: {
4696
+ useGenericRemediator: !!((_a = args.idx) === null || _a === void 0 ? void 0 : _a.useGenericRemediator)
4697
+ },
4694
4698
  ignoreSignature: !!args.ignoreSignature,
4695
4699
  clientSecret: args.clientSecret
4696
4700
  });
@@ -4713,6 +4717,8 @@ function _createTransactionMeta() {
4713
4717
  activationToken,
4714
4718
  _Object$assign2$recov,
4715
4719
  recoveryToken,
4720
+ _Object$assign2$maxAg,
4721
+ maxAge,
4716
4722
  meta,
4717
4723
  _args = arguments;
4718
4724
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -4725,12 +4731,13 @@ function _createTransactionMeta() {
4725
4731
  case 3:
4726
4732
  tokenParams = _context.sent;
4727
4733
  pkceMeta = createOAuthMeta(authClient, tokenParams);
4728
- _Object$assign2 = _Object$assign(_Object$assign({}, authClient.options), options), _Object$assign2$flow = _Object$assign2.flow, flow = _Object$assign2$flow === void 0 ? 'default' : _Object$assign2$flow, _Object$assign2$withC = _Object$assign2.withCredentials, withCredentials = _Object$assign2$withC === void 0 ? true : _Object$assign2$withC, _Object$assign2$activ = _Object$assign2.activationToken, activationToken = _Object$assign2$activ === void 0 ? undefined : _Object$assign2$activ, _Object$assign2$recov = _Object$assign2.recoveryToken, recoveryToken = _Object$assign2$recov === void 0 ? undefined : _Object$assign2$recov;
4734
+ _Object$assign2 = _Object$assign(_Object$assign({}, authClient.options), options), _Object$assign2$flow = _Object$assign2.flow, flow = _Object$assign2$flow === void 0 ? 'default' : _Object$assign2$flow, _Object$assign2$withC = _Object$assign2.withCredentials, withCredentials = _Object$assign2$withC === void 0 ? true : _Object$assign2$withC, _Object$assign2$activ = _Object$assign2.activationToken, activationToken = _Object$assign2$activ === void 0 ? undefined : _Object$assign2$activ, _Object$assign2$recov = _Object$assign2.recoveryToken, recoveryToken = _Object$assign2$recov === void 0 ? undefined : _Object$assign2$recov, _Object$assign2$maxAg = _Object$assign2.maxAge, maxAge = _Object$assign2$maxAg === void 0 ? undefined : _Object$assign2$maxAg;
4729
4735
  meta = _Object$assign(_Object$assign({}, pkceMeta), {
4730
4736
  flow: flow,
4731
4737
  withCredentials: withCredentials,
4732
4738
  activationToken: activationToken,
4733
- recoveryToken: recoveryToken
4739
+ recoveryToken: recoveryToken,
4740
+ maxAge: maxAge
4734
4741
  });
4735
4742
  return _context.abrupt("return", meta);
4736
4743
  case 8:
@@ -4858,6 +4865,7 @@ function _interact() {
4858
4865
  codeChallengeMethod,
4859
4866
  activationToken,
4860
4867
  recoveryToken,
4868
+ maxAge,
4861
4869
  clientSecret,
4862
4870
  url,
4863
4871
  params,
@@ -4884,31 +4892,30 @@ function _interact() {
4884
4892
  case 7:
4885
4893
  meta = _context.sent;
4886
4894
  baseUrl = getOAuthBaseUrl(authClient);
4887
- _meta = meta, clientId = _meta.clientId, redirectUri = _meta.redirectUri, state = _meta.state, scopes = _meta.scopes, withCredentials = _meta.withCredentials, codeChallenge = _meta.codeChallenge, codeChallengeMethod = _meta.codeChallengeMethod, activationToken = _meta.activationToken, recoveryToken = _meta.recoveryToken;
4895
+ _meta = meta, clientId = _meta.clientId, redirectUri = _meta.redirectUri, state = _meta.state, scopes = _meta.scopes, withCredentials = _meta.withCredentials, codeChallenge = _meta.codeChallenge, codeChallengeMethod = _meta.codeChallengeMethod, activationToken = _meta.activationToken, recoveryToken = _meta.recoveryToken, maxAge = _meta.maxAge;
4888
4896
  clientSecret = options.clientSecret || authClient.options.clientSecret;
4889
4897
  withCredentials = withCredentials !== null && withCredentials !== void 0 ? withCredentials : true;
4890
4898
  url = "".concat(baseUrl, "/v1/interact");
4891
- params = {
4899
+ params = _Object$assign(_Object$assign(_Object$assign(_Object$assign({
4892
4900
  client_id: clientId,
4893
4901
  scope: scopes.join(' '),
4894
4902
  redirect_uri: redirectUri,
4895
4903
  code_challenge: codeChallenge,
4896
4904
  code_challenge_method: codeChallengeMethod,
4897
4905
  state: state
4898
- };
4899
- if (activationToken) {
4900
- params.activation_token = activationToken;
4901
- }
4902
- if (recoveryToken) {
4903
- params.recovery_token = recoveryToken;
4904
- }
4905
- if (clientSecret) {
4906
- params.client_secret = clientSecret;
4907
- }
4906
+ }, activationToken && {
4907
+ activation_token: activationToken
4908
+ }), recoveryToken && {
4909
+ recovery_token: recoveryToken
4910
+ }), clientSecret && {
4911
+ client_secret: clientSecret
4912
+ }), maxAge && {
4913
+ max_age: maxAge
4914
+ });
4908
4915
  headers = {
4909
4916
  'Content-Type': 'application/x-www-form-urlencoded'
4910
4917
  };
4911
- _context.next = 20;
4918
+ _context.next = 17;
4912
4919
  return httpRequest(authClient, {
4913
4920
  method: 'POST',
4914
4921
  url: url,
@@ -4916,7 +4923,7 @@ function _interact() {
4916
4923
  withCredentials: withCredentials,
4917
4924
  args: params
4918
4925
  });
4919
- case 20:
4926
+ case 17:
4920
4927
  resp = _context.sent;
4921
4928
  interactionHandle = resp.interaction_handle;
4922
4929
  newMeta = _Object$assign(_Object$assign({}, meta), {
@@ -4929,7 +4936,7 @@ function _interact() {
4929
4936
  });
4930
4937
  saveTransactionMeta(authClient, newMeta);
4931
4938
  return _context.abrupt("return", getResponse(newMeta));
4932
- case 25:
4939
+ case 22:
4933
4940
  case "end":
4934
4941
  return _context.stop();
4935
4942
  }
@@ -5177,11 +5184,14 @@ var expandRelatesTo = function expandRelatesTo(idxResponse, value) {
5177
5184
  });
5178
5185
  };
5179
5186
  var convertRemediationAction = function convertRemediationAction(authClient, remediation, toPersist) {
5180
- var remediationActions = generateRemediationFunctions(authClient, [remediation], toPersist);
5181
- var actionFn = remediationActions[remediation.name];
5182
- return _Object$assign(_Object$assign({}, remediation), {
5183
- action: actionFn
5184
- });
5187
+ if (remediation.rel) {
5188
+ var remediationActions = generateRemediationFunctions(authClient, [remediation], toPersist);
5189
+ var actionFn = remediationActions[remediation.name];
5190
+ return _Object$assign(_Object$assign({}, remediation), {
5191
+ action: actionFn
5192
+ });
5193
+ }
5194
+ return remediation;
5185
5195
  };
5186
5196
  var parseIdxResponse = function parseIdxResponse(authClient, idxResponse) {
5187
5197
  var toPersist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
@@ -5215,6 +5225,7 @@ function makeIdxState$1(authClient, idxResponse, toPersist, requestDidSucceed) {
5215
5225
  var _ref = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(remediationChoice) {
5216
5226
  var paramsFromUser,
5217
5227
  remediationChoiceObject,
5228
+ actionFn,
5218
5229
  _args = arguments;
5219
5230
  return _regeneratorRuntime.wrap(function _callee$(_context) {
5220
5231
  while (1) {
@@ -5230,8 +5241,15 @@ function makeIdxState$1(authClient, idxResponse, toPersist, requestDidSucceed) {
5230
5241
  }
5231
5242
  return _context.abrupt("return", _Promise.reject("Unknown remediation choice: [".concat(remediationChoice, "]")));
5232
5243
  case 4:
5244
+ actionFn = remediationChoiceObject.action;
5245
+ if (!(typeof actionFn !== 'function')) {
5246
+ _context.next = 7;
5247
+ break;
5248
+ }
5249
+ return _context.abrupt("return", _Promise.reject("Current remediation cannot make form submit action: [".concat(remediationChoice, "]")));
5250
+ case 7:
5233
5251
  return _context.abrupt("return", remediationChoiceObject.action(paramsFromUser));
5234
- case 5:
5252
+ case 8:
5235
5253
  case "end":
5236
5254
  return _context.stop();
5237
5255
  }
@@ -5562,7 +5580,7 @@ var Remediator = function () {
5562
5580
  }
5563
5581
  }, {
5564
5582
  key: "getNextStep",
5565
- value: function getNextStep(_context) {
5583
+ value: function getNextStep(_authClient, _context) {
5566
5584
  var name = this.getName();
5567
5585
  var inputs = this.getInputs();
5568
5586
  var authenticator = this.getAuthenticator();
@@ -5699,11 +5717,11 @@ var Authenticator = function Authenticator(authenticator) {
5699
5717
  this.meta = authenticator;
5700
5718
  };
5701
5719
 
5702
- function _createSuper$s(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$s(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5703
- function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5720
+ function _createSuper$t(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$t(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5721
+ function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5704
5722
  var VerificationCodeAuthenticator = function (_Authenticator) {
5705
5723
  _inherits(VerificationCodeAuthenticator, _Authenticator);
5706
- var _super = _createSuper$s(VerificationCodeAuthenticator);
5724
+ var _super = _createSuper$t(VerificationCodeAuthenticator);
5707
5725
  function VerificationCodeAuthenticator() {
5708
5726
  _classCallCheck(this, VerificationCodeAuthenticator);
5709
5727
  return _super.apply(this, arguments);
@@ -5740,11 +5758,11 @@ var VerificationCodeAuthenticator = function (_Authenticator) {
5740
5758
  return VerificationCodeAuthenticator;
5741
5759
  }(Authenticator);
5742
5760
 
5743
- function _createSuper$r(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$r(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5744
- function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5761
+ function _createSuper$s(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$s(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5762
+ function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5745
5763
  var OktaVerifyTotp = function (_VerificationCodeAuth) {
5746
5764
  _inherits(OktaVerifyTotp, _VerificationCodeAuth);
5747
- var _super = _createSuper$r(OktaVerifyTotp);
5765
+ var _super = _createSuper$s(OktaVerifyTotp);
5748
5766
  function OktaVerifyTotp() {
5749
5767
  _classCallCheck(this, OktaVerifyTotp);
5750
5768
  return _super.apply(this, arguments);
@@ -5764,11 +5782,11 @@ var OktaVerifyTotp = function (_VerificationCodeAuth) {
5764
5782
  return OktaVerifyTotp;
5765
5783
  }(VerificationCodeAuthenticator);
5766
5784
 
5767
- function _createSuper$q(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$q(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5768
- function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5785
+ function _createSuper$r(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$r(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5786
+ function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5769
5787
  var OktaPassword = function (_Authenticator) {
5770
5788
  _inherits(OktaPassword, _Authenticator);
5771
- var _super = _createSuper$q(OktaPassword);
5789
+ var _super = _createSuper$r(OktaPassword);
5772
5790
  function OktaPassword() {
5773
5791
  _classCallCheck(this, OktaPassword);
5774
5792
  return _super.apply(this, arguments);
@@ -5804,11 +5822,11 @@ var OktaPassword = function (_Authenticator) {
5804
5822
  return OktaPassword;
5805
5823
  }(Authenticator);
5806
5824
 
5807
- function _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$p(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5808
- function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5825
+ function _createSuper$q(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$q(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5826
+ function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5809
5827
  var SecurityQuestionEnrollment = function (_Authenticator) {
5810
5828
  _inherits(SecurityQuestionEnrollment, _Authenticator);
5811
- var _super = _createSuper$p(SecurityQuestionEnrollment);
5829
+ var _super = _createSuper$q(SecurityQuestionEnrollment);
5812
5830
  function SecurityQuestionEnrollment() {
5813
5831
  _classCallCheck(this, SecurityQuestionEnrollment);
5814
5832
  return _super.apply(this, arguments);
@@ -5862,11 +5880,11 @@ var SecurityQuestionEnrollment = function (_Authenticator) {
5862
5880
  return SecurityQuestionEnrollment;
5863
5881
  }(Authenticator);
5864
5882
 
5865
- function _createSuper$o(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$o(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5866
- function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5883
+ function _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$p(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5884
+ function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5867
5885
  var SecurityQuestionVerification = function (_Authenticator) {
5868
5886
  _inherits(SecurityQuestionVerification, _Authenticator);
5869
- var _super = _createSuper$o(SecurityQuestionVerification);
5887
+ var _super = _createSuper$p(SecurityQuestionVerification);
5870
5888
  function SecurityQuestionVerification() {
5871
5889
  _classCallCheck(this, SecurityQuestionVerification);
5872
5890
  return _super.apply(this, arguments);
@@ -5907,11 +5925,11 @@ var SecurityQuestionVerification = function (_Authenticator) {
5907
5925
  return SecurityQuestionVerification;
5908
5926
  }(Authenticator);
5909
5927
 
5910
- function _createSuper$n(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$n(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5911
- function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5928
+ function _createSuper$o(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$o(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5929
+ function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5912
5930
  var WebauthnEnrollment = function (_Authenticator) {
5913
5931
  _inherits(WebauthnEnrollment, _Authenticator);
5914
- var _super = _createSuper$n(WebauthnEnrollment);
5932
+ var _super = _createSuper$o(WebauthnEnrollment);
5915
5933
  function WebauthnEnrollment() {
5916
5934
  _classCallCheck(this, WebauthnEnrollment);
5917
5935
  return _super.apply(this, arguments);
@@ -5960,11 +5978,11 @@ var WebauthnEnrollment = function (_Authenticator) {
5960
5978
  return WebauthnEnrollment;
5961
5979
  }(Authenticator);
5962
5980
 
5963
- function _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$m(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5964
- function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5981
+ function _createSuper$n(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$n(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5982
+ function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5965
5983
  var WebauthnVerification = function (_Authenticator) {
5966
5984
  _inherits(WebauthnVerification, _Authenticator);
5967
- var _super = _createSuper$m(WebauthnVerification);
5985
+ var _super = _createSuper$n(WebauthnVerification);
5968
5986
  function WebauthnVerification() {
5969
5987
  _classCallCheck(this, WebauthnVerification);
5970
5988
  return _super.apply(this, arguments);
@@ -6048,11 +6066,11 @@ function getAuthenticator(remediation) {
6048
6066
  }
6049
6067
  }
6050
6068
 
6051
- function _createSuper$l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$l(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6052
- function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6069
+ function _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$m(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6070
+ function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6053
6071
  var VerifyAuthenticator = function (_Remediator) {
6054
6072
  _inherits(VerifyAuthenticator, _Remediator);
6055
- var _super = _createSuper$l(VerifyAuthenticator);
6073
+ var _super = _createSuper$m(VerifyAuthenticator);
6056
6074
  function VerifyAuthenticator(remediation) {
6057
6075
  var _this;
6058
6076
  var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -6063,9 +6081,9 @@ var VerifyAuthenticator = function (_Remediator) {
6063
6081
  }
6064
6082
  _createClass(VerifyAuthenticator, [{
6065
6083
  key: "getNextStep",
6066
- value: function getNextStep(context) {
6084
+ value: function getNextStep(authClient, context) {
6067
6085
  var _a;
6068
- var nextStep = _get(_getPrototypeOf(VerifyAuthenticator.prototype), "getNextStep", this).call(this, context);
6086
+ var nextStep = _get(_getPrototypeOf(VerifyAuthenticator.prototype), "getNextStep", this).call(this, authClient, context);
6069
6087
  var authenticatorEnrollments = (_a = context === null || context === void 0 ? void 0 : context.authenticatorEnrollments) === null || _a === void 0 ? void 0 : _a.value;
6070
6088
  return _Object$assign(_Object$assign({}, nextStep), {
6071
6089
  authenticatorEnrollments: authenticatorEnrollments
@@ -6103,11 +6121,11 @@ var VerifyAuthenticator = function (_Remediator) {
6103
6121
  return VerifyAuthenticator;
6104
6122
  }(Remediator);
6105
6123
 
6106
- function _createSuper$k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$k(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6107
- function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6124
+ function _createSuper$l(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$l(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6125
+ function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6108
6126
  var EnrollAuthenticator = function (_VerifyAuthenticator) {
6109
6127
  _inherits(EnrollAuthenticator, _VerifyAuthenticator);
6110
- var _super = _createSuper$k(EnrollAuthenticator);
6128
+ var _super = _createSuper$l(EnrollAuthenticator);
6111
6129
  function EnrollAuthenticator() {
6112
6130
  _classCallCheck(this, EnrollAuthenticator);
6113
6131
  return _super.apply(this, arguments);
@@ -6116,11 +6134,11 @@ var EnrollAuthenticator = function (_VerifyAuthenticator) {
6116
6134
  }(VerifyAuthenticator);
6117
6135
  EnrollAuthenticator.remediationName = 'enroll-authenticator';
6118
6136
 
6119
- function _createSuper$j(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$j(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6120
- function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6137
+ function _createSuper$k(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$k(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6138
+ function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6121
6139
  var EnrollPoll = function (_Remediator) {
6122
6140
  _inherits(EnrollPoll, _Remediator);
6123
- var _super = _createSuper$j(EnrollPoll);
6141
+ var _super = _createSuper$k(EnrollPoll);
6124
6142
  function EnrollPoll() {
6125
6143
  _classCallCheck(this, EnrollPoll);
6126
6144
  return _super.apply(this, arguments);
@@ -6132,8 +6150,8 @@ var EnrollPoll = function (_Remediator) {
6132
6150
  }
6133
6151
  }, {
6134
6152
  key: "getNextStep",
6135
- value: function getNextStep(context) {
6136
- var common = _get(_getPrototypeOf(EnrollPoll.prototype), "getNextStep", this).call(this, context);
6153
+ value: function getNextStep(authClient, context) {
6154
+ var common = _get(_getPrototypeOf(EnrollPoll.prototype), "getNextStep", this).call(this, authClient, context);
6137
6155
  var authenticator = this.getAuthenticator();
6138
6156
  if (!authenticator && (context === null || context === void 0 ? void 0 : context.currentAuthenticator)) {
6139
6157
  authenticator = context.currentAuthenticator.value;
@@ -6163,11 +6181,11 @@ var EnrollPoll = function (_Remediator) {
6163
6181
  }(Remediator);
6164
6182
  EnrollPoll.remediationName = 'enroll-poll';
6165
6183
 
6166
- function _createSuper$i(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$i(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6167
- function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6184
+ function _createSuper$j(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$j(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6185
+ function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6168
6186
  var SelectEnrollmentChannel = function (_Remediator) {
6169
6187
  _inherits(SelectEnrollmentChannel, _Remediator);
6170
- var _super = _createSuper$i(SelectEnrollmentChannel);
6188
+ var _super = _createSuper$j(SelectEnrollmentChannel);
6171
6189
  function SelectEnrollmentChannel() {
6172
6190
  _classCallCheck(this, SelectEnrollmentChannel);
6173
6191
  return _super.apply(this, arguments);
@@ -6179,8 +6197,8 @@ var SelectEnrollmentChannel = function (_Remediator) {
6179
6197
  }
6180
6198
  }, {
6181
6199
  key: "getNextStep",
6182
- value: function getNextStep(context) {
6183
- var common = _get(_getPrototypeOf(SelectEnrollmentChannel.prototype), "getNextStep", this).call(this);
6200
+ value: function getNextStep(authClient, context) {
6201
+ var common = _get(_getPrototypeOf(SelectEnrollmentChannel.prototype), "getNextStep", this).call(this, authClient, context);
6184
6202
  var options = this.getChannels();
6185
6203
  var authenticator = context.currentAuthenticator.value;
6186
6204
  return _Object$assign(_Object$assign(_Object$assign({}, common), options && {
@@ -6230,11 +6248,11 @@ var SelectEnrollmentChannel = function (_Remediator) {
6230
6248
  }(Remediator);
6231
6249
  SelectEnrollmentChannel.remediationName = 'select-enrollment-channel';
6232
6250
 
6233
- function _createSuper$h(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$h(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6234
- function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6251
+ function _createSuper$i(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$i(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6252
+ function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6235
6253
  var EnrollmentChannelData = function (_Remediator) {
6236
6254
  _inherits(EnrollmentChannelData, _Remediator);
6237
- var _super = _createSuper$h(EnrollmentChannelData);
6255
+ var _super = _createSuper$i(EnrollmentChannelData);
6238
6256
  function EnrollmentChannelData() {
6239
6257
  _classCallCheck(this, EnrollmentChannelData);
6240
6258
  return _super.apply(this, arguments);
@@ -6266,8 +6284,8 @@ var EnrollmentChannelData = function (_Remediator) {
6266
6284
  }
6267
6285
  }, {
6268
6286
  key: "getNextStep",
6269
- value: function getNextStep(context) {
6270
- var common = _get(_getPrototypeOf(EnrollmentChannelData.prototype), "getNextStep", this).call(this);
6287
+ value: function getNextStep(authClient, context) {
6288
+ var common = _get(_getPrototypeOf(EnrollmentChannelData.prototype), "getNextStep", this).call(this, authClient, context);
6271
6289
  var authenticator = context.currentAuthenticator.value;
6272
6290
  return _Object$assign(_Object$assign({}, common), {
6273
6291
  authenticator: authenticator
@@ -6300,11 +6318,11 @@ var EnrollmentChannelData = function (_Remediator) {
6300
6318
  }(Remediator);
6301
6319
  EnrollmentChannelData.remediationName = 'enrollment-channel-data';
6302
6320
 
6303
- function _createSuper$g(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$g(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6304
- function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6321
+ function _createSuper$h(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$h(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6322
+ function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6305
6323
  var ChallengeAuthenticator = function (_VerifyAuthenticator) {
6306
6324
  _inherits(ChallengeAuthenticator, _VerifyAuthenticator);
6307
- var _super = _createSuper$g(ChallengeAuthenticator);
6325
+ var _super = _createSuper$h(ChallengeAuthenticator);
6308
6326
  function ChallengeAuthenticator() {
6309
6327
  _classCallCheck(this, ChallengeAuthenticator);
6310
6328
  return _super.apply(this, arguments);
@@ -6313,11 +6331,11 @@ var ChallengeAuthenticator = function (_VerifyAuthenticator) {
6313
6331
  }(VerifyAuthenticator);
6314
6332
  ChallengeAuthenticator.remediationName = 'challenge-authenticator';
6315
6333
 
6316
- function _createSuper$f(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$f(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6317
- function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6334
+ function _createSuper$g(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$g(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6335
+ function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6318
6336
  var ChallengePoll = function (_EnrollPoll) {
6319
6337
  _inherits(ChallengePoll, _EnrollPoll);
6320
- var _super = _createSuper$f(ChallengePoll);
6338
+ var _super = _createSuper$g(ChallengePoll);
6321
6339
  function ChallengePoll() {
6322
6340
  _classCallCheck(this, ChallengePoll);
6323
6341
  return _super.apply(this, arguments);
@@ -6332,11 +6350,11 @@ var ChallengePoll = function (_EnrollPoll) {
6332
6350
  }(EnrollPoll);
6333
6351
  ChallengePoll.remediationName = 'challenge-poll';
6334
6352
 
6335
- function _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$e(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6336
- function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6353
+ function _createSuper$f(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$f(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6354
+ function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6337
6355
  var ResetAuthenticator = function (_VerifyAuthenticator) {
6338
6356
  _inherits(ResetAuthenticator, _VerifyAuthenticator);
6339
- var _super = _createSuper$e(ResetAuthenticator);
6357
+ var _super = _createSuper$f(ResetAuthenticator);
6340
6358
  function ResetAuthenticator() {
6341
6359
  _classCallCheck(this, ResetAuthenticator);
6342
6360
  return _super.apply(this, arguments);
@@ -6345,11 +6363,11 @@ var ResetAuthenticator = function (_VerifyAuthenticator) {
6345
6363
  }(VerifyAuthenticator);
6346
6364
  ResetAuthenticator.remediationName = 'reset-authenticator';
6347
6365
 
6348
- function _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6349
- function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6366
+ function _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$e(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6367
+ function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6350
6368
  var EnrollProfile = function (_Remediator) {
6351
6369
  _inherits(EnrollProfile, _Remediator);
6352
- var _super = _createSuper$d(EnrollProfile);
6370
+ var _super = _createSuper$e(EnrollProfile);
6353
6371
  function EnrollProfile() {
6354
6372
  _classCallCheck(this, EnrollProfile);
6355
6373
  return _super.apply(this, arguments);
@@ -6411,11 +6429,11 @@ var EnrollProfile = function (_Remediator) {
6411
6429
  }(Remediator);
6412
6430
  EnrollProfile.remediationName = 'enroll-profile';
6413
6431
 
6414
- function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6415
- function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6432
+ function _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6433
+ function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6416
6434
  var Identify = function (_Remediator) {
6417
6435
  _inherits(Identify, _Remediator);
6418
- var _super = _createSuper$c(Identify);
6436
+ var _super = _createSuper$d(Identify);
6419
6437
  function Identify() {
6420
6438
  var _this;
6421
6439
  _classCallCheck(this, Identify);
@@ -6458,11 +6476,11 @@ var Identify = function (_Remediator) {
6458
6476
  }(Remediator);
6459
6477
  Identify.remediationName = 'identify';
6460
6478
 
6461
- function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6462
- function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6479
+ function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6480
+ function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6463
6481
  var ReEnrollAuthenticator = function (_Remediator) {
6464
6482
  _inherits(ReEnrollAuthenticator, _Remediator);
6465
- var _super = _createSuper$b(ReEnrollAuthenticator);
6483
+ var _super = _createSuper$c(ReEnrollAuthenticator);
6466
6484
  function ReEnrollAuthenticator() {
6467
6485
  _classCallCheck(this, ReEnrollAuthenticator);
6468
6486
  return _super.apply(this, arguments);
@@ -6492,11 +6510,11 @@ var ReEnrollAuthenticator = function (_Remediator) {
6492
6510
  }(Remediator);
6493
6511
  ReEnrollAuthenticator.remediationName = 'reenroll-authenticator';
6494
6512
 
6495
- function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6496
- function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6513
+ function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6514
+ function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6497
6515
  var RedirectIdp = function (_Remediator) {
6498
6516
  _inherits(RedirectIdp, _Remediator);
6499
- var _super = _createSuper$a(RedirectIdp);
6517
+ var _super = _createSuper$b(RedirectIdp);
6500
6518
  function RedirectIdp() {
6501
6519
  _classCallCheck(this, RedirectIdp);
6502
6520
  return _super.apply(this, arguments);
@@ -6527,13 +6545,13 @@ var RedirectIdp = function (_Remediator) {
6527
6545
  RedirectIdp.remediationName = 'redirect-idp';
6528
6546
 
6529
6547
  function _createForOfIteratorHelper$2(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$2(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
6530
- function _unsupportedIterableToArray$2(o, minLen) { var _context4; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); var n = _sliceInstanceProperty(_context4 = Object.prototype.toString.call(o)).call(_context4, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); }
6548
+ function _unsupportedIterableToArray$2(o, minLen) { var _context5; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$2(o, minLen); var n = _sliceInstanceProperty(_context5 = Object.prototype.toString.call(o)).call(_context5, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$2(o, minLen); }
6531
6549
  function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
6532
- function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6533
- function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6550
+ function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6551
+ function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6534
6552
  var SelectAuthenticator = function (_Remediator) {
6535
6553
  _inherits(SelectAuthenticator, _Remediator);
6536
- var _super = _createSuper$9(SelectAuthenticator);
6554
+ var _super = _createSuper$a(SelectAuthenticator);
6537
6555
  function SelectAuthenticator() {
6538
6556
  _classCallCheck(this, SelectAuthenticator);
6539
6557
  return _super.apply(this, arguments);
@@ -6589,9 +6607,9 @@ var SelectAuthenticator = function (_Remediator) {
6589
6607
  }
6590
6608
  }, {
6591
6609
  key: "getNextStep",
6592
- value: function getNextStep() {
6610
+ value: function getNextStep(authClient) {
6593
6611
  var _context;
6594
- var common = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getNextStep", this).call(this);
6612
+ var common = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getNextStep", this).call(this, authClient);
6595
6613
  var authenticatorFromRemediation = getAuthenticatorFromRemediation(this.remediation);
6596
6614
  var options = _mapInstanceProperty(_context = authenticatorFromRemediation.options).call(_context, function (option) {
6597
6615
  var label = option.label,
@@ -6630,19 +6648,29 @@ var SelectAuthenticator = function (_Remediator) {
6630
6648
  }
6631
6649
  }, {
6632
6650
  key: "getInputAuthenticator",
6633
- value: function getInputAuthenticator() {
6651
+ value: function getInputAuthenticator(remediation) {
6652
+ var _context3;
6653
+ var options = _mapInstanceProperty(_context3 = remediation.options).call(_context3, function (_ref3) {
6654
+ var label = _ref3.label,
6655
+ relatesTo = _ref3.relatesTo;
6656
+ return {
6657
+ label: label,
6658
+ value: relatesTo.key
6659
+ };
6660
+ });
6634
6661
  return {
6635
6662
  name: 'authenticator',
6636
- key: 'string'
6663
+ type: 'string',
6664
+ options: options
6637
6665
  };
6638
6666
  }
6639
6667
  }, {
6640
6668
  key: "getValuesAfterProceed",
6641
6669
  value: function getValuesAfterProceed() {
6642
- var _context3,
6670
+ var _context4,
6643
6671
  _this = this;
6644
6672
  this.values = _get(_getPrototypeOf(SelectAuthenticator.prototype), "getValuesAfterProceed", this).call(this);
6645
- var authenticators = _filterInstanceProperty(_context3 = _valuesInstanceProperty(this).authenticators).call(_context3, function (authenticator) {
6673
+ var authenticators = _filterInstanceProperty(_context4 = _valuesInstanceProperty(this).authenticators).call(_context4, function (authenticator) {
6646
6674
  return compareAuthenticators(authenticator, _this.selectedAuthenticator) !== true;
6647
6675
  });
6648
6676
  return _Object$assign(_Object$assign({}, _valuesInstanceProperty(this)), {
@@ -6653,11 +6681,11 @@ var SelectAuthenticator = function (_Remediator) {
6653
6681
  return SelectAuthenticator;
6654
6682
  }(Remediator);
6655
6683
 
6656
- function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6657
- function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6684
+ function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6685
+ function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6658
6686
  var SelectAuthenticatorAuthenticate = function (_SelectAuthenticator) {
6659
6687
  _inherits(SelectAuthenticatorAuthenticate, _SelectAuthenticator);
6660
- var _super = _createSuper$8(SelectAuthenticatorAuthenticate);
6688
+ var _super = _createSuper$9(SelectAuthenticatorAuthenticate);
6661
6689
  function SelectAuthenticatorAuthenticate(remediation) {
6662
6690
  var _this;
6663
6691
  var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -6682,11 +6710,11 @@ var SelectAuthenticatorAuthenticate = function (_SelectAuthenticator) {
6682
6710
  }(SelectAuthenticator);
6683
6711
  SelectAuthenticatorAuthenticate.remediationName = 'select-authenticator-authenticate';
6684
6712
 
6685
- function _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6686
- function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6713
+ function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6714
+ function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6687
6715
  var SelectAuthenticatorEnroll = function (_SelectAuthenticator) {
6688
6716
  _inherits(SelectAuthenticatorEnroll, _SelectAuthenticator);
6689
- var _super = _createSuper$7(SelectAuthenticatorEnroll);
6717
+ var _super = _createSuper$8(SelectAuthenticatorEnroll);
6690
6718
  function SelectAuthenticatorEnroll() {
6691
6719
  _classCallCheck(this, SelectAuthenticatorEnroll);
6692
6720
  return _super.apply(this, arguments);
@@ -6695,11 +6723,11 @@ var SelectAuthenticatorEnroll = function (_SelectAuthenticator) {
6695
6723
  }(SelectAuthenticator);
6696
6724
  SelectAuthenticatorEnroll.remediationName = 'select-authenticator-enroll';
6697
6725
 
6698
- function _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6699
- function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6726
+ function _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6727
+ function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6700
6728
  var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
6701
6729
  _inherits(SelectAuthenticatorUnlockAccount, _SelectAuthenticator);
6702
- var _super = _createSuper$6(SelectAuthenticatorUnlockAccount);
6730
+ var _super = _createSuper$7(SelectAuthenticatorUnlockAccount);
6703
6731
  function SelectAuthenticatorUnlockAccount() {
6704
6732
  var _this;
6705
6733
  _classCallCheck(this, SelectAuthenticatorUnlockAccount);
@@ -6738,7 +6766,7 @@ var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
6738
6766
  value: function getInputUsername() {
6739
6767
  return {
6740
6768
  name: 'username',
6741
- key: 'string'
6769
+ type: 'string'
6742
6770
  };
6743
6771
  }
6744
6772
  }]);
@@ -6746,11 +6774,11 @@ var SelectAuthenticatorUnlockAccount = function (_SelectAuthenticator) {
6746
6774
  }(SelectAuthenticator);
6747
6775
  SelectAuthenticatorUnlockAccount.remediationName = 'select-authenticator-unlock-account';
6748
6776
 
6749
- function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6750
- function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6777
+ function _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6778
+ function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6751
6779
  var SelectEnrollProfile = function (_Remediator) {
6752
6780
  _inherits(SelectEnrollProfile, _Remediator);
6753
- var _super = _createSuper$5(SelectEnrollProfile);
6781
+ var _super = _createSuper$6(SelectEnrollProfile);
6754
6782
  function SelectEnrollProfile() {
6755
6783
  _classCallCheck(this, SelectEnrollProfile);
6756
6784
  return _super.apply(this, arguments);
@@ -6765,11 +6793,11 @@ var SelectEnrollProfile = function (_Remediator) {
6765
6793
  }(Remediator);
6766
6794
  SelectEnrollProfile.remediationName = 'select-enroll-profile';
6767
6795
 
6768
- function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6769
- function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6796
+ function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6797
+ function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6770
6798
  var AuthenticatorData = function (_Remediator) {
6771
6799
  _inherits(AuthenticatorData, _Remediator);
6772
- var _super = _createSuper$4(AuthenticatorData);
6800
+ var _super = _createSuper$5(AuthenticatorData);
6773
6801
  function AuthenticatorData(remediation) {
6774
6802
  var _this;
6775
6803
  var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -6818,8 +6846,8 @@ var AuthenticatorData = function (_Remediator) {
6818
6846
  }
6819
6847
  }, {
6820
6848
  key: "getNextStep",
6821
- value: function getNextStep() {
6822
- var common = _get(_getPrototypeOf(AuthenticatorData.prototype), "getNextStep", this).call(this);
6849
+ value: function getNextStep(authClient) {
6850
+ var common = _get(_getPrototypeOf(AuthenticatorData.prototype), "getNextStep", this).call(this, authClient);
6823
6851
  var options = this.getMethodTypes();
6824
6852
  return _Object$assign(_Object$assign({}, common), options && {
6825
6853
  options: options
@@ -6883,11 +6911,11 @@ var AuthenticatorData = function (_Remediator) {
6883
6911
  return AuthenticatorData;
6884
6912
  }(Remediator);
6885
6913
 
6886
- function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6887
- function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6914
+ function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6915
+ function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6888
6916
  var AuthenticatorVerificationData = function (_AuthenticatorData) {
6889
6917
  _inherits(AuthenticatorVerificationData, _AuthenticatorData);
6890
- var _super = _createSuper$3(AuthenticatorVerificationData);
6918
+ var _super = _createSuper$4(AuthenticatorVerificationData);
6891
6919
  function AuthenticatorVerificationData(remediation) {
6892
6920
  var _this;
6893
6921
  var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -6938,7 +6966,8 @@ var AuthenticatorVerificationData = function (_AuthenticatorData) {
6938
6966
  return {
6939
6967
  name: 'methodType',
6940
6968
  type: 'string',
6941
- required: true
6969
+ required: true,
6970
+ options: methodType.options
6942
6971
  };
6943
6972
  }
6944
6973
  var inputs = _toConsumableArray(authenticator.form.value);
@@ -6962,11 +6991,11 @@ var AuthenticatorVerificationData = function (_AuthenticatorData) {
6962
6991
  }(AuthenticatorData);
6963
6992
  AuthenticatorVerificationData.remediationName = 'authenticator-verification-data';
6964
6993
 
6965
- function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6966
- function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6994
+ function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6995
+ function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6967
6996
  var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
6968
6997
  _inherits(AuthenticatorEnrollmentData, _AuthenticatorData);
6969
- var _super = _createSuper$2(AuthenticatorEnrollmentData);
6998
+ var _super = _createSuper$3(AuthenticatorEnrollmentData);
6970
6999
  function AuthenticatorEnrollmentData() {
6971
7000
  _classCallCheck(this, AuthenticatorEnrollmentData);
6972
7001
  return _super.apply(this, arguments);
@@ -6988,17 +7017,22 @@ var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
6988
7017
  }
6989
7018
  }, {
6990
7019
  key: "getInputAuthenticator",
6991
- value: function getInputAuthenticator() {
6992
- return [{
7020
+ value: function getInputAuthenticator(remediation) {
7021
+ var _context2;
7022
+ return _mapInstanceProperty(_context2 = [{
6993
7023
  name: 'methodType',
6994
- type: 'string',
6995
- required: true
7024
+ type: 'string'
6996
7025
  }, {
6997
7026
  name: 'phoneNumber',
6998
- type: 'string',
6999
- required: true,
7000
- label: 'Phone Number'
7001
- }];
7027
+ label: 'Phone Number',
7028
+ type: 'string'
7029
+ }]).call(_context2, function (item) {
7030
+ var _context3;
7031
+ var value = _findInstanceProperty(_context3 = remediation.form.value).call(_context3, function (val) {
7032
+ return val.name === item.name;
7033
+ });
7034
+ return _Object$assign(_Object$assign({}, value), item);
7035
+ });
7002
7036
  }
7003
7037
  }, {
7004
7038
  key: "mapAuthenticatorDataFromValues",
@@ -7017,11 +7051,11 @@ var AuthenticatorEnrollmentData = function (_AuthenticatorData) {
7017
7051
  }(AuthenticatorData);
7018
7052
  AuthenticatorEnrollmentData.remediationName = 'authenticator-enrollment-data';
7019
7053
 
7020
- function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
7021
- function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
7054
+ function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
7055
+ function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
7022
7056
  var Skip = function (_Remediator) {
7023
7057
  _inherits(Skip, _Remediator);
7024
- var _super = _createSuper$1(Skip);
7058
+ var _super = _createSuper$2(Skip);
7025
7059
  function Skip() {
7026
7060
  _classCallCheck(this, Skip);
7027
7061
  return _super.apply(this, arguments);
@@ -7036,6 +7070,231 @@ var Skip = function (_Remediator) {
7036
7070
  }(Remediator);
7037
7071
  Skip.remediationName = 'skip';
7038
7072
 
7073
+ function unwrapFormValue(remediation) {
7074
+ var res = {};
7075
+ for (var _i = 0, _Object$entries$1 = _Object$entries(remediation); _i < _Object$entries$1.length; _i++) {
7076
+ var _Object$entries$_i = _slicedToArray(_Object$entries$1[_i], 2),
7077
+ key = _Object$entries$_i[0],
7078
+ value = _Object$entries$_i[1];
7079
+ if (value === null || typeof value === 'undefined') {
7080
+ continue;
7081
+ }
7082
+ if (Array.isArray(value)) {
7083
+ res[key] = _mapInstanceProperty(value).call(value, unwrapFormValue);
7084
+ } else if (_typeof(value) === 'object') {
7085
+ var _context, _context2;
7086
+ var formKeys = _Object$keys(value);
7087
+ if (_includesInstanceProperty(_context = ['value', 'form']).call(_context, key) && formKeys.length === 1 && _includesInstanceProperty(_context2 = ['value', 'form']).call(_context2, formKeys[0])) {
7088
+ var unwrappedForm = unwrapFormValue(value);
7089
+ _Object$entries(unwrappedForm).forEach(function (_ref) {
7090
+ var _ref2 = _slicedToArray(_ref, 2),
7091
+ key = _ref2[0],
7092
+ value = _ref2[1];
7093
+ res[key] = value;
7094
+ });
7095
+ } else {
7096
+ res[key] = unwrapFormValue(value);
7097
+ }
7098
+ } else {
7099
+ res[key] = value;
7100
+ }
7101
+ }
7102
+ return res;
7103
+ }
7104
+ function hasValidInputValue(input, values) {
7105
+ var fn = function fn(input, values, requiredTracker) {
7106
+ var name = input.name,
7107
+ value = input.value,
7108
+ type = input.type,
7109
+ options = input.options,
7110
+ required = input.required;
7111
+ var isRequired = required || requiredTracker;
7112
+ if (Array.isArray(value)) {
7113
+ return _reduceInstanceProperty(value).call(value, function (acc, item) {
7114
+ return acc && fn(item, values[name], isRequired);
7115
+ }, true);
7116
+ }
7117
+ if (options) {
7118
+ if (type === 'object') {
7119
+ var _context4, _context5;
7120
+ var selectedOption = values[name];
7121
+ if (!(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.id)) {
7122
+ return false;
7123
+ }
7124
+ var optionSchema = _findInstanceProperty(options).call(options, function (option) {
7125
+ var _context3;
7126
+ var idSchema = _findInstanceProperty(_context3 = option.value).call(_context3, function (_ref3) {
7127
+ var name = _ref3.name;
7128
+ return name === 'id';
7129
+ });
7130
+ return idSchema.value === selectedOption.id;
7131
+ });
7132
+ if (!optionSchema) {
7133
+ return false;
7134
+ }
7135
+ return _reduceInstanceProperty(_context4 = _filterInstanceProperty(_context5 = optionSchema.value).call(_context5, function (_ref4) {
7136
+ var required = _ref4.required;
7137
+ return !!required;
7138
+ })).call(_context4, function (acc, _ref5) {
7139
+ var name = _ref5.name;
7140
+ return acc && !!selectedOption[name];
7141
+ }, true);
7142
+ }
7143
+ if (required === false) {
7144
+ return true;
7145
+ }
7146
+ if (required === true) {
7147
+ return !!values[name];
7148
+ }
7149
+ throw new AuthSdkError("Unknown options type, ".concat(_JSON$stringify(input)));
7150
+ }
7151
+ if (!isRequired) {
7152
+ return true;
7153
+ }
7154
+ return !!(values && values[name]);
7155
+ };
7156
+ return fn(input, values, false);
7157
+ }
7158
+
7159
+ function canProceed(authClient) {
7160
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7161
+ var meta = getSavedTransactionMeta(authClient, options);
7162
+ return !!(meta || options.stateHandle);
7163
+ }
7164
+ function proceed(_x) {
7165
+ return _proceed.apply(this, arguments);
7166
+ }
7167
+ function _proceed() {
7168
+ _proceed = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient) {
7169
+ var options,
7170
+ flow,
7171
+ state,
7172
+ meta,
7173
+ _args = arguments;
7174
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
7175
+ while (1) {
7176
+ switch (_context.prev = _context.next) {
7177
+ case 0:
7178
+ options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
7179
+ if (canProceed(authClient, options)) {
7180
+ _context.next = 3;
7181
+ break;
7182
+ }
7183
+ throw new AuthSdkError('Unable to proceed: saved transaction could not be loaded');
7184
+ case 3:
7185
+ flow = options.flow, state = options.state;
7186
+ if (!flow) {
7187
+ meta = getSavedTransactionMeta(authClient, {
7188
+ state: state
7189
+ });
7190
+ flow = meta === null || meta === void 0 ? void 0 : meta.flow;
7191
+ }
7192
+ return _context.abrupt("return", run(authClient, _Object$assign(_Object$assign({}, options), {
7193
+ flow: flow
7194
+ })));
7195
+ case 6:
7196
+ case "end":
7197
+ return _context.stop();
7198
+ }
7199
+ }
7200
+ }, _callee);
7201
+ }));
7202
+ return _proceed.apply(this, arguments);
7203
+ }
7204
+
7205
+ function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
7206
+ function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
7207
+ var GenericRemediator = function (_Remediator) {
7208
+ _inherits(GenericRemediator, _Remediator);
7209
+ var _super = _createSuper$1(GenericRemediator);
7210
+ function GenericRemediator() {
7211
+ _classCallCheck(this, GenericRemediator);
7212
+ return _super.apply(this, arguments);
7213
+ }
7214
+ _createClass(GenericRemediator, [{
7215
+ key: "canRemediate",
7216
+ value: function canRemediate() {
7217
+ var _this = this;
7218
+ if (typeof this.remediation.action !== 'function') {
7219
+ return false;
7220
+ }
7221
+ var inputs = this.getInputs();
7222
+ var res = _reduceInstanceProperty(inputs).call(inputs, function (acc, input) {
7223
+ return acc && hasValidInputValue(input, _valuesInstanceProperty(_this));
7224
+ }, true);
7225
+ return res;
7226
+ }
7227
+ }, {
7228
+ key: "getData",
7229
+ value: function getData() {
7230
+ var _context2,
7231
+ _this2 = this;
7232
+ var data = _reduceInstanceProperty(_context2 = this.getInputs()).call(_context2, function (acc, _ref) {
7233
+ var name = _ref.name;
7234
+ acc[name] = _valuesInstanceProperty(_this2)[name];
7235
+ return acc;
7236
+ }, {});
7237
+ return data;
7238
+ }
7239
+ }, {
7240
+ key: "getNextStep",
7241
+ value: function getNextStep(authClient, _context) {
7242
+ var name = this.getName();
7243
+ var inputs = this.getInputs();
7244
+ var _a = this.remediation;
7245
+ _a.href;
7246
+ _a.method;
7247
+ _a.rel;
7248
+ _a.accepts;
7249
+ _a.produces;
7250
+ _a.value;
7251
+ var action = _a.action,
7252
+ rest = __rest(_a, ["href", "method", "rel", "accepts", "produces", "value", "action"]);
7253
+ if (action) {
7254
+ return _Object$assign(_Object$assign(_Object$assign({}, rest), !!inputs.length && {
7255
+ inputs: inputs
7256
+ }), {
7257
+ action: function () {
7258
+ var _action = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(params) {
7259
+ return _regeneratorRuntime.wrap(function _callee$(_context3) {
7260
+ while (1) {
7261
+ switch (_context3.prev = _context3.next) {
7262
+ case 0:
7263
+ return _context3.abrupt("return", proceed(authClient, _Object$assign({
7264
+ step: name
7265
+ }, params)));
7266
+ case 1:
7267
+ case "end":
7268
+ return _context3.stop();
7269
+ }
7270
+ }
7271
+ }, _callee);
7272
+ }));
7273
+ function action(_x) {
7274
+ return _action.apply(this, arguments);
7275
+ }
7276
+ return action;
7277
+ }()
7278
+ });
7279
+ }
7280
+ return _Object$assign({}, this.remediation);
7281
+ }
7282
+ }, {
7283
+ key: "getInputs",
7284
+ value: function getInputs() {
7285
+ var _context4, _context5, _context6;
7286
+ return _mapInstanceProperty(_context4 = _mapInstanceProperty(_context5 = _filterInstanceProperty(_context6 = this.remediation.value || []).call(_context6, function (_ref2) {
7287
+ var name = _ref2.name;
7288
+ return name !== 'stateHandle';
7289
+ })).call(_context5, unwrapFormValue)).call(_context4, function (input) {
7290
+ input.type = input.type || 'string';
7291
+ return input;
7292
+ });
7293
+ }
7294
+ }]);
7295
+ return GenericRemediator;
7296
+ }(Remediator);
7297
+
7039
7298
  var remediators = /*#__PURE__*/Object.freeze({
7040
7299
  __proto__: null,
7041
7300
  Remediator: Remediator,
@@ -7056,11 +7315,12 @@ var remediators = /*#__PURE__*/Object.freeze({
7056
7315
  SelectEnrollProfile: SelectEnrollProfile,
7057
7316
  AuthenticatorVerificationData: AuthenticatorVerificationData,
7058
7317
  AuthenticatorEnrollmentData: AuthenticatorEnrollmentData,
7059
- Skip: Skip
7318
+ Skip: Skip,
7319
+ GenericRemediator: GenericRemediator
7060
7320
  });
7061
7321
 
7062
7322
  function _createForOfIteratorHelper$1(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
7063
- function _unsupportedIterableToArray$1(o, minLen) { var _context12; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = _sliceInstanceProperty(_context12 = Object.prototype.toString.call(o)).call(_context12, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
7323
+ function _unsupportedIterableToArray$1(o, minLen) { var _context13; if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = _sliceInstanceProperty(_context13 = Object.prototype.toString.call(o)).call(_context13, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
7064
7324
  function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7065
7325
  function isTerminalResponse(idxResponse) {
7066
7326
  var neededToProceed = idxResponse.neededToProceed,
@@ -7178,7 +7438,7 @@ function getEnabledFeatures(idxResponse) {
7178
7438
  }
7179
7439
  return res;
7180
7440
  }
7181
- function getAvailableSteps(idxResponse) {
7441
+ function getAvailableSteps(authClient, idxResponse, useGenericRemediator) {
7182
7442
  var _context9;
7183
7443
  var res = [];
7184
7444
  var remediatorMap = _reduceInstanceProperty(_context9 = _Object$values(remediators)).call(_context9, function (map, remediatorClass) {
@@ -7192,10 +7452,13 @@ function getAvailableSteps(idxResponse) {
7192
7452
  try {
7193
7453
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
7194
7454
  var remediation = _step2.value;
7195
- var T = remediatorMap[remediation.name];
7455
+ var T = getRemediatorClass(remediation, {
7456
+ useGenericRemediator: useGenericRemediator,
7457
+ remediators: remediatorMap
7458
+ });
7196
7459
  if (T) {
7197
7460
  var remediator = new T(remediation);
7198
- res.push(remediator.getNextStep(idxResponse.context));
7461
+ res.push(remediator.getNextStep(authClient, idxResponse.context));
7199
7462
  }
7200
7463
  }
7201
7464
  } catch (err) {
@@ -7203,10 +7466,44 @@ function getAvailableSteps(idxResponse) {
7203
7466
  } finally {
7204
7467
  _iterator2.f();
7205
7468
  }
7469
+ var _loop = function _loop() {
7470
+ var _Object$entries$_i = _slicedToArray(_Object$entries$1[_i], 1),
7471
+ name = _Object$entries$_i[0];
7472
+ res.push({
7473
+ name: name,
7474
+ action: function () {
7475
+ var _action = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(params) {
7476
+ return _regeneratorRuntime.wrap(function _callee$(_context10) {
7477
+ while (1) {
7478
+ switch (_context10.prev = _context10.next) {
7479
+ case 0:
7480
+ return _context10.abrupt("return", proceed(authClient, {
7481
+ actions: [{
7482
+ name: name,
7483
+ params: params
7484
+ }]
7485
+ }));
7486
+ case 1:
7487
+ case "end":
7488
+ return _context10.stop();
7489
+ }
7490
+ }
7491
+ }, _callee);
7492
+ }));
7493
+ function action(_x) {
7494
+ return _action.apply(this, arguments);
7495
+ }
7496
+ return action;
7497
+ }()
7498
+ });
7499
+ };
7500
+ for (var _i = 0, _Object$entries$1 = _Object$entries(idxResponse.actions || {}); _i < _Object$entries$1.length; _i++) {
7501
+ _loop();
7502
+ }
7206
7503
  return res;
7207
7504
  }
7208
7505
  function filterValuesForRemediation(idxResponse, remediationName, values) {
7209
- var _context10;
7506
+ var _context11;
7210
7507
  var remediations = idxResponse.neededToProceed || [];
7211
7508
  var remediation = _findInstanceProperty(remediations).call(remediations, function (r) {
7212
7509
  return r.name === remediationName;
@@ -7215,7 +7512,7 @@ function filterValuesForRemediation(idxResponse, remediationName, values) {
7215
7512
  warn("filterValuesForRemediation: \"".concat(remediationName, "\" did not match any remediations"));
7216
7513
  return values;
7217
7514
  }
7218
- var valuesForRemediation = _reduceInstanceProperty(_context10 = remediation.value).call(_context10, function (res, entry) {
7515
+ var valuesForRemediation = _reduceInstanceProperty(_context11 = remediation.value).call(_context11, function (res, entry) {
7219
7516
  var name = entry.name,
7220
7517
  value = entry.value;
7221
7518
  if (name === 'stateHandle') {
@@ -7227,8 +7524,20 @@ function filterValuesForRemediation(idxResponse, remediationName, values) {
7227
7524
  }, {});
7228
7525
  return valuesForRemediation;
7229
7526
  }
7527
+ function getRemediatorClass(remediation, options) {
7528
+ var useGenericRemediator = options.useGenericRemediator,
7529
+ remediators = options.remediators;
7530
+ if (!remediation) {
7531
+ return undefined;
7532
+ }
7533
+ if (useGenericRemediator) {
7534
+ return GenericRemediator;
7535
+ }
7536
+ return remediators[remediation.name];
7537
+ }
7230
7538
  function getRemediator(idxRemediations, values, options) {
7231
7539
  var remediators = options.remediators;
7540
+ var useGenericRemediator = options.useGenericRemediator;
7232
7541
  var remediator;
7233
7542
  if (options.step) {
7234
7543
  var remediation = _findInstanceProperty(idxRemediations).call(idxRemediations, function (_ref5) {
@@ -7236,7 +7545,7 @@ function getRemediator(idxRemediations, values, options) {
7236
7545
  return name === options.step;
7237
7546
  });
7238
7547
  if (remediation) {
7239
- var T = remediation ? remediators[remediation.name] : undefined;
7548
+ var T = getRemediatorClass(remediation, options);
7240
7549
  return T ? new T(remediation, values, options) : undefined;
7241
7550
  } else {
7242
7551
  warn("step \"".concat(options.step, "\" did not match any remediations"));
@@ -7244,32 +7553,36 @@ function getRemediator(idxRemediations, values, options) {
7244
7553
  }
7245
7554
  }
7246
7555
  var remediatorCandidates = [];
7247
- var _iterator3 = _createForOfIteratorHelper$1(idxRemediations),
7248
- _step3;
7249
- try {
7250
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
7251
- var _context11;
7252
- var _remediation = _step3.value;
7253
- var isRemeditionInFlow = _includesInstanceProperty(_context11 = _Object$keys(remediators)).call(_context11, _remediation.name);
7254
- if (!isRemeditionInFlow) {
7255
- continue;
7256
- }
7257
- var _T = remediators[_remediation.name];
7258
- remediator = new _T(_remediation, values, options);
7259
- if (remediator.canRemediate()) {
7260
- return remediator;
7556
+ if (useGenericRemediator) {
7557
+ remediatorCandidates.push(new GenericRemediator(idxRemediations[0], values, options));
7558
+ } else {
7559
+ var _iterator3 = _createForOfIteratorHelper$1(idxRemediations),
7560
+ _step3;
7561
+ try {
7562
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
7563
+ var _context12;
7564
+ var _remediation = _step3.value;
7565
+ var isRemeditionInFlow = _includesInstanceProperty(_context12 = _Object$keys(remediators)).call(_context12, _remediation.name);
7566
+ if (!isRemeditionInFlow) {
7567
+ continue;
7568
+ }
7569
+ var _T = getRemediatorClass(_remediation, options);
7570
+ remediator = new _T(_remediation, values, options);
7571
+ if (remediator.canRemediate()) {
7572
+ return remediator;
7573
+ }
7574
+ remediatorCandidates.push(remediator);
7261
7575
  }
7262
- remediatorCandidates.push(remediator);
7576
+ } catch (err) {
7577
+ _iterator3.e(err);
7578
+ } finally {
7579
+ _iterator3.f();
7263
7580
  }
7264
- } catch (err) {
7265
- _iterator3.e(err);
7266
- } finally {
7267
- _iterator3.f();
7268
7581
  }
7269
7582
  return remediatorCandidates[0];
7270
7583
  }
7271
- function getNextStep(remediator, idxResponse) {
7272
- var nextStep = remediator.getNextStep(idxResponse.context);
7584
+ function getNextStep(authClient, remediator, idxResponse) {
7585
+ var nextStep = remediator.getNextStep(authClient, idxResponse.context);
7273
7586
  var canSkip = canSkipFn(idxResponse);
7274
7587
  var canResend = canResendFn(idxResponse);
7275
7588
  return _Object$assign(_Object$assign(_Object$assign({}, nextStep), canSkip && {
@@ -7278,7 +7591,7 @@ function getNextStep(remediator, idxResponse) {
7278
7591
  canResend: canResend
7279
7592
  });
7280
7593
  }
7281
- function handleIdxError(e, remediator) {
7594
+ function handleIdxError(authClient, e, remediator) {
7282
7595
  var idxResponse = isIdxResponse(e) ? e : null;
7283
7596
  if (!idxResponse) {
7284
7597
  throw e;
@@ -7295,7 +7608,7 @@ function handleIdxError(e, remediator) {
7295
7608
  messages: messages
7296
7609
  };
7297
7610
  } else {
7298
- var nextStep = remediator && getNextStep(remediator, idxResponse);
7611
+ var nextStep = remediator && getNextStep(authClient, remediator, idxResponse);
7299
7612
  return _Object$assign({
7300
7613
  idxResponse: idxResponse,
7301
7614
  messages: messages
@@ -7331,11 +7644,11 @@ function removeActionFromOptions(options, actionName) {
7331
7644
  actions: actions
7332
7645
  });
7333
7646
  }
7334
- function remediate(_x, _x2, _x3) {
7647
+ function remediate(_x, _x2, _x3, _x4) {
7335
7648
  return _remediate.apply(this, arguments);
7336
7649
  }
7337
7650
  function _remediate() {
7338
- _remediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(idxResponse, values, options) {
7651
+ _remediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient, idxResponse, values, options) {
7339
7652
  var _context2;
7340
7653
  var _idxResponse, neededToProceed, interactionCode, _options, flow, remediator, actionFromValues, actionFromOptions, actions, _iterator, _step, _loop, _ret, terminal, messages, nextStep, name, data;
7341
7654
  return _regeneratorRuntime.wrap(function _callee$(_context4) {
@@ -7394,7 +7707,7 @@ function _remediate() {
7394
7707
  _context3.prev = 13;
7395
7708
  _context3.t0 = _context3["catch"](6);
7396
7709
  return _context3.abrupt("return", {
7397
- v: handleIdxError(_context3.t0, remediator)
7710
+ v: handleIdxError(authClient, _context3.t0, remediator)
7398
7711
  });
7399
7712
  case 16:
7400
7713
  if (!(action === 'cancel')) {
@@ -7409,7 +7722,7 @@ function _remediate() {
7409
7722
  });
7410
7723
  case 18:
7411
7724
  return _context3.abrupt("return", {
7412
- v: remediate(idxResponse, valuesWithoutExecutedAction, optionsWithoutExecutedAction)
7725
+ v: remediate(authClient, idxResponse, valuesWithoutExecutedAction, optionsWithoutExecutedAction)
7413
7726
  });
7414
7727
  case 19:
7415
7728
  remediationAction = _findInstanceProperty(neededToProceed).call(neededToProceed, function (_ref) {
@@ -7434,11 +7747,11 @@ function _remediate() {
7434
7747
  _context3.prev = 28;
7435
7748
  _context3.t1 = _context3["catch"](21);
7436
7749
  return _context3.abrupt("return", {
7437
- v: handleIdxError(_context3.t1, remediator)
7750
+ v: handleIdxError(authClient, _context3.t1, remediator)
7438
7751
  });
7439
7752
  case 31:
7440
7753
  return _context3.abrupt("return", {
7441
- v: remediate(idxResponse, values, optionsWithoutExecutedAction)
7754
+ v: remediate(authClient, idxResponse, values, optionsWithoutExecutedAction)
7442
7755
  });
7443
7756
  case 32:
7444
7757
  case "end":
@@ -7511,7 +7824,7 @@ function _remediate() {
7511
7824
  case 43:
7512
7825
  _context4.prev = 43;
7513
7826
  _context4.t2 = _context4["catch"](35);
7514
- return _context4.abrupt("return", handleIdxError(_context4.t2));
7827
+ return _context4.abrupt("return", handleIdxError(authClient, _context4.t2));
7515
7828
  case 46:
7516
7829
  if (!(flow === 'default')) {
7517
7830
  _context4.next = 48;
@@ -7529,7 +7842,7 @@ function _remediate() {
7529
7842
  _context4.next = 52;
7530
7843
  break;
7531
7844
  }
7532
- nextStep = getNextStep(remediator, idxResponse);
7845
+ nextStep = getNextStep(authClient, remediator, idxResponse);
7533
7846
  return _context4.abrupt("return", {
7534
7847
  idxResponse: idxResponse,
7535
7848
  nextStep: nextStep,
@@ -7550,11 +7863,11 @@ function _remediate() {
7550
7863
  options = _Object$assign(_Object$assign({}, options), {
7551
7864
  step: undefined
7552
7865
  });
7553
- return _context4.abrupt("return", remediate(idxResponse, values, options));
7866
+ return _context4.abrupt("return", remediate(authClient, idxResponse, values, options));
7554
7867
  case 64:
7555
7868
  _context4.prev = 64;
7556
7869
  _context4.t3 = _context4["catch"](54);
7557
- return _context4.abrupt("return", handleIdxError(_context4.t3, remediator));
7870
+ return _context4.abrupt("return", handleIdxError(authClient, _context4.t3, remediator));
7558
7871
  case 67:
7559
7872
  case "end":
7560
7873
  return _context4.stop();
@@ -7663,11 +7976,13 @@ function initializeValues(options) {
7663
7976
  return values;
7664
7977
  }
7665
7978
  function initializeData(authClient, data) {
7979
+ var _a;
7666
7980
  var options = data.options;
7667
7981
  var flow = options.flow,
7668
7982
  withCredentials = options.withCredentials,
7669
7983
  remediators = options.remediators,
7670
- actions = options.actions;
7984
+ actions = options.actions,
7985
+ useGenericRemediator = options.useGenericRemediator;
7671
7986
  var status = IdxStatus.PENDING;
7672
7987
  flow = flow || authClient.idx.getFlow() || 'default';
7673
7988
  if (flow) {
@@ -7677,12 +7992,14 @@ function initializeData(authClient, data) {
7677
7992
  remediators = remediators || flowSpec.remediators;
7678
7993
  actions = actions || flowSpec.actions;
7679
7994
  }
7995
+ useGenericRemediator = useGenericRemediator || ((_a = authClient.options.idx) === null || _a === void 0 ? void 0 : _a.useGenericRemediator) || false;
7680
7996
  return _Object$assign(_Object$assign({}, data), {
7681
7997
  options: _Object$assign(_Object$assign({}, options), {
7682
7998
  flow: flow,
7683
7999
  withCredentials: withCredentials,
7684
8000
  remediators: remediators,
7685
- actions: actions
8001
+ actions: actions,
8002
+ useGenericRemediator: useGenericRemediator
7686
8003
  }),
7687
8004
  status: status
7688
8005
  });
@@ -7692,13 +8009,13 @@ function getDataFromIntrospect(_x, _x2) {
7692
8009
  }
7693
8010
  function _getDataFromIntrospect() {
7694
8011
  _getDataFromIntrospect = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient, data) {
7695
- var options, stateHandle, withCredentials, version, state, scopes, recoveryToken, activationToken, idxResponse, meta, interactionHandle, interactResponse;
8012
+ var options, stateHandle, withCredentials, version, state, scopes, recoveryToken, activationToken, maxAge, idxResponse, meta, interactionHandle, interactResponse;
7696
8013
  return _regeneratorRuntime.wrap(function _callee$(_context) {
7697
8014
  while (1) {
7698
8015
  switch (_context.prev = _context.next) {
7699
8016
  case 0:
7700
8017
  options = data.options;
7701
- stateHandle = options.stateHandle, withCredentials = options.withCredentials, version = options.version, state = options.state, scopes = options.scopes, recoveryToken = options.recoveryToken, activationToken = options.activationToken;
8018
+ stateHandle = options.stateHandle, withCredentials = options.withCredentials, version = options.version, state = options.state, scopes = options.scopes, recoveryToken = options.recoveryToken, activationToken = options.activationToken, maxAge = options.maxAge;
7702
8019
  meta = getSavedTransactionMeta(authClient, {
7703
8020
  state: state,
7704
8021
  recoveryToken: recoveryToken,
@@ -7731,7 +8048,8 @@ function _getDataFromIntrospect() {
7731
8048
  state: state,
7732
8049
  scopes: scopes,
7733
8050
  activationToken: activationToken,
7734
- recoveryToken: recoveryToken
8051
+ recoveryToken: recoveryToken,
8052
+ maxAge: maxAge
7735
8053
  });
7736
8054
  case 14:
7737
8055
  interactResponse = _context.sent;
@@ -7760,18 +8078,18 @@ function _getDataFromIntrospect() {
7760
8078
  }));
7761
8079
  return _getDataFromIntrospect.apply(this, arguments);
7762
8080
  }
7763
- function getDataFromRemediate(_x3) {
8081
+ function getDataFromRemediate(_x3, _x4) {
7764
8082
  return _getDataFromRemediate.apply(this, arguments);
7765
8083
  }
7766
8084
  function _getDataFromRemediate() {
7767
- _getDataFromRemediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee2(data) {
7768
- var idxResponse, options, values, autoRemediate, remediators, actions, flow, step, shouldProceedWithEmailAuthenticator, shouldRemediate, _yield$remediate, idxResponseFromRemediation, nextStep, canceled;
8085
+ _getDataFromRemediate = _asyncToGenerator( _regeneratorRuntime.mark(function _callee2(authClient, data) {
8086
+ var idxResponse, options, values, autoRemediate, remediators, actions, flow, step, shouldProceedWithEmailAuthenticator, useGenericRemediator, shouldRemediate, _yield$remediate, idxResponseFromRemediation, nextStep, canceled;
7769
8087
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
7770
8088
  while (1) {
7771
8089
  switch (_context2.prev = _context2.next) {
7772
8090
  case 0:
7773
8091
  idxResponse = data.idxResponse, options = data.options, values = _valuesInstanceProperty(data);
7774
- autoRemediate = options.autoRemediate, remediators = options.remediators, actions = options.actions, flow = options.flow, step = options.step, shouldProceedWithEmailAuthenticator = options.shouldProceedWithEmailAuthenticator;
8092
+ autoRemediate = options.autoRemediate, remediators = options.remediators, actions = options.actions, flow = options.flow, step = options.step, shouldProceedWithEmailAuthenticator = options.shouldProceedWithEmailAuthenticator, useGenericRemediator = options.useGenericRemediator;
7775
8093
  shouldRemediate = autoRemediate !== false && (remediators || actions || step);
7776
8094
  if (shouldRemediate) {
7777
8095
  _context2.next = 5;
@@ -7783,12 +8101,13 @@ function _getDataFromRemediate() {
7783
8101
  stateHandle: idxResponse.rawIdxState.stateHandle
7784
8102
  });
7785
8103
  _context2.next = 8;
7786
- return remediate(idxResponse, values, {
8104
+ return remediate(authClient, idxResponse, values, {
7787
8105
  remediators: remediators,
7788
8106
  actions: actions,
7789
8107
  flow: flow,
7790
8108
  step: step,
7791
- shouldProceedWithEmailAuthenticator: shouldProceedWithEmailAuthenticator
8109
+ shouldProceedWithEmailAuthenticator: shouldProceedWithEmailAuthenticator,
8110
+ useGenericRemediator: useGenericRemediator
7792
8111
  });
7793
8112
  case 8:
7794
8113
  _yield$remediate = _context2.sent;
@@ -7810,7 +8129,7 @@ function _getDataFromRemediate() {
7810
8129
  }));
7811
8130
  return _getDataFromRemediate.apply(this, arguments);
7812
8131
  }
7813
- function getTokens(_x4, _x5) {
8132
+ function getTokens(_x5, _x6) {
7814
8133
  return _getTokens.apply(this, arguments);
7815
8134
  }
7816
8135
  function _getTokens() {
@@ -7844,7 +8163,7 @@ function _getTokens() {
7844
8163
  }));
7845
8164
  return _getTokens.apply(this, arguments);
7846
8165
  }
7847
- function finalizeData(_x6, _x7) {
8166
+ function finalizeData(_x7, _x8) {
7848
8167
  return _finalizeData.apply(this, arguments);
7849
8168
  }
7850
8169
  function _finalizeData() {
@@ -7862,7 +8181,7 @@ function _finalizeData() {
7862
8181
  if (idxResponse) {
7863
8182
  shouldSaveResponse = !!(idxResponse.requestDidSucceed || idxResponse.stepUp);
7864
8183
  enabledFeatures = getEnabledFeatures(idxResponse);
7865
- availableSteps = getAvailableSteps(idxResponse);
8184
+ availableSteps = getAvailableSteps(authClient, idxResponse, options.useGenericRemediator);
7866
8185
  messages = getMessagesFromResponse(idxResponse);
7867
8186
  terminal = isTerminalResponse(idxResponse);
7868
8187
  }
@@ -7953,7 +8272,7 @@ function handleError(err, data) {
7953
8272
  shouldClearTransaction: shouldClearTransaction
7954
8273
  });
7955
8274
  }
7956
- function run(_x8) {
8275
+ function run(_x9) {
7957
8276
  return _run.apply(this, arguments);
7958
8277
  }
7959
8278
  function _run() {
@@ -7984,6 +8303,7 @@ function _run() {
7984
8303
  proceed,
7985
8304
  rawIdxState,
7986
8305
  requestDidSucceed,
8306
+ stepUp,
7987
8307
  _args5 = arguments;
7988
8308
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
7989
8309
  while (1) {
@@ -8001,7 +8321,7 @@ function _run() {
8001
8321
  case 6:
8002
8322
  data = _context5.sent;
8003
8323
  _context5.next = 9;
8004
- return getDataFromRemediate(data);
8324
+ return getDataFromRemediate(authClient, data);
8005
8325
  case 9:
8006
8326
  data = _context5.sent;
8007
8327
  _context5.next = 15;
@@ -8032,8 +8352,8 @@ function _run() {
8032
8352
  });
8033
8353
  }
8034
8354
  }
8035
- _ref = idxResponse || {}, actions = _ref.actions, context = _ref.context, neededToProceed = _ref.neededToProceed, proceed = _ref.proceed, rawIdxState = _ref.rawIdxState, requestDidSucceed = _ref.requestDidSucceed;
8036
- return _context5.abrupt("return", _Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign({
8355
+ _ref = idxResponse || {}, actions = _ref.actions, context = _ref.context, neededToProceed = _ref.neededToProceed, proceed = _ref.proceed, rawIdxState = _ref.rawIdxState, requestDidSucceed = _ref.requestDidSucceed, stepUp = _ref.stepUp;
8356
+ return _context5.abrupt("return", _Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign(_Object$assign({
8037
8357
  status: status
8038
8358
  }, meta && {
8039
8359
  meta: meta
@@ -8049,6 +8369,8 @@ function _run() {
8049
8369
  messages: messages
8050
8370
  }), error && {
8051
8371
  error: error
8372
+ }), stepUp && {
8373
+ stepUp: stepUp
8052
8374
  }), {
8053
8375
  interactionCode: interactionCode,
8054
8376
  actions: actions,
@@ -8186,52 +8508,6 @@ function _handleEmailVerifyCallback() {
8186
8508
  return _handleEmailVerifyCallback.apply(this, arguments);
8187
8509
  }
8188
8510
 
8189
- function canProceed(authClient) {
8190
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8191
- var meta = getSavedTransactionMeta(authClient, options);
8192
- return !!(meta || options.stateHandle);
8193
- }
8194
- function proceed(_x) {
8195
- return _proceed.apply(this, arguments);
8196
- }
8197
- function _proceed() {
8198
- _proceed = _asyncToGenerator( _regeneratorRuntime.mark(function _callee(authClient) {
8199
- var options,
8200
- flow,
8201
- state,
8202
- meta,
8203
- _args = arguments;
8204
- return _regeneratorRuntime.wrap(function _callee$(_context) {
8205
- while (1) {
8206
- switch (_context.prev = _context.next) {
8207
- case 0:
8208
- options = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
8209
- if (canProceed(authClient, options)) {
8210
- _context.next = 3;
8211
- break;
8212
- }
8213
- throw new AuthSdkError('Unable to proceed: saved transaction could not be loaded');
8214
- case 3:
8215
- flow = options.flow, state = options.state;
8216
- if (!flow) {
8217
- meta = getSavedTransactionMeta(authClient, {
8218
- state: state
8219
- });
8220
- flow = meta === null || meta === void 0 ? void 0 : meta.flow;
8221
- }
8222
- return _context.abrupt("return", run(authClient, _Object$assign(_Object$assign({}, options), {
8223
- flow: flow
8224
- })));
8225
- case 6:
8226
- case "end":
8227
- return _context.stop();
8228
- }
8229
- }
8230
- }, _callee);
8231
- }));
8232
- return _proceed.apply(this, arguments);
8233
- }
8234
-
8235
8511
  function poll(_x) {
8236
8512
  return _poll.apply(this, arguments);
8237
8513
  }
@@ -8520,7 +8796,7 @@ function _unlockAccount() {
8520
8796
  var OktaUserAgent = function () {
8521
8797
  function OktaUserAgent() {
8522
8798
  _classCallCheck(this, OktaUserAgent);
8523
- this.environments = ["okta-auth-js/".concat("6.4.4")];
8799
+ this.environments = ["okta-auth-js/".concat("6.5.1")];
8524
8800
  }
8525
8801
  _createClass(OktaUserAgent, [{
8526
8802
  key: "addEnvironment",
@@ -8538,7 +8814,7 @@ var OktaUserAgent = function () {
8538
8814
  }, {
8539
8815
  key: "getVersion",
8540
8816
  value: function getVersion() {
8541
- return "6.4.4";
8817
+ return "6.5.1";
8542
8818
  }
8543
8819
  }, {
8544
8820
  key: "maybeAddNodeEnvironment",