@turnkey/react-wallet-kit 2.2.0 → 2.3.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 (95) hide show
  1. package/dist/components/auth/Email.d.ts +1 -0
  2. package/dist/components/auth/Email.d.ts.map +1 -1
  3. package/dist/components/auth/Email.js +1 -1
  4. package/dist/components/auth/Email.js.map +1 -1
  5. package/dist/components/auth/Email.mjs +2 -2
  6. package/dist/components/auth/Email.mjs.map +1 -1
  7. package/dist/components/auth/OAuth.d.ts +1 -0
  8. package/dist/components/auth/OAuth.d.ts.map +1 -1
  9. package/dist/components/auth/OAuth.js +3 -1
  10. package/dist/components/auth/OAuth.js.map +1 -1
  11. package/dist/components/auth/OAuth.mjs +3 -1
  12. package/dist/components/auth/OAuth.mjs.map +1 -1
  13. package/dist/components/auth/OTP.d.ts.map +1 -1
  14. package/dist/components/auth/OTP.js +22 -6
  15. package/dist/components/auth/OTP.js.map +1 -1
  16. package/dist/components/auth/OTP.mjs +37 -17
  17. package/dist/components/auth/OTP.mjs.map +1 -1
  18. package/dist/components/auth/Passkey.d.ts +1 -0
  19. package/dist/components/auth/Passkey.d.ts.map +1 -1
  20. package/dist/components/auth/Passkey.js +2 -0
  21. package/dist/components/auth/Passkey.js.map +1 -1
  22. package/dist/components/auth/Passkey.mjs +3 -0
  23. package/dist/components/auth/Passkey.mjs.map +1 -1
  24. package/dist/components/auth/Phone.d.ts +1 -0
  25. package/dist/components/auth/Phone.d.ts.map +1 -1
  26. package/dist/components/auth/Phone.js +1 -1
  27. package/dist/components/auth/Phone.js.map +1 -1
  28. package/dist/components/auth/Phone.mjs +2 -2
  29. package/dist/components/auth/Phone.mjs.map +1 -1
  30. package/dist/components/auth/Turnstile.d.ts +10 -0
  31. package/dist/components/auth/Turnstile.d.ts.map +1 -0
  32. package/dist/components/auth/Turnstile.js +13 -0
  33. package/dist/components/auth/Turnstile.js.map +1 -0
  34. package/dist/components/auth/Turnstile.mjs +11 -0
  35. package/dist/components/auth/Turnstile.mjs.map +1 -0
  36. package/dist/components/auth/TurnstileWidget.d.ts +26 -0
  37. package/dist/components/auth/TurnstileWidget.d.ts.map +1 -0
  38. package/dist/components/auth/TurnstileWidget.js +113 -0
  39. package/dist/components/auth/TurnstileWidget.js.map +1 -0
  40. package/dist/components/auth/TurnstileWidget.mjs +146 -0
  41. package/dist/components/auth/TurnstileWidget.mjs.map +1 -0
  42. package/dist/components/auth/index.d.ts.map +1 -1
  43. package/dist/components/auth/index.js +52 -23
  44. package/dist/components/auth/index.js.map +1 -1
  45. package/dist/components/auth/index.mjs +238 -114
  46. package/dist/components/auth/index.mjs.map +1 -1
  47. package/dist/components/auth/wallet/WalletAuthButton.d.ts +1 -0
  48. package/dist/components/auth/wallet/WalletAuthButton.d.ts.map +1 -1
  49. package/dist/components/auth/wallet/WalletAuthButton.js +1 -0
  50. package/dist/components/auth/wallet/WalletAuthButton.js.map +1 -1
  51. package/dist/components/auth/wallet/WalletAuthButton.mjs +2 -0
  52. package/dist/components/auth/wallet/WalletAuthButton.mjs.map +1 -1
  53. package/dist/providers/client/Provider.d.ts.map +1 -1
  54. package/dist/providers/client/Provider.js +106 -24
  55. package/dist/providers/client/Provider.js.map +1 -1
  56. package/dist/providers/client/Provider.mjs +110 -47
  57. package/dist/providers/client/Provider.mjs.map +1 -1
  58. package/dist/providers/client/Types.d.ts +4 -0
  59. package/dist/providers/client/Types.d.ts.map +1 -1
  60. package/dist/providers/client/Types.js.map +1 -1
  61. package/dist/providers/client/Types.mjs.map +1 -1
  62. package/dist/styles.css +1 -1
  63. package/dist/tests/captcha-test.d.ts +2 -0
  64. package/dist/tests/captcha-test.d.ts.map +1 -0
  65. package/dist/types/base.d.ts +2 -0
  66. package/dist/types/base.d.ts.map +1 -1
  67. package/dist/types/base.js.map +1 -1
  68. package/dist/types/base.mjs.map +1 -1
  69. package/dist/types/method-types.d.ts +5 -0
  70. package/dist/types/method-types.d.ts.map +1 -1
  71. package/dist/utils/captcha.d.ts +16 -0
  72. package/dist/utils/captcha.d.ts.map +1 -0
  73. package/dist/utils/captcha.js +47 -0
  74. package/dist/utils/captcha.js.map +1 -0
  75. package/dist/utils/captcha.mjs +64 -0
  76. package/dist/utils/captcha.mjs.map +1 -0
  77. package/dist/utils/oauth/completion.d.ts +10 -1
  78. package/dist/utils/oauth/completion.d.ts.map +1 -1
  79. package/dist/utils/oauth/completion.js +9 -0
  80. package/dist/utils/oauth/completion.js.map +1 -1
  81. package/dist/utils/oauth/completion.mjs +12 -7
  82. package/dist/utils/oauth/completion.mjs.map +1 -1
  83. package/dist/utils/oauth/storage.d.ts +10 -0
  84. package/dist/utils/oauth/storage.d.ts.map +1 -1
  85. package/dist/utils/oauth/storage.js +20 -0
  86. package/dist/utils/oauth/storage.js.map +1 -1
  87. package/dist/utils/oauth/storage.mjs +18 -1
  88. package/dist/utils/oauth/storage.mjs.map +1 -1
  89. package/dist/utils/oauth/url.d.ts +2 -0
  90. package/dist/utils/oauth/url.d.ts.map +1 -1
  91. package/dist/utils/oauth/url.js +2 -1
  92. package/dist/utils/oauth/url.js.map +1 -1
  93. package/dist/utils/oauth/url.mjs +3 -2
  94. package/dist/utils/oauth/url.mjs.map +1 -1
  95. package/package.json +4 -3
