@turnkey/sdk-react 4.2.6 → 5.0.1

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 (93) hide show
  1. package/CHANGELOG.md +37 -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 +0 -1
  22. package/dist/components/auth/Apple.d.ts.map +1 -1
  23. package/dist/components/auth/Apple.js +18 -9
  24. package/dist/components/auth/Apple.js.map +1 -1
  25. package/dist/components/auth/Apple.mjs +93 -60
  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 +91 -108
  29. package/dist/components/auth/Auth.js.map +1 -1
  30. package/dist/components/auth/Auth.mjs +106 -109
  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 +0 -1
  35. package/dist/components/auth/Facebook.d.ts.map +1 -1
  36. package/dist/components/auth/Facebook.js +17 -8
  37. package/dist/components/auth/Facebook.js.map +1 -1
  38. package/dist/components/auth/Facebook.mjs +18 -6
  39. package/dist/components/auth/Facebook.mjs.map +1 -1
  40. package/dist/components/auth/Google.d.ts +0 -1
  41. package/dist/components/auth/Google.d.ts.map +1 -1
  42. package/dist/components/auth/Google.js +17 -8
  43. package/dist/components/auth/Google.js.map +1 -1
  44. package/dist/components/auth/Google.mjs +23 -11
  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/constants.js +1 -1
  59. package/dist/components/auth/constants.js.map +1 -1
  60. package/dist/components/auth/constants.mjs +1 -1
  61. package/dist/components/auth/constants.mjs.map +1 -1
  62. package/dist/components/auth/facebookUtils.js.map +1 -1
  63. package/dist/components/auth/otp.js +3 -1
  64. package/dist/components/auth/otp.js.map +1 -1
  65. package/dist/components/auth/otp.mjs.map +1 -1
  66. package/dist/components/export/Export.js +25 -23
  67. package/dist/components/export/Export.js.map +1 -1
  68. package/dist/components/export/Export.mjs +4 -4
  69. package/dist/components/export/Export.mjs.map +1 -1
  70. package/dist/components/export/Export.module.css.js +3 -1
  71. package/dist/components/export/Export.module.css.js.map +1 -1
  72. package/dist/components/import/Import.js +13 -11
  73. package/dist/components/import/Import.js.map +1 -1
  74. package/dist/components/import/Import.mjs +4 -4
  75. package/dist/components/import/Import.mjs.map +1 -1
  76. package/dist/components/import/Import.module.css.js +3 -1
  77. package/dist/components/import/Import.module.css.js.map +1 -1
  78. package/dist/contexts/TurnkeyContext.d.ts +2 -2
  79. package/dist/contexts/TurnkeyContext.d.ts.map +1 -1
  80. package/dist/contexts/TurnkeyContext.js +23 -43
  81. package/dist/contexts/TurnkeyContext.js.map +1 -1
  82. package/dist/contexts/TurnkeyContext.mjs +50 -102
  83. package/dist/contexts/TurnkeyContext.mjs.map +1 -1
  84. package/dist/hooks/use-session.d.ts +16 -33
  85. package/dist/hooks/use-session.d.ts.map +1 -1
  86. package/dist/hooks/use-session.js +15 -51
  87. package/dist/hooks/use-session.js.map +1 -1
  88. package/dist/hooks/use-session.mjs +17 -52
  89. package/dist/hooks/use-session.mjs.map +1 -1
  90. package/dist/hooks/use-turnkey.js.map +1 -1
  91. package/dist/hooks/use-turnkey.mjs.map +1 -1
  92. package/dist/index.js +3 -3
  93. package/package.json +6 -5
@@ -74,9 +74,10 @@ 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();
81
82
  const [email, setEmail] = React.useState("");
82
83
  const [phone, setPhone] = React.useState("");
