@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
@@ -71,37 +71,38 @@ var Auth = function Auth(_ref) {
71
71
  passkeyConfig = _ref.passkeyConfig,
72
72
  otpConfig = _ref.otpConfig;
73
73
  var _useTurnkey = useTurnkey(),
74
- authIframeClient = _useTurnkey.authIframeClient,
75
74
  passkeyClient = _useTurnkey.passkeyClient,
76
- walletClient = _useTurnkey.walletClient;
75
+ walletClient = _useTurnkey.walletClient,
76
+ indexedDbClient = _useTurnkey.indexedDbClient,
77
+ turnkey = _useTurnkey.turnkey;
77
78
  var _useState = useState(""),
78
79
  _useState2 = _slicedToArray(_useState, 2),
79
- email = _useState2[0],
80
- setEmail = _useState2[1];
80
+ publicKey = _useState2[0],
81
+ setPublicKey = _useState2[1];
81
82
  var _useState3 = useState(""),
82
83
  _useState4 = _slicedToArray(_useState3, 2),
83
- phone = _useState4[0],
84
- setPhone = _useState4[1];
85
- var _useState5 = useState(null),
84
+ email = _useState4[0],
85
+ setEmail = _useState4[1];
86
+ var _useState5 = useState(""),
86
87
  _useState6 = _slicedToArray(_useState5, 2),
87
- otpId = _useState6[0],
88
- setOtpId = _useState6[1];
89
- var _useState7 = useState("auth"),
88
+ phone = _useState6[0],
89
+ setPhone = _useState6[1];
90
+ var _useState7 = useState(null),
90
91
  _useState8 = _slicedToArray(_useState7, 2),
91
- step = _useState8[0],
92
- setStep = _useState8[1];
93
- var _useState9 = useState(),
92
+ otpId = _useState8[0],
93
+ setOtpId = _useState8[1];
94
+ var _useState9 = useState("auth"),
94
95
  _useState10 = _slicedToArray(_useState9, 2),
95
- loading = _useState10[0],
96
- setLoading = _useState10[1];
97
- var _useState11 = useState(""),
96
+ step = _useState10[0],
97
+ setStep = _useState10[1];
98
+ var _useState11 = useState(),
98
99
  _useState12 = _slicedToArray(_useState11, 2),
99
- oauthLoading = _useState12[0],
100
- setOauthLoading = _useState12[1];
100
+ loading = _useState12[0],
101
+ setLoading = _useState12[1];
101
102
  var _useState13 = useState(""),
102
103
  _useState14 = _slicedToArray(_useState13, 2),
103
- suborgId = _useState14[0],
104
- setSuborgId = _useState14[1];
104
+ oauthLoading = _useState14[0],
105
+ setOauthLoading = _useState14[1];
105
106
  var _useState15 = useState(false),
106
107
  _useState16 = _slicedToArray(_useState15, 2),
107
108
  passkeySignupScreen = _useState16[0],
@@ -154,28 +155,51 @@ var Auth = function Auth(_ref) {
154
155
  };
155
156
  }();
156
157
  useEffect(function () {
157
- if (authIframeClient) {
158
+ if (indexedDbClient && turnkey) {
158
159
  setComponentReady(true);
159
- var updateIframeKey = /*#__PURE__*/function () {
160
+ var manageClient = /*#__PURE__*/function () {
160
161
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
162
+ var session, _publicKey, _publicKey2;
161
163
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
162
164
  while (1) switch (_context2.prev = _context2.next) {
163
165
  case 0:
164
166
  _context2.next = 2;
165
- return authIframeClient.initEmbeddedKey();
167
+ return turnkey.getSession();
166
168
  case 2:
169
+ session = _context2.sent;
170
+ if (!session) {
171
+ _context2.next = 10;
172
+ break;
173
+ }
174
+ _context2.next = 6;
175
+ return indexedDbClient.getPublicKey();
176
+ case 6:
177
+ _publicKey = _context2.sent;
178
+ setPublicKey(_publicKey);
179
+ _context2.next = 16;
180
+ break;
181
+ case 10:
182
+ _context2.next = 12;
183
+ return indexedDbClient.resetKeyPair();
184
+ case 12:
185
+ _context2.next = 14;
186
+ return indexedDbClient.getPublicKey();
187
+ case 14:
188
+ _publicKey2 = _context2.sent;
189
+ setPublicKey(_publicKey2);
190
+ case 16:
167
191
  case "end":
168
192
  return _context2.stop();
169
193
  }
170
194
  }, _callee2);
171
195
  }));
172
- return function updateIframeKey() {
196
+ return function manageClient() {
173
197
  return _ref3.apply(this, arguments);
174
198
  };
175
199
  }();
176
- updateIframeKey();
200
+ manageClient();
177
201
  }
