@turnkey/sdk-react 4.2.6 → 5.0.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +7 -6
  3. package/dist/assets/apple.svg.js +3 -1
  4. package/dist/assets/apple.svg.js.map +1 -1
  5. package/dist/assets/caution.svg.js +3 -1
  6. package/dist/assets/caution.svg.js.map +1 -1
  7. package/dist/assets/export.svg.js +3 -1
  8. package/dist/assets/export.svg.js.map +1 -1
  9. package/dist/assets/eye.svg.js +3 -1
  10. package/dist/assets/eye.svg.js.map +1 -1
  11. package/dist/assets/facebook.svg.js +3 -1
  12. package/dist/assets/facebook.svg.js.map +1 -1
  13. package/dist/assets/google.svg.js +3 -1
  14. package/dist/assets/google.svg.js.map +1 -1
  15. package/dist/assets/import.svg.js +3 -1
  16. package/dist/assets/import.svg.js.map +1 -1
  17. package/dist/assets/turnkey.svg.js +3 -1
  18. package/dist/assets/turnkey.svg.js.map +1 -1
  19. package/dist/assets/unlock.svg.js +3 -1
  20. package/dist/assets/unlock.svg.js.map +1 -1
  21. package/dist/components/auth/Apple.d.ts +1 -1
  22. package/dist/components/auth/Apple.d.ts.map +1 -1
  23. package/dist/components/auth/Apple.js +9 -7
  24. package/dist/components/auth/Apple.js.map +1 -1
  25. package/dist/components/auth/Apple.mjs +2 -2
  26. package/dist/components/auth/Apple.mjs.map +1 -1
  27. package/dist/components/auth/Auth.d.ts.map +1 -1
  28. package/dist/components/auth/Auth.js +88 -105
  29. package/dist/components/auth/Auth.js.map +1 -1
  30. package/dist/components/auth/Auth.mjs +91 -94
  31. package/dist/components/auth/Auth.mjs.map +1 -1
  32. package/dist/components/auth/Auth.module.css.js +3 -1
  33. package/dist/components/auth/Auth.module.css.js.map +1 -1
  34. package/dist/components/auth/Facebook.d.ts +1 -1
  35. package/dist/components/auth/Facebook.d.ts.map +1 -1
  36. package/dist/components/auth/Facebook.js +9 -7
  37. package/dist/components/auth/Facebook.js.map +1 -1
  38. package/dist/components/auth/Facebook.mjs +2 -2
  39. package/dist/components/auth/Facebook.mjs.map +1 -1
  40. package/dist/components/auth/Google.d.ts +1 -1
  41. package/dist/components/auth/Google.d.ts.map +1 -1
  42. package/dist/components/auth/Google.js +9 -7
  43. package/dist/components/auth/Google.js.map +1 -1
  44. package/dist/components/auth/Google.mjs +2 -2
  45. package/dist/components/auth/Google.mjs.map +1 -1
  46. package/dist/components/auth/OtpVerification.d.ts +0 -1
  47. package/dist/components/auth/OtpVerification.d.ts.map +1 -1
  48. package/dist/components/auth/OtpVerification.js +51 -21
  49. package/dist/components/auth/OtpVerification.js.map +1 -1
  50. package/dist/components/auth/OtpVerification.mjs +68 -27
  51. package/dist/components/auth/OtpVerification.mjs.map +1 -1
  52. package/dist/components/auth/OtpVerification.module.css.js +3 -1
  53. package/dist/components/auth/OtpVerification.module.css.js.map +1 -1
  54. package/dist/components/auth/Socials.module.css.js +3 -1
  55. package/dist/components/auth/Socials.module.css.js.map +1 -1
  56. package/dist/components/auth/TurnkeyThemeProvider.js.map +1 -1
  57. package/dist/components/auth/TurnkeyThemeProvider.mjs.map +1 -1
  58. package/dist/components/auth/facebookUtils.js.map +1 -1
  59. package/dist/components/auth/otp.js +3 -1
  60. package/dist/components/auth/otp.js.map +1 -1
  61. package/dist/components/auth/otp.mjs.map +1 -1
  62. package/dist/components/export/Export.js +25 -23
  63. package/dist/components/export/Export.js.map +1 -1
  64. package/dist/components/export/Export.mjs +4 -4
  65. package/dist/components/export/Export.mjs.map +1 -1
  66. package/dist/components/export/Export.module.css.js +3 -1
  67. package/dist/components/export/Export.module.css.js.map +1 -1
  68. package/dist/components/import/Import.js +13 -11
  69. package/dist/components/import/Import.js.map +1 -1
  70. package/dist/components/import/Import.mjs +4 -4
  71. package/dist/components/import/Import.mjs.map +1 -1
  72. package/dist/components/import/Import.module.css.js +3 -1
  73. package/dist/components/import/Import.module.css.js.map +1 -1
  74. package/dist/contexts/TurnkeyContext.d.ts +2 -2
  75. package/dist/contexts/TurnkeyContext.d.ts.map +1 -1
  76. package/dist/contexts/TurnkeyContext.js +23 -43
  77. package/dist/contexts/TurnkeyContext.js.map +1 -1
  78. package/dist/contexts/TurnkeyContext.mjs +50 -102
  79. package/dist/contexts/TurnkeyContext.mjs.map +1 -1
  80. package/dist/hooks/use-session.d.ts +16 -33
  81. package/dist/hooks/use-session.d.ts.map +1 -1
  82. package/dist/hooks/use-session.js +15 -51
  83. package/dist/hooks/use-session.js.map +1 -1
  84. package/dist/hooks/use-session.mjs +17 -52
  85. package/dist/hooks/use-session.mjs.map +1 -1
  86. package/dist/hooks/use-turnkey.js.map +1 -1
  87. package/dist/hooks/use-turnkey.mjs.map +1 -1
  88. package/dist/index.js +3 -3
  89. package/package.json +7 -6