@@ -84,7 +85,6 @@ const Auth = ({
84
85
  const [step, setStep] = React.useState("auth");
85
86
  const [loading, setLoading] = React.useState();
86
87
  const [oauthLoading, setOauthLoading] = React.useState("");
87
- const [suborgId, setSuborgId] = React.useState("");
88
88
  const [passkeySignupScreen, setPasskeySignupScreen] = React.useState(false);
89
89
  const [passkeyCreationScreen, setPasskeyCreationScreen] = React.useState(false);
90
90
  const [passkeySignupError, setPasskeySignupError] = React.useState("");
@@ -98,21 +98,29 @@ const Auth = ({
98
98
  }
99
99
  };
100
100
  React.useEffect(() => {
101
- if (authIframeClient) {
102
- setComponentReady(true);
103
- const updateIframeKey = async () => {
104
- await authIframeClient.initEmbeddedKey();
105
- };
106
- updateIframeKey();
107
- }
108
- }, [authIframeClient]);
101
+ const manageClient = async () => {
102
+ if (indexedDbClient && turnkey$1) {
103
+ const session = await turnkey$1.getSession();
104
+ if (!session) {
105
+ await indexedDbClient.resetKeyPair();
106
+ }
107
+ const retrievedPublicKey = await indexedDbClient.getPublicKey();
108
+ if (retrievedPublicKey) {
109
+ setComponentReady(true);
110
+ } else {
111
+ onError("Failed to retrieve public key.");
112
+ }
113
+ }
114
+ };
115
+ manageClient();
116
+ }, [indexedDbClient, turnkey$1]);
109
117
  if (!componentReady) {
110
118
  return jsxRuntime.jsx("div", {
111
- className: Auth_module.defaultLoader,
119
+ className: Auth_module.default.defaultLoader,
112
120
  children: jsxRuntime.jsx(material.CircularProgress, {
113
121
  size: 80,
114
122
  thickness: 1,
115
- className: Auth_module.circularProgress
123
+ className: Auth_module.default.circularProgress
116
124
  })
117
125
  });
118
126
  }
@@ -167,11 +175,10 @@ const Auth = ({
167
175
  constants.authErrors.passkey.createFailed;
168
176
  }
169
177
  }
170
- const iframePublicKey = await authIframeClient.initEmbeddedKey();
178
+ const pubKey = await indexedDbClient.getPublicKey();
171
179
  await passkeyClient?.loginWithPasskey({
172
180
  sessionType: exports.SessionType.READ_WRITE,
173
- iframeClient: authIframeClient,
174
- targetPublicKey: iframePublicKey,
181
+ publicKey: pubKey,
175
182
  expirationSeconds: authConfig.sessionLengthSeconds?.toString()
176
183
  });
177
184
  await onAuthSuccess();
