@turnkey/sdk-react 5.3.2-beta.2 → 5.3.3
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 +14 -25
- package/dist/components/auth/Auth.d.ts +1 -0
- package/dist/components/auth/Auth.d.ts.map +1 -1
- package/dist/components/auth/Auth.js +15 -9
- package/dist/components/auth/Auth.js.map +1 -1
- package/dist/components/auth/Auth.mjs +28 -32
- package/dist/components/auth/Auth.mjs.map +1 -1
- package/dist/components/auth/OtpVerification.d.ts +3 -0
- package/dist/components/auth/OtpVerification.d.ts.map +1 -1
- package/dist/components/auth/OtpVerification.js +6 -0
- package/dist/components/auth/OtpVerification.js.map +1 -1
- package/dist/components/auth/OtpVerification.mjs +7 -1
- package/dist/components/auth/OtpVerification.mjs.map +1 -1
- package/package.json +13 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,37 +1,26 @@
|
|
|
1
1
|
# @turnkey/sdk-react
|
|
2
2
|
|
|
3
|
-
## 5.3.
|
|
3
|
+
## 5.3.3
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- Updated dependencies []:
|
|
8
|
-
- @turnkey/sdk-
|
|
9
|
-
- @turnkey/sdk-
|
|
10
|
-
- @turnkey/crypto@2.5.
|
|
11
|
-
- @turnkey/wallet-stamper@1.0.
|
|
12
|
-
- @turnkey/sdk-server@4.5.1-beta.2
|
|
13
|
-
|
|
14
|
-
## 5.3.2-beta.1
|
|
15
|
-
|
|
16
|
-
### Patch Changes
|
|
17
|
-
|
|
18
|
-
- Updated dependencies []:
|
|
19
|
-
- @turnkey/sdk-types@0.4.0-beta.1
|
|
20
|
-
- @turnkey/sdk-browser@5.6.1-beta.1
|
|
21
|
-
- @turnkey/crypto@2.5.1-beta.1
|
|
22
|
-
- @turnkey/wallet-stamper@1.0.9-beta.1
|
|
23
|
-
- @turnkey/sdk-server@4.5.1-beta.1
|
|
7
|
+
- Updated dependencies [[`5d8be2d`](https://github.com/tkhq/sdk/commit/5d8be2d0329070c7aa025dddb1b28f04257ae4e6)]:
|
|
8
|
+
- @turnkey/sdk-browser@5.8.0
|
|
9
|
+
- @turnkey/sdk-server@4.7.0
|
|
10
|
+
- @turnkey/crypto@2.5.0
|
|
11
|
+
- @turnkey/wallet-stamper@1.0.8
|
|
24
12
|
|
|
25
|
-
## 5.3.2
|
|
13
|
+
## 5.3.2
|
|
26
14
|
|
|
27
15
|
### Patch Changes
|
|
28
16
|
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
- @turnkey/
|
|
33
|
-
- @turnkey/
|
|
34
|
-
- @turnkey/
|
|
17
|
+
- [#833](https://github.com/tkhq/sdk/pull/833) [`1a549b7`](https://github.com/tkhq/sdk/commit/1a549b71f9a6e7ab59d52aaae7e58e34c8f2e8b5) Author [@moeodeh3](https://github.com/moeodeh3) - - Add optional `includeUnverifiedSubOrgs` to `otpConfig` in the Auth component to allow inclusion of unverified subOrgs
|
|
18
|
+
- Fix `customAccounts` being ignored for subOrgs created through OTP and external wallets
|
|
19
|
+
- Updated dependencies [[`8b39dba`](https://github.com/tkhq/sdk/commit/8b39dbabf68d3e376b5b07f26960d5b61ae87fa9), [`1a549b7`](https://github.com/tkhq/sdk/commit/1a549b71f9a6e7ab59d52aaae7e58e34c8f2e8b5)]:
|
|
20
|
+
- @turnkey/sdk-browser@5.7.0
|
|
21
|
+
- @turnkey/sdk-server@4.6.0
|
|
22
|
+
- @turnkey/crypto@2.5.0
|
|
23
|
+
- @turnkey/wallet-stamper@1.0.8
|
|
35
24
|
|
|
36
25
|
## 5.3.1
|
|
37
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth.d.ts","sourceRoot":"","sources":["../../../src/components/auth/Auth.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAenD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,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QACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,kBAAkB,CAAC,EAAE,eAAe,CAAC,4BAA4B,CAAC,CAAC;IACnE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA8tB7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -89,9 +89,9 @@ const Auth = ({
|
|
|
89
89
|
const [passkeyCreated, setPasskeyCreated] = React.useState(false);
|
|
90
90
|
const handleResendCode = async () => {
|
|
91
91
|
if (step === constants.OtpType.Email) {
|
|
92
|
-
await
|
|
92
|
+
await handleSendOtp(email, constants.OtpType.Email);
|
|
93
93
|
} else if (step === constants.OtpType.Sms) {
|
|
94
|
-
await
|
|
94
|
+
await handleSendOtp(phone, constants.OtpType.Sms);
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
React.useEffect(() => {
|
|
@@ -199,9 +199,8 @@ const Auth = ({
|
|
|
199
199
|
setLoading(undefined);
|
|
200
200
|
}
|
|
201
201
|
};
|
|
202
|
-
const
|
|
202
|
+
const handleSendOtp = async (value, otpType) => {
|
|
203
203
|
setLoading(otpType);
|
|
204
|
-
if (type === constants.FilterType.Email) ; else if (type === constants.FilterType.PhoneNumber) ;
|
|
205
204
|
const publicKey = await indexedDbClient.getPublicKey();
|
|
206
205
|
const initAuthResponse = await sdkServer.server.sendOtp({
|
|
207
206
|
otpType,
|
|
@@ -340,7 +339,10 @@ const Auth = ({
|
|
|
340
339
|
publicKey,
|
|
341
340
|
type
|
|
342
341
|
}
|
|
343
|
-
}
|
|
342
|
+
},
|
|
343
|
+
...(customAccounts && {
|
|
344
|
+
customAccounts
|
|
345
|
+
})
|
|
344
346
|
});
|
|
345
347
|
const suborgIds = resp?.subOrganizationIds;
|
|
346
348
|
if (!suborgIds || suborgIds.length === 0) {
|
|
@@ -415,7 +417,7 @@ const Auth = ({
|
|
|
415
417
|
return authConfig.emailEnabled && !otpId ? jsxRuntime.jsxs("form", {
|
|
416
418
|
onSubmit: e => {
|
|
417
419
|
e.preventDefault();
|
|
418
|
-
|
|
420
|
+
handleSendOtp(email, constants.OtpType.Email);
|
|
419
421
|
},
|
|
420
422
|
children: [jsxRuntime.jsx("div", {
|
|
421
423
|
className: Auth_module.default.inputGroup,
|
|
@@ -462,7 +464,7 @@ const Auth = ({
|
|
|
462
464
|
return authConfig.phoneEnabled && !otpId ? jsxRuntime.jsxs("form", {
|
|
463
465
|
onSubmit: e => {
|
|
464
466
|
e.preventDefault();
|
|
465
|
-
|
|
467
|
+
handleSendOtp(phone, constants.OtpType.Sms);
|
|
466
468
|
},
|
|
467
469
|
children: [jsxRuntime.jsx("div", {
|
|
468
470
|
className: Auth_module.default.phoneInput,
|
|
@@ -627,11 +629,15 @@ const Auth = ({
|
|
|
627
629
|
type: step,
|
|
628
630
|
contact: step === constants.OtpType.Email ? email : phone,
|
|
629
631
|
otpId: otpId,
|
|
630
|
-
alphanumeric: otpConfig?.alphanumeric
|
|
632
|
+
alphanumeric: otpConfig?.alphanumeric,
|
|
633
|
+
includeUnverifiedSubOrgs: otpConfig?.includeUnverifiedSubOrgs,
|
|
631
634
|
sessionLengthSeconds: authConfig.sessionLengthSeconds,
|
|
632
635
|
onValidateSuccess: onAuthSuccess,
|
|
633
636
|
onResendCode: handleResendCode,
|
|
634
|
-
numBoxes: otpConfig?.otpLength ?? 6
|
|
637
|
+
numBoxes: otpConfig?.otpLength ?? 6,
|
|
638
|
+
...(customAccounts && {
|
|
639
|
+
customAccounts
|
|
640
|
+
})
|
|
635
641
|
}), !otpId && jsxRuntime.jsx("div", {
|
|
636
642
|
className: Auth_module.default.tos,
|
|
637
643
|
children: jsxRuntime.jsxs("span", {
|