@@ -19,6 +19,7 @@ import { useTurnkey } from '../../providers/client/Hook.mjs';
19
19
  import { ClientState, WalletSelectorMode } from '../../types/base.mjs';
20
20
  import { WalletAuthButton } from './wallet/WalletAuthButton.mjs';
21
21
  import { ExternalWalletSelector } from './wallet/ExternalWalletSelector.mjs';
22
+ import { useTurnstile } from './TurnstileWidget.mjs';
22
23
 
23
24
  function AuthComponent(_ref) {
24
25
  var _config$ui;
@@ -41,6 +42,10 @@ function AuthComponent(_ref) {
41
42
  pushPage = _useModal.pushPage,
42
43
  isMobile = _useModal.isMobile,
43
44
  openSheet = _useModal.openSheet;
45
+ var _useTurnstile = useTurnstile(),
46
+ turnstile = _useTurnstile.turnstile,
47
+ consumeToken = _useTurnstile.consumeToken,
48
+ authEnabled = _useTurnstile.authEnabled;
44
49
  if (!config || clientState === ClientState.Loading) {
45
50
  // Don't check ClientState.Error here. We already check in the modal root
46
51
  return jsx("div", {
@@ -60,17 +65,23 @@ function AuthComponent(_ref) {
60
65
  oauthOrder = _ref2$oauthOrder === void 0 ? [] : _ref2$oauthOrder;
61
66
  var handleEmailSubmit = /*#__PURE__*/function () {
62
67
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(email) {
63
- var _config$auth, _config$auth2, _yield$initOtp, otpId, otpEncryptionTargetBundle, _t;
68
+ var _config$auth, _config$auth2, _yield$initOtp, otpId, otpEncryptionTargetBundle, _t, _t2, _t3, _t4;
64
69
  return _regenerator().w(function (_context) {
65
70
  while (1) switch (_context.p = _context.n) {
66
71
  case 0:
67
72
  _context.p = 0;
68
- _context.n = 1;
69
- return initOtp({
73
+ _t = initOtp;
74
+ _t2 = _objectSpread2;
75
+ _t3 = {
70
76
  otpType: OtpType.Email,
71
77
  contact: email
72
- });
78
+ };
79
+ _context.n = 1;
80
+ return consumeToken();
73
81
  case 1:
82
+ _context.n = 2;
83
+ return _t(_t2(_t3, _context.v));
84
+ case 2:
74
85
  _yield$initOtp = _context.v;
75
86
  otpId = _yield$initOtp.otpId;
76
87
  otpEncryptionTargetBundle = _yield$initOtp.otpEncryptionTargetBundle;
@@ -88,16 +99,16 @@ function AuthComponent(_ref) {
88
99
  })),
89
100
  showTitle: false
90
101
  });
91
- _context.n = 3;
102
+ _context.n = 4;
92
103
  break;
93
- case 2:
94
- _context.p = 2;
95
- _t = _context.v;
96
- throw new Error("Error initializing OTP: ".concat(_t));
97
104
  case 3:
105
+ _context.p = 3;
106
+ _t4 = _context.v;
107
+ throw new Error("Error initializing OTP: ".concat(_t4));
108
+ case 4:
98
109
  return _context.a(2);
99
110
  }
100
- }, _callee, null, [[0, 2]]);
111
+ }, _callee, null, [[0, 3]]);
101
112
  }));
