@turnkey/sdk-react 5.0.1 → 5.0.2
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 +6 -0
- package/dist/components/auth/Apple.d.ts.map +1 -1
- package/dist/components/auth/Apple.js +58 -51
- package/dist/components/auth/Apple.js.map +1 -1
- package/dist/components/auth/Apple.mjs +108 -90
- package/dist/components/auth/Apple.mjs.map +1 -1
- package/dist/components/auth/Auth.d.ts.map +1 -1
- package/dist/components/auth/Auth.js +3 -4
- package/dist/components/auth/Auth.js.map +1 -1
- package/dist/components/auth/Auth.mjs +49 -51
- package/dist/components/auth/Auth.mjs.map +1 -1
- package/dist/components/auth/Facebook.d.ts.map +1 -1
- package/dist/components/auth/Facebook.js +75 -46
- package/dist/components/auth/Facebook.js.map +1 -1
- package/dist/components/auth/Facebook.mjs +150 -111
- package/dist/components/auth/Facebook.mjs.map +1 -1
- package/dist/components/auth/Google.d.ts.map +1 -1
- package/dist/components/auth/Google.js +67 -56
- package/dist/components/auth/Google.js.map +1 -1
- package/dist/components/auth/Google.mjs +113 -89
- package/dist/components/auth/Google.mjs.map +1 -1
- package/dist/components/auth/OtpVerification.d.ts.map +1 -1
- package/dist/components/auth/OtpVerification.js +1 -0
- package/dist/components/auth/OtpVerification.js.map +1 -1
- package/dist/components/auth/OtpVerification.mjs +30 -27
- package/dist/components/auth/OtpVerification.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -100,10 +100,6 @@ const Auth = ({
|
|
|
100
100
|
React.useEffect(() => {
|
|
101
101
|
const manageClient = async () => {
|
|
102
102
|
if (indexedDbClient && turnkey$1) {
|
|
103
|
-
const session = await turnkey$1.getSession();
|
|
104
|
-
if (!session) {
|
|
105
|
-
await indexedDbClient.resetKeyPair();
|
|
106
|
-
}
|
|
107
103
|
const retrievedPublicKey = await indexedDbClient.getPublicKey();
|
|
108
104
|
if (retrievedPublicKey) {
|
|
109
105
|
setComponentReady(true);
|
|
@@ -175,6 +171,7 @@ const Auth = ({
|
|
|
175
171
|
constants.authErrors.passkey.createFailed;
|
|
176
172
|
}
|
|
177
173
|
}
|
|
174
|
+
await indexedDbClient.resetKeyPair();
|
|
178
175
|
const pubKey = await indexedDbClient.getPublicKey();
|
|
179
176
|
await passkeyClient?.loginWithPasskey({
|
|
180
177
|
sessionType: exports.SessionType.READ_WRITE,
|
|
@@ -190,6 +187,7 @@ const Auth = ({
|
|
|
190
187
|
const handleLoginWithPasskey = async () => {
|
|
191
188
|
try {
|
|
192
189
|
setLoading("passkey");
|
|
190
|
+
await indexedDbClient?.resetKeyPair();
|
|
193
191
|
const pubKey = await indexedDbClient.getPublicKey();
|
|
194
192
|
await passkeyClient?.loginWithPasskey({
|
|
195
193
|
sessionType: exports.SessionType.READ_WRITE,
|
|
@@ -299,6 +297,7 @@ const Auth = ({
|
|
|
299
297
|
onError(constants.authErrors.wallet.loginFailed);
|
|
300
298
|
return;
|
|
301
299
|
}
|
|
300
|
+
await indexedDbClient.resetKeyPair();
|
|
302
301
|
const pubKey = await indexedDbClient.getPublicKey();
|
|
303
302
|
await walletClient.loginWithWallet({
|
|
304
303
|
sessionType: exports.SessionType.READ_WRITE,
|