@@ -74,17 +74,18 @@ const Auth = ({
74
74
  otpConfig
75
75
  }) => {
76
76
  const {
77
- authIframeClient,
78
77
  passkeyClient,
79
- walletClient
78
+ walletClient,
79
+ indexedDbClient,
80
+ turnkey: turnkey$1
80
81
  } = useTurnkey.useTurnkey();
82
+ const [publicKey, setPublicKey] = React.useState("");
81
83
  const [email, setEmail] = React.useState("");
82
84
  const [phone, setPhone] = React.useState("");
83
85
  const [otpId, setOtpId] = React.useState(null);
84
86
  const [step, setStep] = React.useState("auth");
85
87
  const [loading, setLoading] = React.useState();
86
88
  const [oauthLoading, setOauthLoading] = React.useState("");
87
- const [suborgId, setSuborgId] = React.useState("");
88
89
  const [passkeySignupScreen, setPasskeySignupScreen] = React.useState(false);
89
90
  const [passkeyCreationScreen, setPasskeyCreationScreen] = React.useState(false);
90
91
  const [passkeySignupError, setPasskeySignupError] = React.useState("");
@@ -98,21 +99,29 @@ const Auth = ({
98
99
  }
99
100
  };
100
101
  React.useEffect(() => {
101
- if (authIframeClient) {
102
+ if (indexedDbClient && turnkey$1) {
102
103
  setComponentReady(true);
103
- const updateIframeKey = async () => {
104
- await authIframeClient.initEmbeddedKey();
104
+ const manageClient = async () => {
105
+ const session = await turnkey$1.getSession();
106
+ if (session) {
107
+ const publicKey = await indexedDbClient.getPublicKey();
108
+ setPublicKey(publicKey);
109
+ } else {
110
+ await indexedDbClient.resetKeyPair();
111
+ const publicKey = await indexedDbClient.getPublicKey();
112
+ setPublicKey(publicKey);
113
+ }
105
114
  };
106
- updateIframeKey();
115
+ manageClient();
107
116
  }
108
- }, [authIframeClient]);
117
+ }, [indexedDbClient]);
109
118
  if (!componentReady) {
110
119
  return jsxRuntime.jsx("div", {
111
- className: Auth_module.defaultLoader,
120
+ className: Auth_module.default.defaultLoader,
112
121
  children: jsxRuntime.jsx(material.CircularProgress, {
113
122
  size: 80,
114
123
  thickness: 1,
115
- className: Auth_module.circularProgress
124
+ className: Auth_module.default.circularProgress
116
125
  })
117
126
  });
118
127
  }
@@ -167,11 +176,10 @@ const Auth = ({
167
176
  constants.authErrors.passkey.createFailed;
168
177
  }
169
178
  }
170
- const iframePublicKey = await authIframeClient.initEmbeddedKey();
179
+ const pubKey = await indexedDbClient.getPublicKey();
171
180
  await passkeyClient?.loginWithPasskey({
172
181
  sessionType: exports.SessionType.READ_WRITE,
173
- iframeClient: authIframeClient,
174
- targetPublicKey: iframePublicKey,
182
+ publicKey: pubKey,
175
183
  expirationSeconds: authConfig.sessionLengthSeconds?.toString()
176
184
  });
177
185
  await onAuthSuccess();
@@ -183,11 +191,10 @@ const Auth = ({
183
191
  const handleLoginWithPasskey = async () => {
184
192
  try {
185
193
  setLoading("passkey");
186
- const iframePublicKey = await authIframeClient.initEmbeddedKey();
194
+ const pubKey = await indexedDbClient.getPublicKey();
187
195
  await passkeyClient?.loginWithPasskey({
188
196
  sessionType: exports.SessionType.READ_WRITE,
189
- iframeClient: authIframeClient,
190
- targetPublicKey: iframePublicKey,
197
+ publicKey: pubKey,
191
198
  expirationSeconds: authConfig.sessionLengthSeconds?.toString()
192
199
  });
193
200
  await onAuthSuccess();
@@ -200,29 +207,9 @@ const Auth = ({
200
207
  };
201
208
  const handleOtpLogin = async (type, value, otpType) => {
202
209
  setLoading(otpType);
203
- const createSuborgData = {};
204
- if (type === constants.FilterType.Email) {
205
- createSuborgData.email = value;
206
- } else if (type === constants.FilterType.PhoneNumber) {
207
- createSuborgData.phoneNumber = value;
208
- }
209
- if (customAccounts) {
210
- createSuborgData.customAccounts = customAccounts;
211
- }
212
- const resp = await sdkServer.server.getOrCreateSuborg({
213
- filterType: type,
214
- filterValue: value,
215
- additionalData: createSuborgData
216
- });
217
- const suborgIds = resp?.subOrganizationIds;
218
- if (!suborgIds || suborgIds.length === 0) {
219
- onError(constants.authErrors.otp.sendFailed);
220
- return;
221
- }
222
- const suborgId = suborgIds[0];
223
- const iframePublicKey = await authIframeClient.initEmbeddedKey();
210
+ if (type === constants.FilterType.Email) ; else if (type === constants.FilterType.PhoneNumber) ;
211
+ const publicKey = await indexedDbClient.getPublicKey();
224
212
  const initAuthResponse = await sdkServer.server.sendOtp({
225
- suborgID: suborgId,
226
213
  otpType,
227
214
  contact: value,
228
215
  ...(emailCustomization && {
@@ -236,10 +223,9 @@ const Auth = ({
236
223
  }),
237
224
  otpLength: otpConfig?.otpLength ?? 6,
238
225
  alphanumeric: otpConfig?.alphanumeric ?? false,
239
- userIdentifier: iframePublicKey
226
+ userIdentifier: publicKey
240
227
  });
241
228
  if (initAuthResponse && initAuthResponse.otpId) {
242
- setSuborgId(suborgId);
243
229
  setOtpId(initAuthResponse?.otpId);
244
230
  setStep(otpType);
245
231
  } else {
@@ -269,15 +255,14 @@ const Auth = ({
269
255
  return;
270
256
  }
271
257
  const suborgId = suborgIds[0];
272
- const iframePublicKey = await authIframeClient.initEmbeddedKey();
273
- const oauthSession = await sdkServer.server.oauth({
258
+ const sessionResponse = await sdkServer.server.oauthLogin({
274
259
  suborgID: suborgId,
275
260
  oidcToken: credential,
276
- targetPublicKey: iframePublicKey,
261
+ publicKey: publicKey,
277
262
  sessionLengthSeconds: authConfig.sessionLengthSeconds
278
263
  });
279
- if (oauthSession && oauthSession.token) {
280
- await authIframeClient.loginWithSession(oauthSession);
264
+ if (sessionResponse && sessionResponse.session) {
265
+ await indexedDbClient.loginWithSession(sessionResponse.session);
281
266
  await onAuthSuccess();
282
267
  } else {
283
268
  onError(constants.authErrors.oauth.loginFailed);
@@ -311,11 +296,10 @@ const Auth = ({
311
296
  onError(constants.authErrors.wallet.loginFailed);
312
297
  return;
313
298
  }
314
- const iframePublicKey = await authIframeClient.initEmbeddedKey();
299
+ const pubKey = await indexedDbClient.getPublicKey();
315
300
  await walletClient.loginWithWallet({
316
301
  sessionType: exports.SessionType.READ_WRITE,
317
- iframeClient: authIframeClient,
318
- targetPublicKey: iframePublicKey,
302
+ publicKey: pubKey,
319
303
  expirationSeconds: authConfig.sessionLengthSeconds?.toString()
320
304
  });
321
305
  await onAuthSuccess();
@@ -354,23 +338,23 @@ const Auth = ({
354
338
  } = authConfig;
355
339
  const layout = [googleEnabled, appleEnabled, facebookEnabled].filter(Boolean).length >= 2 ? "inline" : "stacked";
356
340
  return jsxRuntime.jsxs("div", {
357
- className: layout === "inline" ? Auth_module.socialButtonContainerInline : Auth_module.socialButtonContainerStacked,
358
- children: [googleEnabled && jsxRuntime.jsx(Google, {
341
+ className: layout === "inline" ? Auth_module.default.socialButtonContainerInline : Auth_module.default.socialButtonContainerStacked,
342
+ children: [googleEnabled && jsxRuntime.jsx(Google.default, {
359
343
  layout: layout,
360
344
  clientId: authConfig.googleClientId ?? process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID,
361
- iframePublicKey: authIframeClient.iframePublicKey,
362
345
  openInPage: authConfig.openOAuthInPage,
346
+ publicKey: publicKey,
363
347
  onSuccess: response => handleOAuthLogin(response.idToken, "Google")
364
- }), appleEnabled && jsxRuntime.jsx(Apple, {
348
+ }), appleEnabled && jsxRuntime.jsx(Apple.default, {
365
349
  layout: layout,
366
350
  clientId: authConfig.appleClientId ?? process.env.NEXT_PUBLIC_APPLE_CLIENT_ID,
367
- iframePublicKey: authIframeClient.iframePublicKey,
351
+ publicKey: publicKey,
368
352
  openInPage: authConfig.openOAuthInPage,
369
353
  onSuccess: response => handleOAuthLogin(response.idToken, "Apple")
370
- }), facebookEnabled && jsxRuntime.jsx(Facebook, {
354
+ }), facebookEnabled && jsxRuntime.jsx(Facebook.default, {
371
355
  layout: layout,
372
356
  clientId: authConfig.facebookClientId ?? process.env.NEXT_PUBLIC_FACEBOOK_CLIENT_ID,
373
- iframePublicKey: authIframeClient.iframePublicKey,
357
+ publicKey: publicKey,
374
358
  openInPage: authConfig.openOAuthInPage,
375
359
  onSuccess: response => handleOAuthLogin(response.id_token, "Facebook")
376
360
  })]
@@ -385,7 +369,7 @@ const Auth = ({
385
369
  handleOtpLogin(constants.FilterType.Email, email, constants.OtpType.Email);
386
370
  },
387
371
  children: [jsxRuntime.jsx("div", {
388
- className: Auth_module.inputGroup,
372
+ className: Auth_module.default.inputGroup,
389
373
  children: jsxRuntime.jsx(material.TextField, {
390
374
  name: "email-input",
391
375
  type: "email",
@@ -415,13 +399,13 @@ const Auth = ({
415
399
  variant: "outlined"
416
400
  })
417
401
  }), jsxRuntime.jsx("button", {
418
- className: Auth_module.authButton,
402
+ className: Auth_module.default.authButton,
419
403
  type: "submit",
420
404
  disabled: !isValidEmail(email) || loading === constants.OtpType.Email,
421
405
  children: loading === constants.OtpType.Email ? jsxRuntime.jsx(material.CircularProgress, {
422
406
  size: 24,
423
407
  thickness: 4,
424
- className: Auth_module.buttonProgress || ""
408
+ className: Auth_module.default.buttonProgress || ""
425
409
  }) : "Continue"
426
410
  })]
427
411
  }) : null;
@@ -432,53 +416,53 @@ const Auth = ({
432
416
  handleOtpLogin(constants.FilterType.PhoneNumber, phone, constants.OtpType.Sms);
433
417
  },
434
418
  children: [jsxRuntime.jsx("div", {
435
- className: Auth_module.phoneInput,
419
+ className: Auth_module.default.phoneInput,
436
420
  children: jsxRuntime.jsx(PhoneInput.MuiPhone, {
437
421
  onChange: value => setPhone(value),
438
422
  value: phone
439
423
  })
440
424
  }), jsxRuntime.jsx("button", {
441
- className: Auth_module.authButton,
425
+ className: Auth_module.default.authButton,
442
426
  type: "submit",
443
427
  disabled: !isValidPhone(phone) || loading === constants.OtpType.Sms,
444
428
  children: loading === constants.OtpType.Sms ? jsxRuntime.jsx(material.CircularProgress, {
445
429
  size: 24,
446
430
  thickness: 4,
447
- className: Auth_module.buttonProgress || ""
431
+ className: Auth_module.default.buttonProgress || ""
448
432
  }) : "Continue"
449
433
  })]
450
434
  }) : null;
451
435
  case "passkey":
452
436
  return authConfig.passkeyEnabled && !otpId ? jsxRuntime.jsxs("div", {
453
- className: Auth_module.passkeyContainer,
437
+ className: Auth_module.default.passkeyContainer,
454
438
  children: [jsxRuntime.jsx("button", {
455
- className: Auth_module.authButton,
439
+ className: Auth_module.default.authButton,
456
440
  type: "button",
457
441
  onClick: handleLoginWithPasskey,
458
442
  disabled: loading === "passkey",
459
443
  children: loading === "passkey" ? jsxRuntime.jsx(material.CircularProgress, {
460
444
  size: 24,
461
445
  thickness: 4,
462
- className: Auth_module.buttonProgress || ""
446
+ className: Auth_module.default.buttonProgress || ""
463
447
  }) : "Log in with passkey"
464
448
  }), jsxRuntime.jsx("div", {
465
- className: Auth_module.noPasskeyLink,
449
+ className: Auth_module.default.noPasskeyLink,
466
450
  onClick: () => setPasskeySignupScreen(true),
467
451
  children: "Sign up with passkey"
468
452
  })]
469
453
  }) : null;
470
454
  case "wallet":
471
455
  return authConfig.walletEnabled && !otpId ? jsxRuntime.jsx("div", {
472
- className: Auth_module.passkeyContainer,
456
+ className: Auth_module.default.passkeyContainer,
473
457
  children: jsxRuntime.jsx("button", {
474
- className: Auth_module.authButton,
458
+ className: Auth_module.default.authButton,
475
459
  type: "button",
476
460
  onClick: handleLoginWithWallet,
477
461
  disabled: loading === "wallet",
478
462
  children: loading === "wallet" ? jsxRuntime.jsx(material.CircularProgress, {
479
463
  size: 24,
480
464
  thickness: 4,
481
- className: Auth_module.buttonProgress || ""
465
+ className: Auth_module.default.buttonProgress || ""
482
466
  }) : "Continue with Wallet"
483
467
  })
484
468
  }) : null;
@@ -490,110 +474,109 @@ const Auth = ({
490
474
  };
491
475
  return jsxRuntime.jsx(jsxRuntime.Fragment, {
492
476
  children: passkeySignupScreen ? jsxRuntime.jsxs("div", {
493
- className: Auth_module.authCard,
477
+ className: Auth_module.default.authCard,
494
478
  children: [renderBackButton(), jsxRuntime.jsx("div", {
495
- className: Auth_module.passkeyIconContainer,
479
+ className: Auth_module.default.passkeyIconContainer,
496
480
  children: passkeyIcon
497
481
  }), jsxRuntime.jsx("center", {
498
482
  children: jsxRuntime.jsx("h3", {
499
- className: Auth_module.primaryText,
483
+ className: Auth_module.default.primaryText,
500
484
  children: "Create a passkey"
501
485
  })
502
486
  }), jsxRuntime.jsx("div", {
503
- className: Auth_module.rowsContainer,
487
+ className: Auth_module.default.rowsContainer,
504
488
  children: jsxRuntime.jsx("center", {
505
489
  children: jsxRuntime.jsx("span", {
506
- className: Auth_module.primaryText,
490
+ className: Auth_module.default.primaryText,
507
491
  children: "Passkeys allow for easy biometric access to your wallet and can be synced across devices."
508
492
  })
509
493
  })
510
494
  }), jsxRuntime.jsx("button", {
511
- className: Auth_module.authButton,
495
+ className: Auth_module.default.authButton,
512
496
  type: "button",
513
497
  onClick: handleSignupWithPasskey,
514
498
  children: "Continue"
515
499
  })]
516
500
  }) : passkeyCreationScreen ? jsxRuntime.jsxs("div", {
517
- className: Auth_module.authCard,
501
+ className: Auth_module.default.authCard,
518
502
  children: [renderBackButton(), jsxRuntime.jsx("div", {
519
- className: Auth_module.passkeyIconContainer,
503
+ className: Auth_module.default.passkeyIconContainer,
520
504
  children: passkeySignupError ? jsxRuntime.jsx("div", {
521
505
  children: passkeyIconError
522
506
  }) : jsxRuntime.jsxs("div", {
523
- className: Auth_module.loadingWrapper,
507
+ className: Auth_module.default.loadingWrapper,
524
508
  children: [jsxRuntime.jsx(material.CircularProgress, {
525
509
  size: 80,
526
510
  thickness: 1,
527
- className: Auth_module.circularProgress
511
+ className: Auth_module.default.circularProgress
528
512
  }), passkeyIcon]
529
513
  })
530
514
  }), jsxRuntime.jsx("center", {
531
515
  children: jsxRuntime.jsx("h3", {
532
- className: Auth_module.primaryText,
516
+ className: Auth_module.default.primaryText,
533
517
  children: passkeySignupError ? "Authentication error" : passkeyCreated ? "Logging in with passkey..." : "Creating passkey..."
534
518
  })
535
519
  }), jsxRuntime.jsx("div", {
536
- className: Auth_module.rowsContainer,
520
+ className: Auth_module.default.rowsContainer,
537
521
  children: jsxRuntime.jsx("span", {
538
- className: Auth_module.primaryText,
522
+ className: Auth_module.default.primaryText,
539
523
  children: jsxRuntime.jsx("center", {
540
524
  children: passkeySignupError ? passkeySignupError : ""
541
525
  })
542
526
  })
543
527
  }), passkeySignupError && jsxRuntime.jsx("button", {
544
- className: Auth_module.authButton,
528
+ className: Auth_module.default.authButton,
545
529
  type: "button",
546
530
  onClick: handleSignupWithPasskey,
547
531
  children: "Retry"
548
532
  })]
549
533
  }) : jsxRuntime.jsx("div", {
550
534
  children: oauthLoading !== "" ? jsxRuntime.jsxs("div", {
551
- className: Auth_module.authCardLoading,
535
+ className: Auth_module.default.authCardLoading,
552
536
  children: [jsxRuntime.jsxs("h3", {
553
- className: Auth_module.verifyingText,
537
+ className: Auth_module.default.verifyingText,
554
538
  children: ["Verifying with ", oauthLoading]
555
539
  }), jsxRuntime.jsxs("div", {
556
- className: Auth_module.loadingWrapper,
540
+ className: Auth_module.default.loadingWrapper,
557
541
  children: [jsxRuntime.jsx(material.CircularProgress, {
558
542
  size: 80,
559
543
  thickness: 1,
560
- className: Auth_module.circularProgress
544
+ className: Auth_module.default.circularProgress
561
545
  }), oauthLoading === "Google" && jsxRuntime.jsx("img", {
562
- src: google,
563
- className: Auth_module.oauthIcon
546
+ src: google.default,
547
+ className: Auth_module.default.oauthIcon
564
548
  }), oauthLoading === "Facebook" && jsxRuntime.jsx("img", {
565
- src: facebook,
566
- className: Auth_module.oauthIcon
549
+ src: facebook.default,
550
+ className: Auth_module.default.oauthIcon
567
551
  }), oauthLoading === "Apple" && jsxRuntime.jsx("img", {
568
- src: apple,
569
- className: Auth_module.oauthIcon
552
+ src: apple.default,
553
+ className: Auth_module.default.oauthIcon
570
554
  })]
571
555
  }), jsxRuntime.jsxs("div", {
572
- className: Auth_module.poweredBy,
556
+ className: Auth_module.default.poweredBy,
573
557
  children: [jsxRuntime.jsx("span", {
574
558
  children: "Secured by"
575
559
  }), jsxRuntime.jsx("img", {
576
- src: turnkey
560
+ src: turnkey.default
577
561
  })]
578
562
  })]
579
563
  }) : jsxRuntime.jsxs("div", {
580
- className: Auth_module.authCard,
564
+ className: Auth_module.default.authCard,
581
565
  children: [otpId && renderBackButton(), jsxRuntime.jsx("h2", {
582
- className: Auth_module.primaryText,
566
+ className: Auth_module.default.primaryText,
583
567
  children: !otpId && "Log in or sign up"
584
568
  }), jsxRuntime.jsxs("div", {
585
- className: Auth_module.authForm,
569
+ className: Auth_module.default.authForm,
586
570
  children: [!otpId && configOrder.filter(section => renderSection(section) !== null).map((section, index, visibleSections) => jsxRuntime.jsxs(React.Fragment, {
587
571
  children: [renderSection(section), index < visibleSections.length - 1 && jsxRuntime.jsx("div", {
588
- className: Auth_module.separator,
572
+ className: Auth_module.default.separator,
589
573
  children: jsxRuntime.jsx("span", {
590
574
  children: "OR"
591
575
  })
592
576
  })]
593
- }, section)), otpId && jsxRuntime.jsx(OtpVerification, {
577
+ }, section)), otpId && jsxRuntime.jsx(OtpVerification.default, {
594
578
  type: step,
595
579
  contact: step === constants.OtpType.Email ? email : phone,
596
- suborgId: suborgId,
597
580
  otpId: otpId,
598
581
  alphanumeric: otpConfig?.alphanumeric ?? false,
599
582
  sessionLengthSeconds: authConfig.sessionLengthSeconds,
@@ -601,30 +584,30 @@ const Auth = ({
601
584
  onResendCode: handleResendCode,
602
585
  numBoxes: otpConfig?.otpLength ?? 6
603
586
  }), !otpId && jsxRuntime.jsx("div", {
604
- className: Auth_module.tos,
587
+ className: Auth_module.default.tos,
605
588
  children: jsxRuntime.jsxs("span", {
606
589
  children: ["By continuing, you agree to our", " ", jsxRuntime.jsx("a", {
607
590
  href: "https://www.turnkey.com/legal/terms",
608
591
  target: "_blank",
609
592
  rel: "noopener noreferrer",
610
- className: Auth_module.tosBold,
593
+ className: Auth_module.default.tosBold,
611
594
  children: "Terms of Service"
612
595
  }), " ", "&", " ", jsxRuntime.jsx("a", {
613
596
  href: "https://www.turnkey.com/legal/privacy",
614
597
  target: "_blank",
615
598
  rel: "noopener noreferrer",
616
- className: Auth_module.tosBold,
599
+ className: Auth_module.default.tosBold,
617
600
  children: "Privacy Policy"
618
601
  }), "."]
619
602
  })
620
603
  })]
621
604
  }), jsxRuntime.jsxs("div", {
622
605
  onClick: () => window.location.href = "https://www.turnkey.com/",
623
- className: Auth_module.poweredBy,
606
+ className: Auth_module.default.poweredBy,
624
607
  children: [jsxRuntime.jsx("span", {
625
608
  children: "Secured by"
626
609
  }), jsxRuntime.jsx("img", {
627
- src: turnkey
610
+ src: turnkey.default
628
611
  })]
629
612
  })]
630
613
  })