102
113
  return function handleEmailSubmit(_x) {
103
114
  return _ref3.apply(this, arguments);
@@ -105,17 +116,23 @@ function AuthComponent(_ref) {
105
116
  }();
106
117
  var handlePhoneSubmit = /*#__PURE__*/function () {
107
118
  var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(phone, formattedPhone) {
108
- var _config$auth3, _config$auth4, _yield$initOtp2, otpId, otpEncryptionTargetBundle, _t2;
119
+ var _config$auth3, _config$auth4, _yield$initOtp2, otpId, otpEncryptionTargetBundle, _t5, _t6, _t7, _t8;
109
120
  return _regenerator().w(function (_context2) {
110
121
  while (1) switch (_context2.p = _context2.n) {
111
122
  case 0:
112
123
  _context2.p = 0;
113
- _context2.n = 1;
114
- return initOtp({
124
+ _t5 = initOtp;
125
+ _t6 = _objectSpread2;
126
+ _t7 = {
115
127
  otpType: OtpType.Sms,
116
128
  contact: phone
117
- });
129
+ };
130
+ _context2.n = 1;
131
+ return consumeToken();
118
132
  case 1:
133
+ _context2.n = 2;
134
+ return _t5(_t6(_t7, _context2.v));
135
+ case 2:
119
136
  _yield$initOtp2 = _context2.v;
120
137
  otpId = _yield$initOtp2.otpId;
121
138
  otpEncryptionTargetBundle = _yield$initOtp2.otpEncryptionTargetBundle;
@@ -135,16 +152,16 @@ function AuthComponent(_ref) {
135
152
  })),
136
153
  showTitle: false
137
154
  });
138
- _context2.n = 3;
155
+ _context2.n = 4;
139
156
  break;
140
- case 2:
141
- _context2.p = 2;
142
- _t2 = _context2.v;
143
- throw new Error("Error initializing OTP: ".concat(_t2));
144
157
  case 3:
158
+ _context2.p = 3;
159
+ _t8 = _context2.v;
160
+ throw new Error("Error initializing OTP: ".concat(_t8));
161
+ case 4:
145
162
  return _context2.a(2);
146
163
  }
147
- }, _callee2, null, [[0, 2]]);
164
+ }, _callee2, null, [[0, 3]]);
148
165
  }));