@@ -183,11 +190,10 @@ const Auth = ({
183
190
  const handleLoginWithPasskey = async () => {
184
191
  try {
185
192
  setLoading("passkey");
186
- const iframePublicKey = await authIframeClient.initEmbeddedKey();
193
+ const pubKey = await indexedDbClient.getPublicKey();
187
194
  await passkeyClient?.loginWithPasskey({
188
195
  sessionType: exports.SessionType.READ_WRITE,
189
- iframeClient: authIframeClient,
190
- targetPublicKey: iframePublicKey,
196
+ publicKey: pubKey,
191
197
  expirationSeconds: authConfig.sessionLengthSeconds?.toString()
192
198
  });
193
199
  await onAuthSuccess();
@@ -200,29 +206,9 @@ const Auth = ({
200
206
  };
201
207
  const handleOtpLogin = async (type, value, otpType) => {
202
208
  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();
209
+ if (type === constants.FilterType.Email) ; else if (type === constants.FilterType.PhoneNumber) ;
210
+ const publicKey = await indexedDbClient.getPublicKey();
224
211
  const initAuthResponse = await sdkServer.server.sendOtp({
225
- suborgID: suborgId,
226
212
  otpType,
227
213
  contact: value,
228
214
  ...(emailCustomization && {
@@ -236,10 +222,9 @@ const Auth = ({
236
222
  }),
237
223
  otpLength: otpConfig?.otpLength ?? 6,
238
224
  alphanumeric: otpConfig?.alphanumeric ?? false,
239
- userIdentifier: iframePublicKey
225
+ userIdentifier: publicKey
240
226
  });
241
227
  if (initAuthResponse && initAuthResponse.otpId) {
242
- setSuborgId(suborgId);
243
228
  setOtpId(initAuthResponse?.otpId);
244
229
  setStep(otpType);
245
230
  } else {
@@ -248,6 +233,10 @@ const Auth = ({
248
233
  setLoading(undefined);
249
234
  };
250
235
  const handleOAuthLogin = async (credential, providerName) => {
236
+ const pubKey = await indexedDbClient?.getPublicKey();
237
+ if (!pubKey) {
238
+ return;
239
+ }
251
240
  setOauthLoading(providerName);
252
241
  const createSuborgData = {
253
242
  oauthProviders: [{
@@ -269,15 +258,14 @@ const Auth = ({
269
258
  return;
270
259
  }
271
260
  const suborgId = suborgIds[0];
272
- const iframePublicKey = await authIframeClient.initEmbeddedKey();
273
- const oauthSession = await sdkServer.server.oauth({
261
+ const sessionResponse = await sdkServer.server.oauthLogin({
274
262
  suborgID: suborgId,
275
263
  oidcToken: credential,
276
- targetPublicKey: iframePublicKey,
264
+ publicKey: pubKey,
277
265
  sessionLengthSeconds: authConfig.sessionLengthSeconds
278
266
  });
279
- if (oauthSession && oauthSession.token) {
280
- await authIframeClient.loginWithSession(oauthSession);
267
+ if (sessionResponse && sessionResponse.session) {
268
+ await indexedDbClient.loginWithSession(sessionResponse.session);
281
269
  await onAuthSuccess();
282
270
  } else {
283
271
  onError(constants.authErrors.oauth.loginFailed);
@@ -311,11 +299,10 @@ const Auth = ({
311
299
  onError(constants.authErrors.wallet.loginFailed);
312
300
  return;
313
301
  }
314
- const iframePublicKey = await authIframeClient.initEmbeddedKey();
302
+ const pubKey = await indexedDbClient.getPublicKey();
315
303
  await walletClient.loginWithWallet({
316
304
  sessionType: exports.SessionType.READ_WRITE,
317
- iframeClient: authIframeClient,
318
- targetPublicKey: iframePublicKey,
305
+ publicKey: pubKey,
319
306
  expirationSeconds: authConfig.sessionLengthSeconds?.toString()
320
307
  });
321
308
  await onAuthSuccess();
@@ -354,23 +341,20 @@ const Auth = ({
354
341
  } = authConfig;
355
342
  const layout = [googleEnabled, appleEnabled, facebookEnabled].filter(Boolean).length >= 2 ? "inline" : "stacked";
356
343
  return jsxRuntime.jsxs("div", {
357
- className: layout === "inline" ? Auth_module.socialButtonContainerInline : Auth_module.socialButtonContainerStacked,
358
- children: [googleEnabled && jsxRuntime.jsx(Google, {
344
+ className: layout === "inline" ? Auth_module.default.socialButtonContainerInline : Auth_module.default.socialButtonContainerStacked,
345
+ children: [googleEnabled && jsxRuntime.jsx(Google.default, {
359
346
  layout: layout,
360
347
  clientId: authConfig.googleClientId ?? process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID,
361
- iframePublicKey: authIframeClient.iframePublicKey,
362
348
  openInPage: authConfig.openOAuthInPage,
363
349
  onSuccess: response => handleOAuthLogin(response.idToken, "Google")
364
- }), appleEnabled && jsxRuntime.jsx(Apple, {
350
+ }), appleEnabled && jsxRuntime.jsx(Apple.default, {
365
351
  layout: layout,
366
352
  clientId: authConfig.appleClientId ?? process.env.NEXT_PUBLIC_APPLE_CLIENT_ID,
367
- iframePublicKey: authIframeClient.iframePublicKey,
368
353
  openInPage: authConfig.openOAuthInPage,
369
354
  onSuccess: response => handleOAuthLogin(response.idToken, "Apple")
370
- }), facebookEnabled && jsxRuntime.jsx(Facebook, {
355
+ }), facebookEnabled && jsxRuntime.jsx(Facebook.default, {
371
356
  layout: layout,
372
357
  clientId: authConfig.facebookClientId ?? process.env.NEXT_PUBLIC_FACEBOOK_CLIENT_ID,
373
- iframePublicKey: authIframeClient.iframePublicKey,
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
  })