178
- }, [authIframeClient]);
202
+ }, [indexedDbClient]);
179
203
  if (!componentReady) {
180
204
  return jsx("div", {
181
205
  className: styles.defaultLoader,
@@ -196,7 +220,7 @@ var Auth = function Auth(_ref) {
196
220
  };
197
221
  var handleSignupWithPasskey = /*#__PURE__*/function () {
198
222
  var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
199
- var siteInfo, _authConfig$sessionLe, _passkeyConfig$name, _passkeyConfig$displa, _ref5, encodedChallenge, attestation, response, iframePublicKey;
223
+ var siteInfo, _authConfig$sessionLe, _passkeyConfig$name, _passkeyConfig$displa, _ref5, encodedChallenge, attestation, response, pubKey;
200
224
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
201
225
  while (1) switch (_context3.prev = _context3.next) {
202
226
  case 0:
@@ -261,14 +285,13 @@ var Auth = function Auth(_ref) {
261
285
  case 21:
262
286
  case 22:
263
287
  _context3.next = 24;
264
- return authIframeClient.initEmbeddedKey();
288
+ return indexedDbClient.getPublicKey();
265
289
  case 24:
266
- iframePublicKey = _context3.sent;
290
+ pubKey = _context3.sent;
267
291
  _context3.next = 27;
268
292
  return passkeyClient === null || passkeyClient === void 0 ? void 0 : passkeyClient.loginWithPasskey({
269
293
  sessionType: SessionType.READ_WRITE,
270
- iframeClient: authIframeClient,
271
- targetPublicKey: iframePublicKey,
294
+ publicKey: pubKey,
272
295
  expirationSeconds: (_authConfig$sessionLe = authConfig.sessionLengthSeconds) === null || _authConfig$sessionLe === void 0 ? void 0 : _authConfig$sessionLe.toString()
273
296
  });
274
297
  case 27:
@@ -294,21 +317,20 @@ var Auth = function Auth(_ref) {
294
317
  }();
295
318
  var handleLoginWithPasskey = /*#__PURE__*/function () {
296
319
  var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
297
- var _authConfig$sessionLe2, iframePublicKey;
320
+ var _authConfig$sessionLe2, pubKey;
298
321
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
299
322
  while (1) switch (_context4.prev = _context4.next) {
300
323
  case 0:
301
324
  _context4.prev = 0;
302
325
  setLoading("passkey");
303
326
  _context4.next = 4;
304
- return authIframeClient.initEmbeddedKey();
327
+ return indexedDbClient.getPublicKey();
305
328
  case 4:
306
- iframePublicKey = _context4.sent;
329
+ pubKey = _context4.sent;
307
330
  _context4.next = 7;
308
331
  return passkeyClient === null || passkeyClient === void 0 ? void 0 : passkeyClient.loginWithPasskey({
309
332
  sessionType: SessionType.READ_WRITE,
310
- iframeClient: authIframeClient,
311
- targetPublicKey: iframePublicKey,
333
+ publicKey: pubKey,
312
334
  expirationSeconds: (_authConfig$sessionLe2 = authConfig.sessionLengthSeconds) === null || _authConfig$sessionLe2 === void 0 ? void 0 : _authConfig$sessionLe2.toString()
313
335
  });
314
336
  case 7:
@@ -339,7 +361,7 @@ var Auth = function Auth(_ref) {
339
361
  var handleOtpLogin = /*#__PURE__*/function () {
340
362
  var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(type, value, otpType) {
341
363
  var _otpConfig$otpLength, _otpConfig$alphanumer;
342
- var createSuborgData, resp, suborgIds, suborgId, iframePublicKey, initAuthResponse;
364
+ var createSuborgData, publicKey, initAuthResponse;
343
365
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
344
366
  while (1) switch (_context5.prev = _context5.next) {
345
367
  case 0:
@@ -354,29 +376,11 @@ var Auth = function Auth(_ref) {
354
376
  createSuborgData.customAccounts = customAccounts;
355
377
  }
356
378
  _context5.next = 6;
357
- return server.getOrCreateSuborg({
358
- filterType: type,
359
- filterValue: value,
360
- additionalData: createSuborgData
361
- });
379
+ return indexedDbClient.getPublicKey();
362
380
  case 6:
363
- resp = _context5.sent;
364
- suborgIds = resp === null || resp === void 0 ? void 0 : resp.subOrganizationIds;
365
- if (!(!suborgIds || suborgIds.length === 0)) {
366
- _context5.next = 11;
367
- break;
368
- }
369
- onError(authErrors.otp.sendFailed);
370
- return _context5.abrupt("return");
371
- case 11:
372
- suborgId = suborgIds[0];
373
- _context5.next = 14;
374
- return authIframeClient.initEmbeddedKey();
375
- case 14:
376
- iframePublicKey = _context5.sent;
377
- _context5.next = 17;
381
+ publicKey = _context5.sent;
382
+ _context5.next = 9;
378
383
  return server.sendOtp(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
379
- suborgID: suborgId,
380
384
  otpType: otpType,
381
385
  contact: value
382
386
  }, emailCustomization && {
@@ -388,19 +392,18 @@ var Auth = function Auth(_ref) {
388
392
  }), {}, {
389
393
  otpLength: (_otpConfig$otpLength = otpConfig === null || otpConfig === void 0 ? void 0 : otpConfig.otpLength) !== null && _otpConfig$otpLength !== void 0 ? _otpConfig$otpLength : 6,
390
394
  alphanumeric: (_otpConfig$alphanumer = otpConfig === null || otpConfig === void 0 ? void 0 : otpConfig.alphanumeric) !== null && _otpConfig$alphanumer !== void 0 ? _otpConfig$alphanumer : false,
391
- userIdentifier: iframePublicKey
395
+ userIdentifier: publicKey
392
396
  }));
393
- case 17:
397
+ case 9:
394
398
  initAuthResponse = _context5.sent;
395
399
  if (initAuthResponse && initAuthResponse.otpId) {
396
- setSuborgId(suborgId);
397
400
  setOtpId(initAuthResponse === null || initAuthResponse === void 0 ? void 0 : initAuthResponse.otpId);
398
401
  setStep(otpType);
399
402
  } else {
400
403
  onError(authErrors.otp.sendFailed);
401
404
  }
402
405
  setLoading(undefined);
403
- case 20:
406
+ case 12:
404
407
  case "end":
405
408
  return _context5.stop();
406
409
  }
@@ -412,7 +415,7 @@ var Auth = function Auth(_ref) {
412
415
  }();
413
416
  var handleOAuthLogin = /*#__PURE__*/function () {
414
417
  var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(credential, providerName) {
415
- var createSuborgData, resp, suborgIds, suborgId, iframePublicKey, oauthSession;
418
+ var createSuborgData, resp, suborgIds, suborgId, sessionResponse;
416
419
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
417
420
  while (1) switch (_context6.prev = _context6.next) {
418
421
  case 0:
@@ -444,33 +447,29 @@ var Auth = function Auth(_ref) {
444
447
  case 10:
445
448
  suborgId = suborgIds[0];
446
449
  _context6.next = 13;
447
- return authIframeClient.initEmbeddedKey();
448
- case 13:
449
- iframePublicKey = _context6.sent;
450
- _context6.next = 16;
451
- return server.oauth({
450
+ return server.oauthLogin({
452
451
  suborgID: suborgId,
453
452
  oidcToken: credential,
454
- targetPublicKey: iframePublicKey,
453
+ publicKey: publicKey,
455
454
  sessionLengthSeconds: authConfig.sessionLengthSeconds
456
455
  });
457
- case 16:
458
- oauthSession = _context6.sent;
459
- if (!(oauthSession && oauthSession.token)) {
460
- _context6.next = 24;
456
+ case 13:
457
+ sessionResponse = _context6.sent;
458
+ if (!(sessionResponse && sessionResponse.session)) {
459
+ _context6.next = 21;
461
460
  break;
462
461
  }
463
- _context6.next = 20;
464
- return authIframeClient.loginWithSession(oauthSession);
465
- case 20:
466
- _context6.next = 22;
462
+ _context6.next = 17;
463
+ return indexedDbClient.loginWithSession(sessionResponse.session);
464
+ case 17:
465
+ _context6.next = 19;
467
466
  return onAuthSuccess();
468
- case 22:
469
- _context6.next = 25;
467
+ case 19:
468
+ _context6.next = 22;
470
469
  break;
471
- case 24:
470
+ case 21:
472
471
  onError(authErrors.oauth.loginFailed);
473
- case 25:
472
+ case 22:
474
473
  case "end":
475
474
  return _context6.stop();
476
475
  }
@@ -482,7 +481,7 @@ var Auth = function Auth(_ref) {
482
481
  }();
483
482
  var handleLoginWithWallet = /*#__PURE__*/function () {
484
483
  var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
485
- var _authConfig$sessionLe3, publicKey, _walletClient$getWall, type, resp, suborgIds, iframePublicKey;
484
+ var _authConfig$sessionLe3, _publicKey3, _walletClient$getWall, type, resp, suborgIds, pubKey;
486
485
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
487
486
  while (1) switch (_context7.prev = _context7.next) {
488
487
  case 0:
@@ -497,8 +496,8 @@ var Auth = function Auth(_ref) {
497
496
  _context7.next = 6;
498
497
  return walletClient.getPublicKey();
499
498
  case 6:
500
- publicKey = _context7.sent;
501
- if (publicKey) {
499
+ _publicKey3 = _context7.sent;
500
+ if (_publicKey3) {
502
501
  _context7.next = 9;
503
502
  break;
504
503
  }
@@ -508,10 +507,10 @@ var Auth = function Auth(_ref) {
508
507
  _context7.next = 12;
509
508
  return server.getOrCreateSuborg({
510
509
  filterType: FilterType.PublicKey,
511
- filterValue: publicKey,
510
+ filterValue: _publicKey3,
512
511
  additionalData: {
513
512
  wallet: {
514
- publicKey: publicKey,
513
+ publicKey: _publicKey3,
515
514
  type: type
516
515
  }
517
516
  }
@@ -527,14 +526,13 @@ var Auth = function Auth(_ref) {
527
526
  return _context7.abrupt("return");
528
527
  case 17:
529
528
  _context7.next = 19;
530
- return authIframeClient.initEmbeddedKey();
529
+ return indexedDbClient.getPublicKey();
531
530
  case 19:
532
- iframePublicKey = _context7.sent;
531
+ pubKey = _context7.sent;
533
532
  _context7.next = 22;
534
533
  return walletClient.loginWithWallet({
535
534
  sessionType: SessionType.READ_WRITE,
536
- iframeClient: authIframeClient,
537
- targetPublicKey: iframePublicKey,
535
+ publicKey: pubKey,
538
536
  expirationSeconds: (_authConfig$sessionLe3 = authConfig.sessionLengthSeconds) === null || _authConfig$sessionLe3 === void 0 ? void 0 : _authConfig$sessionLe3.toString()
539
537
  });
540
538
  case 22:
@@ -595,15 +593,15 @@ var Auth = function Auth(_ref) {
595
593
  children: [googleEnabled && jsx(GoogleAuthButton, {
596
594
  layout: layout,
597
595
  clientId: (_authConfig$googleCli = authConfig.googleClientId) !== null && _authConfig$googleCli !== void 0 ? _authConfig$googleCli : process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID,
598
- iframePublicKey: authIframeClient.iframePublicKey,
599
596
  openInPage: authConfig.openOAuthInPage,
597
+ publicKey: publicKey,
600
598
  onSuccess: function onSuccess(response) {
601
599
  return handleOAuthLogin(response.idToken, "Google");
602
600
  }
603
601
  }), appleEnabled && jsx(AppleAuthButton, {
604
602
  layout: layout,
605
603
  clientId: (_authConfig$appleClie = authConfig.appleClientId) !== null && _authConfig$appleClie !== void 0 ? _authConfig$appleClie : process.env.NEXT_PUBLIC_APPLE_CLIENT_ID,
606
- iframePublicKey: authIframeClient.iframePublicKey,
604
+ publicKey: publicKey,
607
605
  openInPage: authConfig.openOAuthInPage,
608
606
  onSuccess: function onSuccess(response) {
609
607
  return handleOAuthLogin(response.idToken, "Apple");
@@ -611,7 +609,7 @@ var Auth = function Auth(_ref) {
611
609
  }), facebookEnabled && jsx(FacebookAuthButton, {
612
610
  layout: layout,
613
611
  clientId: (_authConfig$facebookC = authConfig.facebookClientId) !== null && _authConfig$facebookC !== void 0 ? _authConfig$facebookC : process.env.NEXT_PUBLIC_FACEBOOK_CLIENT_ID,
614
- iframePublicKey: authIframeClient.iframePublicKey,
612
+ publicKey: publicKey,
615
613
  openInPage: authConfig.openOAuthInPage,
616
614
  onSuccess: function onSuccess(response) {
617
615
  return handleOAuthLogin(response.id_token, "Facebook");
@@ -846,7 +844,6 @@ var Auth = function Auth(_ref) {
846
844
  }), otpId && jsx(OtpVerification, {
847
845
  type: step,
848
846
  contact: step === OtpType.Email ? email : phone,
849
- suborgId: suborgId,
850
847
  otpId: otpId,
851
848
  alphanumeric: (_otpConfig$alphanumer2 = otpConfig === null || otpConfig === void 0 ? void 0 : otpConfig.alphanumeric) !== null && _otpConfig$alphanumer2 !== void 0 ? _otpConfig$alphanumer2 : false,
852
849
  sessionLengthSeconds: authConfig.sessionLengthSeconds,