149
166
  return function handlePhoneSubmit(_x2, _x3) {
150
167
  return _ref4.apply(this, arguments);
@@ -189,14 +206,21 @@ function AuthComponent(_ref) {
189
206
  title: "Creating account with passkey...",
190
207
  action: function () {
191
208
  var _action2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
209
+ var _t9, _t0, _t1;
192
210
  return _regenerator().w(function (_context4) {
193
211
  while (1) switch (_context4.n) {
194
212
  case 0:
195
- _context4.n = 1;
196
- return signUpWithPasskey(_objectSpread2({}, sessionKey && {
213
+ _t9 = signUpWithPasskey;
214
+ _t0 = _objectSpread2;
215
+ _t1 = _objectSpread2({}, sessionKey && {
197
216
  sessionKey: sessionKey
198
- }));
217
+ });
218
+ _context4.n = 1;
219
+ return consumeToken();
199
220
  case 1:
221
+ _context4.n = 2;
222
+ return _t9(_t0(_t1, _context4.v));
223
+ case 2:
200
224
  return _context4.a(2);
201
225
  }
202
226
  }, _callee4);
@@ -215,23 +239,41 @@ function AuthComponent(_ref) {
215
239
  });
216
240
  };
217
241
  var handleGoogle = /*#__PURE__*/function () {
218
- var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
219
- return _regenerator().w(function (_context5) {
220
- while (1) switch (_context5.n) {
242
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
243
+ return _regenerator().w(function (_context6) {
244
+ while (1) switch (_context6.n) {
221
245
  case 0:
222
246
  pushPage({
223
247
  key: "Google OAuth",
224
248
  content: jsx(ActionPage, {
225
249
  title: "Authenticating with Google...",
226
- action: function action() {
227
- return handleGoogleOauth({
228
- additionalState: _objectSpread2({
229
- openModal: "true"
230
- }, sessionKey && {
231
- sessionKey: sessionKey
232
- }) // Tell the provider to reopen the auth modal and show the loading state
233
- });
234
- },
250
+ action: function () {
251
+ var _action3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
252
+ var _t10, _t11, _t12;
253
+ return _regenerator().w(function (_context5) {
254
+ while (1) switch (_context5.n) {
255
+ case 0:
256
+ _t10 = handleGoogleOauth;
257
+ _t11 = _objectSpread2;
258
+ _t12 = {
259
+ additionalState: _objectSpread2({
260
+ openModal: "true"
261
+ }, sessionKey && {
262
+ sessionKey: sessionKey
263
+ })
264
+ };
265
+ _context5.n = 1;
266
+ return consumeToken();
267
+ case 1:
268
+ return _context5.a(2, _t10(_t11(_t12, _context5.v)));
269
+ }
270
+ }, _callee5);
271
+ }));
272
+ function action() {
273
+ return _action3.apply(this, arguments);
274
+ }
275
+ return action;
276
+ }(),
235
277
  icon: jsx(FontAwesomeIcon, {
236
278
  size: "3x",
237
279
  icon: faGoogle
@@ -240,32 +282,50 @@ function AuthComponent(_ref) {
240
282
  showTitle: false
241
283
  });
242
284
  case 1:
243
- return _context5.a(2);
285
+ return _context6.a(2);
244
286
  }
245
- }, _callee5);
287
+ }, _callee6);
246
288
  }));
247
289
  return function handleGoogle() {
248
290
  return _ref5.apply(this, arguments);
249
291
  };
250
292
  }();
251
293
  var handleApple = /*#__PURE__*/function () {
252
- var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
253
- return _regenerator().w(function (_context6) {
254
- while (1) switch (_context6.n) {
294
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
295
+ return _regenerator().w(function (_context8) {
296
+ while (1) switch (_context8.n) {
255
297
  case 0:
256
298
  pushPage({
257
299
  key: "Apple OAuth",
258
300
  content: jsx(ActionPage, {
259
301
  title: "Authenticating with Apple...",
260
- action: function action() {
261
- return handleAppleOauth({
262
- additionalState: _objectSpread2({
263
- openModal: "true"
264
- }, sessionKey && {
265
- sessionKey: sessionKey
266
- }) // Tell the provider to reopen the auth modal and show the loading state
267
- });
268
- },
302
+ action: function () {
303
+ var _action4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
304
+ var _t13, _t14, _t15;
305
+ return _regenerator().w(function (_context7) {
306
+ while (1) switch (_context7.n) {
307
+ case 0:
308
+ _t13 = handleAppleOauth;
309
+ _t14 = _objectSpread2;
310
+ _t15 = {
311
+ additionalState: _objectSpread2({
312
+ openModal: "true"
313
+ }, sessionKey && {
314
+ sessionKey: sessionKey
315
+ })
316
+ };
317
+ _context7.n = 1;
318
+ return consumeToken();
319
+ case 1:
320
+ return _context7.a(2, _t13(_t14(_t15, _context7.v)));
321
+ }
322
+ }, _callee7);
323
+ }));
324
+ function action() {
325
+ return _action4.apply(this, arguments);
326
+ }
327
+ return action;
328
+ }(),
269
329
  icon: jsx(FontAwesomeIcon, {
270
330
  size: "3x",
271
331
  icon: faApple
@@ -274,32 +334,50 @@ function AuthComponent(_ref) {
274
334
  showTitle: false
275
335
  });
276
336
  case 1:
277
- return _context6.a(2);
337
+ return _context8.a(2);
278
338
  }
279
- }, _callee6);
339
+ }, _callee8);
280
340
  }));
281
341
  return function handleApple() {
282
342
  return _ref6.apply(this, arguments);
283
343
  };
284
344
  }();
285
345
  var handleFacebook = /*#__PURE__*/function () {
286
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
287
- return _regenerator().w(function (_context7) {
288
- while (1) switch (_context7.n) {
346
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
347
+ return _regenerator().w(function (_context0) {
348
+ while (1) switch (_context0.n) {
289
349
  case 0:
290
350
  pushPage({
291
351
  key: "Facebook OAuth",
292
352
  content: jsx(ActionPage, {
293
353
  title: "Authenticating with Facebook...",
294
- action: function action() {
295
- return handleFacebookOauth({
296
- additionalState: _objectSpread2({
297
- openModal: "true"
298
- }, sessionKey && {
299
- sessionKey: sessionKey
300
- }) // Tell the provider to reopen the auth modal and show the loading state
301
- });
302
- },
354
+ action: function () {
355
+ var _action5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
356
+ var _t16, _t17, _t18;
357
+ return _regenerator().w(function (_context9) {
358
+ while (1) switch (_context9.n) {
359
+ case 0:
360
+ _t16 = handleFacebookOauth;
361
+ _t17 = _objectSpread2;
362
+ _t18 = {
363
+ additionalState: _objectSpread2({
364
+ openModal: "true"
365
+ }, sessionKey && {
366
+ sessionKey: sessionKey
367
+ })
368
+ };
369
+ _context9.n = 1;
370
+ return consumeToken();
371
+ case 1:
372
+ return _context9.a(2, _t16(_t17(_t18, _context9.v)));
373
+ }
374
+ }, _callee9);
375
+ }));
376
+ function action() {
377
+ return _action5.apply(this, arguments);
378
+ }
379
+ return action;
380
+ }(),
303
381
  icon: jsx(FontAwesomeIcon, {
304
382
  size: "3x",
305
383
  icon: faFacebook
@@ -308,32 +386,50 @@ function AuthComponent(_ref) {
308
386
  showTitle: false
309
387
  });
310
388
  case 1:
311
- return _context7.a(2);
389
+ return _context0.a(2);
312
390
  }
313
- }, _callee7);
391
+ }, _callee0);
314
392
  }));
315
393
  return function handleFacebook() {
316
394
  return _ref7.apply(this, arguments);
317
395
  };
318
396
  }();
319
397
  var handleX = /*#__PURE__*/function () {
320
- var _ref8 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
321
- return _regenerator().w(function (_context8) {
322
- while (1) switch (_context8.n) {
398
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10() {
399
+ return _regenerator().w(function (_context10) {
400
+ while (1) switch (_context10.n) {
323
401
  case 0:
324
402
  pushPage({
325
403
  key: "X OAuth",
326
404
  content: jsx(ActionPage, {
327
405
  title: "Authenticating with X...",
328
- action: function action() {
329
- return handleXOauth({
330
- additionalState: _objectSpread2({
331
- openModal: "true"
332
- }, sessionKey && {
333
- sessionKey: sessionKey
334
- }) // Tell the provider to reopen the auth modal and show the loading state
335
- });
336
- },
406
+ action: function () {
407
+ var _action6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
408
+ var _t19, _t20, _t21;
409
+ return _regenerator().w(function (_context1) {
410
+ while (1) switch (_context1.n) {
411
+ case 0:
412
+ _t19 = handleXOauth;
413
+ _t20 = _objectSpread2;
414
+ _t21 = {
415
+ additionalState: _objectSpread2({
416
+ openModal: "true"
417
+ }, sessionKey && {
418
+ sessionKey: sessionKey
419
+ })
420
+ };
421
+ _context1.n = 1;
422
+ return consumeToken();
423
+ case 1:
424
+ return _context1.a(2, _t19(_t20(_t21, _context1.v)));
425
+ }
426
+ }, _callee1);
427
+ }));
428
+ function action() {
429
+ return _action6.apply(this, arguments);
430
+ }
431
+ return action;
432
+ }(),
337
433
  icon: jsx(FontAwesomeIcon, {
338
434
  size: "3x",
339
435
  icon: faXTwitter
@@ -342,32 +438,50 @@ function AuthComponent(_ref) {
342
438
  showTitle: false
343
439
  });
344
440
  case 1:
345
- return _context8.a(2);
441
+ return _context10.a(2);
346
442
  }
347
- }, _callee8);
443
+ }, _callee10);
348
444
  }));
349
445
  return function handleX() {
350
446
  return _ref8.apply(this, arguments);
351
447
  };
352
448
  }();
353
449
  var handleDiscord = /*#__PURE__*/function () {
354
- var _ref9 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
355
- return _regenerator().w(function (_context9) {
356
- while (1) switch (_context9.n) {
450
+ var _ref9 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12() {
451
+ return _regenerator().w(function (_context12) {
452
+ while (1) switch (_context12.n) {
357
453
  case 0:
358
454
  pushPage({
359
455
  key: "Discord OAuth",
360
456
  content: jsx(ActionPage, {
361
457
  title: "Authenticating with Discord...",
362
- action: function action() {
363
- return handleDiscordOauth({
364
- additionalState: _objectSpread2({
365
- openModal: "true"
366
- }, sessionKey && {
367
- sessionKey: sessionKey
368
- }) // Tell the provider to reopen the auth modal and show the loading state
369
- });
370
- },
458
+ action: function () {
459
+ var _action7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11() {
460
+ var _t22, _t23, _t24;
461
+ return _regenerator().w(function (_context11) {
462
+ while (1) switch (_context11.n) {
463
+ case 0:
464
+ _t22 = handleDiscordOauth;
465
+ _t23 = _objectSpread2;
466
+ _t24 = {
467
+ additionalState: _objectSpread2({
468
+ openModal: "true"
469
+ }, sessionKey && {
470
+ sessionKey: sessionKey
471
+ })
472
+ };
473
+ _context11.n = 1;
474
+ return consumeToken();
475
+ case 1:
476
+ return _context11.a(2, _t22(_t23(_t24, _context11.v)));
477
+ }
478
+ }, _callee11);
479
+ }));
480
+ function action() {
481
+ return _action7.apply(this, arguments);
482
+ }
483
+ return action;
484
+ }(),
371
485
  icon: jsx(FontAwesomeIcon, {
372
486
  size: "3x",
373
487
  icon: faDiscord
@@ -376,21 +490,21 @@ function AuthComponent(_ref) {
376
490
  showTitle: false
377
491
  });
378
492
  case 1:
379
- return _context9.a(2);
493
+ return _context12.a(2);
380
494
  }
381
- }, _callee9);
495
+ }, _callee12);
382
496
  }));
383
497
  return function handleDiscord() {
384
498
  return _ref9.apply(this, arguments);
385
499
  };
386
500
  }();
387
501
  var handleShowWalletSelector = /*#__PURE__*/function () {
388
- var _ref0 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0() {
389
- var _t3;
390
- return _regenerator().w(function (_context0) {
391
- while (1) switch (_context0.p = _context0.n) {
502
+ var _ref0 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee13() {
503
+ var _t25;
504
+ return _regenerator().w(function (_context13) {
505
+ while (1) switch (_context13.p = _context13.n) {
392
506
  case 0:
393
- _context0.p = 0;
507
+ _context13.p = 0;
394
508
  pushPage({
395
509
  key: "Select wallet provider",
396
510
  content: jsx(ExternalWalletSelector, {
@@ -398,16 +512,16 @@ function AuthComponent(_ref) {
398
512
  sessionKey: sessionKey
399
513
  })
400
514
  });
401
- _context0.n = 2;
515
+ _context13.n = 2;
402
516
  break;
403
517
  case 1:
404
- _context0.p = 1;
405
- _t3 = _context0.v;
406
- throw new Error("Error fetching wallet providers: ".concat(_t3));
518
+ _context13.p = 1;
519
+ _t25 = _context13.v;
520
+ throw new Error("Error fetching wallet providers: ".concat(_t25));
407
521
  case 2:
408
- return _context0.a(2);
522
+ return _context13.a(2);
409
523
  }
410
- }, _callee0, null, [[0, 1]]);
524
+ }, _callee13, null, [[0, 1]]);
411
525
  }));
412
526
  return function handleShowWalletSelector() {
413
527
  return _ref0.apply(this, arguments);
@@ -419,35 +533,40 @@ function AuthComponent(_ref) {
419
533
  icon: jsx(FontAwesomeIcon, {
420
534
  icon: faGoogle
421
535
  }),
422
- onClick: handleGoogle
536
+ onClick: handleGoogle,
537
+ disabled: !authEnabled
423
538
  }, "google") : null,
424
539
  apple: methods.appleOauthEnabled ? jsx(OAuthButton, {
425
540
  name: "Apple",
426
541
  icon: jsx(FontAwesomeIcon, {
427
542
  icon: faApple
428
543
  }),
429
- onClick: handleApple
544
+ onClick: handleApple,
545
+ disabled: !authEnabled
430
546
  }, "apple") : null,
431
547
  facebook: methods.facebookOauthEnabled ? jsx(OAuthButton, {
432
548
  name: "Facebook",
433
549
  icon: jsx(FontAwesomeIcon, {
434
550
  icon: faFacebook
435
551
  }),
436
- onClick: handleFacebook
552
+ onClick: handleFacebook,
553
+ disabled: !authEnabled
437
554
  }, "facebook") : null,
438
555
  x: methods.xOauthEnabled ? jsx(OAuthButton, {
439
556
  name: "X",
440
557
  icon: jsx(FontAwesomeIcon, {
441
558
  icon: faXTwitter
442
559
  }),
443
- onClick: handleX
560
+ onClick: handleX,
561
+ disabled: !authEnabled
444
562
  }, "x") : null,
445
563
  discord: methods.discordOauthEnabled ? jsx(OAuthButton, {
446
564
  name: "Discord",
447
565
  icon: jsx(FontAwesomeIcon, {
448
566
  icon: faDiscord
449
567
  }),
450
- onClick: handleDiscord
568
+ onClick: handleDiscord,
569
+ disabled: !authEnabled
451
570
  }, "discord") : null
452
571
  };
453
572
  var oauthButtons = oauthOrder.map(function (provider) {
@@ -463,6 +582,7 @@ function AuthComponent(_ref) {
463
582
  icon: jsx(FontAwesomeIcon, {
464
583
  icon: faEllipsisH
465
584
  }),
585
+ disabled: !authEnabled,
466
586
  onClick: function onClick() {
467
587
  return openSheet({
468
588
  key: "Select a social method",
@@ -483,17 +603,21 @@ function AuthComponent(_ref) {
483
603
  var methodComponents = {
484
604
  socials: oauthBlock,
485
605
  email: methods.emailOtpAuthEnabled ? jsx(EmailInput, {
486
- onContinue: handleEmailSubmit
606
+ onContinue: handleEmailSubmit,
607
+ disabled: !authEnabled
487
608
  }) : null,
488
609
  sms: methods.smsOtpAuthEnabled ? jsx(PhoneNumberInput, {
489
- onContinue: handlePhoneSubmit
610
+ onContinue: handlePhoneSubmit,
611
+ disabled: !authEnabled
490
612
  }) : null,
491
613
  passkey: methods.passkeyAuthEnabled ? jsx(PasskeyButtons, {
492
614
  onLogin: handlePasskeyLogin,
493
- onSignUp: handlePasskeySignUp
615
+ onSignUp: handlePasskeySignUp,
616
+ disabled: !authEnabled
494
617
  }) : null,
495
618
  wallet: methods.walletAuthEnabled ? jsx(WalletAuthButton, {
496
- onContinue: handleShowWalletSelector
619
+ onContinue: handleShowWalletSelector,
620
+ disabled: !authEnabled
497
621
  }) : null
498
622
  };
499
623
  // -- Final Rendering Order --
@@ -529,7 +653,7 @@ function AuthComponent(_ref) {
529
653
  developerMessages: ["You have not passed in authProxyConfigId into the TurnkeyProvider.", "To use this modal, you must be using Turnkey's Auth Proxy.", "Please enable it in the Turnkey dashboard and pass in the authProxyConfigId into the TurnkeyProvider."],
530
654
  // Users should never see this message ever. We should give a reward for anyone who does see this.
531
655
  userMessages: ["You touched fuzzy.... and got dizzy."]
532
- }), jsx("div", {
656
+ }), turnstile, jsx("div", {
533
657
  className: "text-icon-text-light/70 dark:text-icon-text-dark/70 text-xs mt-4 text-center",
534
658
  children: jsxs("span", {
535
659
  children: ["By continuing, you agree to our", " ", jsx("a", {