@turnkey/sdk-react 4.1.2 → 4.2.0

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.
@@ -59,6 +59,7 @@ var passkeyIconError = jsxs("svg", {
59
59
  })]
60
60
  });
61
61
  var Auth = function Auth(_ref) {
62
+ var _otpConfig$otpLength2;
62
63
  var onAuthSuccess = _ref.onAuthSuccess,
63
64
  onError = _ref.onError,
64
65
  authConfig = _ref.authConfig,
@@ -67,7 +68,8 @@ var Auth = function Auth(_ref) {
67
68
  sendFromEmailAddress = _ref.sendFromEmailAddress,
68
69
  customSmsMessage = _ref.customSmsMessage,
69
70
  customAccounts = _ref.customAccounts,
70
- passkeyConfig = _ref.passkeyConfig;
71
+ passkeyConfig = _ref.passkeyConfig,
72
+ otpConfig = _ref.otpConfig;
71
73
  var _useTurnkey = useTurnkey(),
72
74
  authIframeClient = _useTurnkey.authIframeClient,
73
75
  passkeyClient = _useTurnkey.passkeyClient,
@@ -310,6 +312,7 @@ var Auth = function Auth(_ref) {
310
312
  }();
311
313
  var handleOtpLogin = /*#__PURE__*/function () {
312
314
  var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(type, value, otpType) {
315
+ var _otpConfig$otpLength, _otpConfig$alphanumer;
313
316
  var createSuborgData, resp, suborgIds, suborgId, initAuthResponse;
314
317
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
315
318
  while (1) switch (_context4.prev = _context4.next) {
@@ -349,6 +352,8 @@ var Auth = function Auth(_ref) {
349
352
  }), customSmsMessage && {
350
353
  customSmsMessage: customSmsMessage
351
354
  }), {}, {
355
+ otpLength: (_otpConfig$otpLength = otpConfig === null || otpConfig === void 0 ? void 0 : otpConfig.otpLength) !== null && _otpConfig$otpLength !== void 0 ? _otpConfig$otpLength : 6,
356
+ alphanumeric: (_otpConfig$alphanumer = otpConfig === null || otpConfig === void 0 ? void 0 : otpConfig.alphanumeric) !== null && _otpConfig$alphanumer !== void 0 ? _otpConfig$alphanumer : false,
352
357
  userIdentifier: authIframeClient === null || authIframeClient === void 0 ? void 0 : authIframeClient.iframePublicKey
353
358
  }));
354
359
  case 14:
@@ -800,7 +805,8 @@ var Auth = function Auth(_ref) {
800
805
  otpId: otpId,
801
806
  sessionLengthSeconds: authConfig.sessionLengthSeconds,
802
807
  onValidateSuccess: onAuthSuccess,
803
- onResendCode: handleResendCode
808
+ onResendCode: handleResendCode,
809
+ numBoxes: (_otpConfig$otpLength2 = otpConfig === null || otpConfig === void 0 ? void 0 : otpConfig.otpLength) !== null && _otpConfig$otpLength2 !== void 0 ? _otpConfig$otpLength2 : 6
804
810
  }), !otpId && jsx("div", {
805
811
  className: styles.tos,
806
812
  children: jsxs("span", {