@turnkey/sdk-react 4.1.3 → 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.
- package/CHANGELOG.md +36 -0
- package/dist/components/auth/Auth.d.ts +5 -0
- package/dist/components/auth/Auth.d.ts.map +1 -1
- package/dist/components/auth/Auth.js +6 -2
- package/dist/components/auth/Auth.js.map +1 -1
- package/dist/components/auth/Auth.mjs +8 -2
- package/dist/components/auth/Auth.mjs.map +1 -1
- package/dist/components/auth/OtpVerification.d.ts +1 -0
- package/dist/components/auth/OtpVerification.d.ts.map +1 -1
- package/dist/components/auth/OtpVerification.js +4 -2
- package/dist/components/auth/OtpVerification.js.map +1 -1
- package/dist/components/auth/OtpVerification.mjs +4 -2
- package/dist/components/auth/OtpVerification.mjs.map +1 -1
- package/dist/components/auth/PhoneInput.d.ts.map +1 -1
- package/dist/components/auth/PhoneInput.js +3 -3
- package/dist/components/auth/PhoneInput.js.map +1 -1
- package/dist/components/auth/PhoneInput.mjs +3 -3
- package/dist/components/auth/PhoneInput.mjs.map +1 -1
- package/dist/components/auth/otp.d.ts +1 -0
- package/dist/components/auth/otp.d.ts.map +1 -1
- package/dist/components/auth/otp.js +11 -8
- package/dist/components/auth/otp.js.map +1 -1
- package/dist/components/auth/otp.mjs +11 -8
- package/dist/components/auth/otp.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -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", {
|