@turnkey/sdk-react 3.1.0 → 4.1.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 (40) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/dist/components/auth/Apple.d.ts.map +1 -1
  3. package/dist/components/auth/Apple.js +21 -8
  4. package/dist/components/auth/Apple.js.map +1 -1
  5. package/dist/components/auth/Apple.mjs +27 -11
  6. package/dist/components/auth/Apple.mjs.map +1 -1
  7. package/dist/components/auth/Auth.d.ts +7 -1
  8. package/dist/components/auth/Auth.d.ts.map +1 -1
  9. package/dist/components/auth/Auth.js +81 -71
  10. package/dist/components/auth/Auth.js.map +1 -1
  11. package/dist/components/auth/Auth.mjs +213 -238
  12. package/dist/components/auth/Auth.mjs.map +1 -1
  13. package/dist/components/auth/Facebook.d.ts.map +1 -1
  14. package/dist/components/auth/Facebook.js +19 -8
  15. package/dist/components/auth/Facebook.js.map +1 -1
  16. package/dist/components/auth/Facebook.mjs +35 -21
  17. package/dist/components/auth/Facebook.mjs.map +1 -1
  18. package/dist/components/auth/Google.d.ts.map +1 -1
  19. package/dist/components/auth/Google.js +20 -9
  20. package/dist/components/auth/Google.js.map +1 -1
  21. package/dist/components/auth/Google.mjs +28 -14
  22. package/dist/components/auth/Google.mjs.map +1 -1
  23. package/dist/components/auth/OtpVerification.d.ts +1 -2
  24. package/dist/components/auth/OtpVerification.d.ts.map +1 -1
  25. package/dist/components/auth/OtpVerification.js +11 -5
  26. package/dist/components/auth/OtpVerification.js.map +1 -1
  27. package/dist/components/auth/OtpVerification.mjs +24 -17
  28. package/dist/components/auth/OtpVerification.mjs.map +1 -1
  29. package/dist/contexts/TurnkeyContext.d.ts.map +1 -1
  30. package/dist/contexts/TurnkeyContext.js +24 -16
  31. package/dist/contexts/TurnkeyContext.js.map +1 -1
  32. package/dist/contexts/TurnkeyContext.mjs +30 -33
  33. package/dist/contexts/TurnkeyContext.mjs.map +1 -1
  34. package/dist/hooks/use-session.d.ts.map +1 -1
  35. package/dist/hooks/use-session.js +24 -12
  36. package/dist/hooks/use-session.js.map +1 -1
  37. package/dist/hooks/use-session.mjs +28 -14
  38. package/dist/hooks/use-session.mjs.map +1 -1
  39. package/dist/index.js +1 -1
  40. package/package.json +5 -5
@@ -19,6 +19,11 @@ import { OtpType, FilterType, authErrors } from './constants.mjs';
19
19
  import { server } from '@turnkey/sdk-server';
20
20
  import parsePhoneNumberFromString from 'libphonenumber-js';
21
21
 
22
+ var SessionType;
23
+ (function (SessionType) {
24
+ SessionType["READ_ONLY"] = "SESSION_TYPE_READ_ONLY";
25
+ SessionType["READ_WRITE"] = "SESSION_TYPE_READ_WRITE";
26
+ })(SessionType || (SessionType = {}));
22
27
  var passkeyIcon = jsxs("svg", {
23
28
  xmlns: "http://www.w3.org/2000/svg",
24
29
  width: "43",
@@ -26,14 +31,14 @@ var passkeyIcon = jsxs("svg", {
26
31
  fill: "none",
27
32
  children: [jsx("path", {
28
33
  fill: "var(--icon-color)",
29
- "fill-rule": "evenodd",
34
+ fillRule: "evenodd",
30
35
  d: "M27.52 37.06a6.8 6.8 0 0 0-2.02-.31H12a6.75 6.75 0 0 0-6.75 6.75V48H.75v-4.5A11.25 11.25 0 0 1 12 32.25h13.5c.68 0 1.355.062 2.016.182zm4.698-23.74a13.5 13.5 0 1 0-8.503 13.484c-.057-.178-.131-.425-.167-.566a13 13 0 0 1-.229-1.134 12 12 0 0 1-.054-.448q-.02-.202-.013-1.064c.007-.82.01-.877.055-1.186.018-.121.046-.29.072-.438a9 9 0 1 1 4.315-6.714 13.83 13.83 0 0 1 .87-.564 14 14 0 0 1 1.08-.556c.102-.045.299-.128.44-.184.14-.056.384-.146.544-.202.16-.055.436-.141.615-.194.18-.05.467-.125.641-.165.092-.02.214-.046.334-.07",
31
- "clip-rule": "evenodd"
36
+ clipRule: "evenodd"
32
37
  }), jsx("path", {
33
38
  fill: "var(--icon-color)",
34
- "fill-rule": "evenodd",
39
+ fillRule: "evenodd",
35
40
  d: "M33.844 16.554a9.563 9.563 0 0 0-.975.134c-.125.022-.355.075-.51.114s-.418.12-.589.177a11 11 0 0 0-.553.21 12 12 0 0 0-.519.244 8.29 8.29 0 0 0-.961.573c-.114.08-.313.23-.445.334-.13.104-.358.31-.507.454a10 10 0 0 0-.466.495c-.107.127-.269.334-.362.46-.091.128-.232.34-.313.474-.079.133-.195.34-.256.46-.062.122-.15.308-.196.413a10 10 0 0 0-.152.387c-.04.107-.1.304-.14.44a9 9 0 0 0-.119.51c-.028.145-.065.374-.082.51a6 6 0 0 0-.032.773c-.002.327.007.598.021.712a8.924 8.924 0 0 0 .163.905c.03.116.09.322.134.457.046.136.125.35.178.475a8 8 0 0 0 .725 1.329 9.15 9.15 0 0 0 .622.772c.111.121.294.306.408.41.114.101.295.256.4.342.108.085.273.211.37.28.097.068.244.165.325.218l.299.179c.082.047.251.137.374.2.125.062.232.127.24.146.013.025.018 2.403.018 7.032 0 5.905.004 7.018.025 7.125.014.07.047.18.075.24.029.064.08.156.113.203.032.05.522.654 1.086 1.345.564.693 1.07 1.31 1.123 1.371.054.063.14.151.195.195.054.042.162.111.239.151s.204.092.281.115c.121.035.181.04.413.04.206 0 .3-.007.387-.03a2 2 0 0 0 .237-.09 1.8 1.8 0 0 0 .388-.25c.029-.029.547-.657 1.153-1.397a97 97 0 0 0 1.12-1.383.4.4 0 0 0 .019-.137c0-.053-.016-.178-.035-.276a5 5 0 0 0-.273-.876 24 24 0 0 0-.298-.73 32 32 0 0 0-.626-1.365.8.8 0 0 1-.069-.172q.001-.033.041-.043c.021-.003.134-.016.25-.026s.295-.032.395-.046c.102-.016.248-.044.325-.065a.9.9 0 0 0 .237-.102.8.8 0 0 0 .15-.133c.028-.037.073-.116.1-.174.026-.058.054-.16.065-.229a1.895 1.895 0 0 0-.042-.589 2 2 0 0 0-.074-.193c-.023-.053-.355-.542-.736-1.085-.38-.543-.693-1.005-.693-1.025 0-.028.037-.046.234-.105.128-.04.339-.113.469-.162.132-.047.293-.116.36-.15a1 1 0 0 0 .204-.144.8.8 0 0 0 .144-.212c.034-.072.072-.18.085-.238s.024-.2.024-.316c0-.123-.009-.25-.024-.308a1.4 1.4 0 0 0-.072-.202c-.032-.07-.275-.39-.737-.975-.378-.479-.687-.883-.687-.9s.018-.043.04-.055.197-.11.39-.215c.194-.103.431-.237.528-.295.096-.058.22-.15.274-.204a1.1 1.1 0 0 0 .257-.459c.026-.1.031-.247.04-1.283.005-.642.016-1.178.023-1.19s.105-.069.22-.125c.112-.058.284-.15.38-.204a10 10 0 0 0 .985-.668 6.762 6.762 0 0 0 .826-.767c.107-.117.267-.305.358-.418a8 8 0 0 0 .605-.891 8.9 8.9 0 0 0 .373-.756c.045-.105.12-.308.17-.448a8 8 0 0 0 .156-.536c.037-.155.088-.408.113-.563.023-.155.05-.381.061-.505a8 8 0 0 0-.007-1.139 8 8 0 0 0-.07-.527 8 8 0 0 0-.097-.466c-.028-.116-.08-.3-.116-.413a7 7 0 0 0-.83-1.714 10 10 0 0 0-.256-.37 9 9 0 0 0-.23-.29 9 9 0 0 0-.81-.82 9 9 0 0 0-.395-.32 9 9 0 0 0-.835-.556 13 13 0 0 0-.417-.221 11 11 0 0 0-.483-.223 8 8 0 0 0-.98-.343 11 11 0 0 0-.422-.108c-.106-.022-.288-.06-.404-.079a10 10 0 0 0-.51-.073 8 8 0 0 0-.852-.043c-.304-.001-.644.002-.756.011m.207 3.334-.058.006a4.6 4.6 0 0 0-1.283.341 4 4 0 0 0-.334.159 4.354 4.354 0 0 0-.668.452 5.5 5.5 0 0 0-.669.69 5 5 0 0 0-.207.308 4 4 0 0 0-.18.325c-.04.088-.101.234-.135.325a3.856 3.856 0 0 0-.177.66c-.016.087-.034.24-.04.342-.01.159-.008.19.017.215.028.03.25.031 4.175.031 3.663 0 4.15-.003 4.174-.026q.029-.027.028-.12a3 3 0 0 0-.072-.574 3.9 3.9 0 0 0-.297-.87 4 4 0 0 0-.21-.379 6 6 0 0 0-.23-.316 6 6 0 0 0-.346-.37 5 5 0 0 0-.365-.326 7 7 0 0 0-.246-.178 5 5 0 0 0-.264-.16 4.6 4.6 0 0 0-1.585-.52 5.681 5.681 0 0 0-.84-.035z",
36
- "clip-rule": "evenodd"
41
+ clipRule: "evenodd"
37
42
  })]
38
43
  });
39
44
  var passkeyIconError = jsxs("svg", {
@@ -43,14 +48,14 @@ var passkeyIconError = jsxs("svg", {
43
48
  fill: "none",
44
49
  children: [jsx("path", {
45
50
  fill: "var(--error-color)",
46
- "fill-rule": "evenodd",
51
+ fillRule: "evenodd",
47
52
  d: "M27.52 37.06a6.8 6.8 0 0 0-2.02-.31H12a6.75 6.75 0 0 0-6.75 6.75V48H.75v-4.5A11.25 11.25 0 0 1 12 32.25h13.5c.68 0 1.355.062 2.016.182zm4.698-23.74a13.5 13.5 0 1 0-8.503 13.484c-.057-.178-.131-.425-.167-.566a13 13 0 0 1-.229-1.134 12 12 0 0 1-.054-.448q-.02-.202-.013-1.064c.007-.82.01-.877.055-1.186.018-.121.046-.29.072-.438a9 9 0 1 1 4.315-6.714 13.83 13.83 0 0 1 .87-.564 14 14 0 0 1 1.08-.556c.102-.045.299-.128.44-.184.14-.056.384-.146.544-.202.16-.055.436-.141.615-.194.18-.05.467-.125.641-.165.092-.02.214-.046.334-.07",
48
- "clip-rule": "evenodd"
53
+ clipRule: "evenodd"
49
54
  }), jsx("path", {
50
55
  fill: "var(--error-color)",
51
- "fill-rule": "evenodd",
56
+ fillRule: "evenodd",
52
57
  d: "M33.844 16.554a9.563 9.563 0 0 0-.975.134c-.125.022-.355.075-.51.114s-.418.12-.589.177a11 11 0 0 0-.553.21 12 12 0 0 0-.519.244 8.29 8.29 0 0 0-.961.573c-.114.08-.313.23-.445.334-.13.104-.358.31-.507.454a10 10 0 0 0-.466.495c-.107.127-.269.334-.362.46-.091.128-.232.34-.313.474-.079.133-.195.34-.256.46-.062.122-.15.308-.196.413a10 10 0 0 0-.152.387c-.04.107-.1.304-.14.44a9 9 0 0 0-.119.51c-.028.145-.065.374-.082.51a6 6 0 0 0-.032.773c-.002.327.007.598.021.712a8.924 8.924 0 0 0 .163.905c.03.116.09.322.134.457.046.136.125.35.178.475a8 8 0 0 0 .725 1.329 9.15 9.15 0 0 0 .622.772c.111.121.294.306.408.41.114.101.295.256.4.342.108.085.273.211.37.28.097.068.244.165.325.218l.299.179c.082.047.251.137.374.2.125.062.232.127.24.146.013.025.018 2.403.018 7.032 0 5.905.004 7.018.025 7.125.014.07.047.18.075.24.029.064.08.156.113.203.032.05.522.654 1.086 1.345.564.693 1.07 1.31 1.123 1.371.054.063.14.151.195.195.054.042.162.111.239.151s.204.092.281.115c.121.035.181.04.413.04.206 0 .3-.007.387-.03a2 2 0 0 0 .237-.09 1.8 1.8 0 0 0 .388-.25c.029-.029.547-.657 1.153-1.397a97 97 0 0 0 1.12-1.383.4.4 0 0 0 .019-.137c0-.053-.016-.178-.035-.276a5 5 0 0 0-.273-.876 24 24 0 0 0-.298-.73 32 32 0 0 0-.626-1.365.8.8 0 0 1-.069-.172q.001-.033.041-.043c.021-.003.134-.016.25-.026s.295-.032.395-.046c.102-.016.248-.044.325-.065a.9.9 0 0 0 .237-.102.8.8 0 0 0 .15-.133c.028-.037.073-.116.1-.174.026-.058.054-.16.065-.229a1.895 1.895 0 0 0-.042-.589 2 2 0 0 0-.074-.193c-.023-.053-.355-.542-.736-1.085-.38-.543-.693-1.005-.693-1.025 0-.028.037-.046.234-.105.128-.04.339-.113.469-.162.132-.047.293-.116.36-.15a1 1 0 0 0 .204-.144.8.8 0 0 0 .144-.212c.034-.072.072-.18.085-.238s.024-.2.024-.316c0-.123-.009-.25-.024-.308a1.4 1.4 0 0 0-.072-.202c-.032-.07-.275-.39-.737-.975-.378-.479-.687-.883-.687-.9s.018-.043.04-.055.197-.11.39-.215c.194-.103.431-.237.528-.295.096-.058.22-.15.274-.204a1.1 1.1 0 0 0 .257-.459c.026-.1.031-.247.04-1.283.005-.642.016-1.178.023-1.19s.105-.069.22-.125c.112-.058.284-.15.38-.204a10 10 0 0 0 .985-.668 6.762 6.762 0 0 0 .826-.767c.107-.117.267-.305.358-.418a8 8 0 0 0 .605-.891 8.9 8.9 0 0 0 .373-.756c.045-.105.12-.308.17-.448a8 8 0 0 0 .156-.536c.037-.155.088-.408.113-.563.023-.155.05-.381.061-.505a8 8 0 0 0-.007-1.139 8 8 0 0 0-.07-.527 8 8 0 0 0-.097-.466c-.028-.116-.08-.3-.116-.413a7 7 0 0 0-.83-1.714 10 10 0 0 0-.256-.37 9 9 0 0 0-.23-.29 9 9 0 0 0-.81-.82 9 9 0 0 0-.395-.32 9 9 0 0 0-.835-.556 13 13 0 0 0-.417-.221 11 11 0 0 0-.483-.223 8 8 0 0 0-.98-.343 11 11 0 0 0-.422-.108c-.106-.022-.288-.06-.404-.079a10 10 0 0 0-.51-.073 8 8 0 0 0-.852-.043c-.304-.001-.644.002-.756.011m.207 3.334-.058.006a4.6 4.6 0 0 0-1.283.341 4 4 0 0 0-.334.159 4.354 4.354 0 0 0-.668.452 5.5 5.5 0 0 0-.669.69 5 5 0 0 0-.207.308 4 4 0 0 0-.18.325c-.04.088-.101.234-.135.325a3.856 3.856 0 0 0-.177.66c-.016.087-.034.24-.04.342-.01.159-.008.19.017.215.028.03.25.031 4.175.031 3.663 0 4.15-.003 4.174-.026q.029-.027.028-.12a3 3 0 0 0-.072-.574 3.9 3.9 0 0 0-.297-.87 4 4 0 0 0-.21-.379 6 6 0 0 0-.23-.316 6 6 0 0 0-.346-.37 5 5 0 0 0-.365-.326 7 7 0 0 0-.246-.178 5 5 0 0 0-.264-.16 4.6 4.6 0 0 0-1.585-.52 5.681 5.681 0 0 0-.84-.035z",
53
- "clip-rule": "evenodd"
58
+ clipRule: "evenodd"
54
59
  })]
55
60
  });
56
61
  var Auth = function Auth(_ref) {
@@ -58,13 +63,14 @@ var Auth = function Auth(_ref) {
58
63
  onError = _ref.onError,
59
64
  authConfig = _ref.authConfig,
60
65
  configOrder = _ref.configOrder,
66
+ emailCustomization = _ref.emailCustomization,
67
+ sendFromEmailAddress = _ref.sendFromEmailAddress,
61
68
  customSmsMessage = _ref.customSmsMessage,
62
69
  customAccounts = _ref.customAccounts;
63
70
  var _useTurnkey = useTurnkey(),
64
- passkeyClient = _useTurnkey.passkeyClient,
65
71
  authIframeClient = _useTurnkey.authIframeClient,
66
- walletClient = _useTurnkey.walletClient,
67
- turnkey = _useTurnkey.turnkey;
72
+ passkeyClient = _useTurnkey.passkeyClient,
73
+ walletClient = _useTurnkey.walletClient;
68
74
  var _useState = useState(""),
69
75
  _useState2 = _slicedToArray(_useState, 2),
70
76
  email = _useState2[0],
@@ -81,38 +87,38 @@ var Auth = function Auth(_ref) {
81
87
  _useState8 = _slicedToArray(_useState7, 2),
82
88
  step = _useState8[0],
83
89
  setStep = _useState8[1];
84
- var _useState9 = useState(""),
90
+ var _useState9 = useState(),
85
91
  _useState10 = _slicedToArray(_useState9, 2),
86
- oauthLoading = _useState10[0],
87
- setOauthLoading = _useState10[1];
92
+ loading = _useState10[0],
93
+ setLoading = _useState10[1];
88
94
  var _useState11 = useState(""),
89
95
  _useState12 = _slicedToArray(_useState11, 2),
90
- suborgId = _useState12[0],
91
- setSuborgId = _useState12[1];
92
- var _useState13 = useState(false),
96
+ oauthLoading = _useState12[0],
97
+ setOauthLoading = _useState12[1];
98
+ var _useState13 = useState(""),
93
99
  _useState14 = _slicedToArray(_useState13, 2),
94
- passkeySignupScreen = _useState14[0],
95
- setPasskeySignupScreen = _useState14[1];
100
+ suborgId = _useState14[0],
101
+ setSuborgId = _useState14[1];
96
102
  var _useState15 = useState(false),
97
103
  _useState16 = _slicedToArray(_useState15, 2),
98
- passkeyCreationScreen = _useState16[0],
99
- setPasskeyCreationScreen = _useState16[1];
100
- var _useState17 = useState(""),
104
+ passkeySignupScreen = _useState16[0],
105
+ setPasskeySignupScreen = _useState16[1];
106
+ var _useState17 = useState(false),
101
107
  _useState18 = _slicedToArray(_useState17, 2),
102
- passkeySignupError = _useState18[0],
103
- setPasskeySignupError = _useState18[1];
104
- var _useState19 = useState(true),
108
+ passkeyCreationScreen = _useState18[0],
109
+ setPasskeyCreationScreen = _useState18[1];
110
+ var _useState19 = useState(""),
105
111
  _useState20 = _slicedToArray(_useState19, 2),
106
- loading = _useState20[0],
107
- setLoading = _useState20[1];
112
+ passkeySignupError = _useState20[0],
113
+ setPasskeySignupError = _useState20[1];
108
114
  var _useState21 = useState(false),
109
115
  _useState22 = _slicedToArray(_useState21, 2),
110
- passkeyCreated = _useState22[0],
111
- setPasskeyCreated = _useState22[1];
116
+ componentReady = _useState22[0],
117
+ setComponentReady = _useState22[1];
112
118
  var _useState23 = useState(false),
113
119
  _useState24 = _slicedToArray(_useState23, 2),
114
- walletLoading = _useState24[0],
115
- setWalletLoading = _useState24[1];
120
+ passkeyCreated = _useState24[0],
121
+ setPasskeyCreated = _useState24[1];
116
122
  var handleResendCode = /*#__PURE__*/function () {
117
123
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
118
124
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -146,10 +152,10 @@ var Auth = function Auth(_ref) {
146
152
  }();
147
153
  useEffect(function () {
148
154
  if (authIframeClient) {
149
- setLoading(false);
155
+ setComponentReady(true);
150
156
  }
151
157
  }, [authIframeClient]);
152
- if (loading) {
158
+ if (!componentReady) {
153
159
  return jsx("div", {
154
160
  className: styles.defaultLoader,
155
161
  children: jsx(CircularProgress, {
@@ -167,38 +173,11 @@ var Auth = function Auth(_ref) {
167
173
  var phoneNumber = parsePhoneNumberFromString(phone);
168
174
  return (_phoneNumber$isValid = phoneNumber === null || phoneNumber === void 0 ? void 0 : phoneNumber.isValid()) !== null && _phoneNumber$isValid !== void 0 ? _phoneNumber$isValid : false;
169
175
  };
170
- var handleAuthSuccess = /*#__PURE__*/function () {
171
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(credentialBundle, expirationSeconds) {
176
+ var handleSignupWithPasskey = /*#__PURE__*/function () {
177
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
178
+ var siteInfo, _authConfig$sessionLe, _ref4, encodedChallenge, attestation, response;
172
179
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
173
180
  while (1) switch (_context2.prev = _context2.next) {
174
- case 0:
175
- if (!credentialBundle) {
176
- _context2.next = 7;
177
- break;
178
- }
179
- _context2.next = 3;
180
- return authIframeClient.injectCredentialBundle(credentialBundle);
181
- case 3:
182
- _context2.next = 5;
183
- return authIframeClient.loginWithAuthBundle(credentialBundle, expirationSeconds);
184
- case 5:
185
- _context2.next = 7;
186
- return onAuthSuccess();
187
- case 7:
188
- case "end":
189
- return _context2.stop();
190
- }
191
- }, _callee2);
192
- }));
193
- return function handleAuthSuccess(_x, _x2) {
194
- return _ref3.apply(this, arguments);
195
- };
196
- }();
197
- var handleSignupWithPasskey = /*#__PURE__*/function () {
198
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
199
- var siteInfo, _turnkey$config$defau, _ref5, encodedChallenge, attestation, response, sessionResponse, _authConfig$sessionLe;
200
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
201
- while (1) switch (_context3.prev = _context3.next) {
202
181
  case 0:
203
182
  setPasskeySignupError("");
204
183
  siteInfo = "".concat(new URL(window.location.href).hostname, " - ").concat(new Date().toLocaleString(undefined, {
@@ -211,12 +190,12 @@ var Auth = function Auth(_ref) {
211
190
  }));
212
191
  setPasskeySignupScreen(false);
213
192
  setPasskeyCreationScreen(true);
214
- _context3.prev = 4;
193
+ _context2.prev = 4;
215
194
  if (passkeyCreated) {
216
- _context3.next = 22;
195
+ _context2.next = 22;
217
196
  break;
218
197
  }
219
- _context3.next = 8;
198
+ _context2.next = 8;
220
199
  return passkeyClient === null || passkeyClient === void 0 ? void 0 : passkeyClient.createUserPasskey({
221
200
  publicKey: {
222
201
  user: {
@@ -226,21 +205,21 @@ var Auth = function Auth(_ref) {
226
205
  }
227
206
  });
228
207
  case 8:
229
- _context3.t0 = _context3.sent;
230
- if (_context3.t0) {
231
- _context3.next = 11;
208
+ _context2.t0 = _context2.sent;
209
+ if (_context2.t0) {
210
+ _context2.next = 11;
232
211
  break;
233
212
  }
234
- _context3.t0 = {};
213
+ _context2.t0 = {};
235
214
  case 11:
236
- _ref5 = _context3.t0;
237
- encodedChallenge = _ref5.encodedChallenge;
238
- attestation = _ref5.attestation;
215
+ _ref4 = _context2.t0;
216
+ encodedChallenge = _ref4.encodedChallenge;
217
+ attestation = _ref4.attestation;
239
218
  if (!(encodedChallenge && attestation)) {
240
- _context3.next = 21;
219
+ _context2.next = 21;
241
220
  break;
242
221
  }
243
- _context3.next = 17;
222
+ _context2.next = 17;
244
223
  return server.createSuborg(_objectSpread2({
245
224
  email: email,
246
225
  passkey: {
@@ -252,136 +231,127 @@ var Auth = function Auth(_ref) {
252
231
  customAccounts: customAccounts
253
232
  }));
254
233
  case 17:
255
- response = _context3.sent;
234
+ response = _context2.sent;
256
235
  if (response !== null && response !== void 0 && response.subOrganizationId) {
257
236
  setPasskeyCreated(true);
258
237
  }
259
- _context3.next = 22;
238
+ _context2.next = 22;
260
239
  break;
261
240
  case 21:
262
241
  case 22:
263
- _context3.next = 24;
264
- return passkeyClient === null || passkeyClient === void 0 ? void 0 : passkeyClient.createReadWriteSession(_objectSpread2(_objectSpread2({
265
- targetPublicKey: authIframeClient === null || authIframeClient === void 0 ? void 0 : authIframeClient.iframePublicKey
266
- }, authConfig.sessionLengthSeconds !== undefined && {
267
- expirationSeconds: authConfig.sessionLengthSeconds.toString()
268
- }), {}, {
269
- organizationId: (_turnkey$config$defau = turnkey === null || turnkey === void 0 ? void 0 : turnkey.config.defaultOrganizationId) !== null && _turnkey$config$defau !== void 0 ? _turnkey$config$defau : process.env.NEXT_PUBLIC_ORGANIZATION_ID
270
- }));
242
+ _context2.next = 24;
243
+ return passkeyClient === null || passkeyClient === void 0 ? void 0 : passkeyClient.loginWithPasskey({
244
+ sessionType: SessionType.READ_WRITE,
245
+ iframeClient: authIframeClient,
246
+ targetPublicKey: authIframeClient === null || authIframeClient === void 0 ? void 0 : authIframeClient.iframePublicKey,
247
+ expirationSeconds: (_authConfig$sessionLe = authConfig.sessionLengthSeconds) === null || _authConfig$sessionLe === void 0 ? void 0 : _authConfig$sessionLe.toString()
248
+ });
271
249
  case 24:
272
- sessionResponse = _context3.sent;
273
- if (!(sessionResponse !== null && sessionResponse !== void 0 && sessionResponse.credentialBundle)) {
274
- _context3.next = 30;
275
- break;
276
- }
277
- _context3.next = 28;
278
- return handleAuthSuccess(sessionResponse.credentialBundle, (_authConfig$sessionLe = authConfig.sessionLengthSeconds) === null || _authConfig$sessionLe === void 0 ? void 0 : _authConfig$sessionLe.toString());
279
- case 28:
280
- _context3.next = 31;
281
- break;
282
- case 30:
283
- setPasskeySignupError(authErrors.passkey.loginFailed);
284
- case 31:
285
- _context3.next = 36;
250
+ _context2.next = 26;
251
+ return onAuthSuccess();
252
+ case 26:
253
+ _context2.next = 32;
286
254
  break;
287
- case 33:
288
- _context3.prev = 33;
289
- _context3.t1 = _context3["catch"](4);
255
+ case 28:
256
+ _context2.prev = 28;
257
+ _context2.t1 = _context2["catch"](4);
290
258
  setPasskeySignupError(authErrors.passkey.timeoutOrNotAllowed);
291
- case 36:
259
+ console.error("Error during passkey signup: ", _context2.t1);
260
+ case 32:
292
261
  case "end":
293
- return _context3.stop();
262
+ return _context2.stop();
294
263
  }
295
- }, _callee3, null, [[4, 33]]);
264
+ }, _callee2, null, [[4, 28]]);
296
265
  }));
297
266
  return function handleSignupWithPasskey() {
298
- return _ref4.apply(this, arguments);
267
+ return _ref3.apply(this, arguments);
299
268
  };
300
269
  }();
301
270
  var handleLoginWithPasskey = /*#__PURE__*/function () {
302
- var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
303
- var _turnkey$config$defau2, sessionResponse, _authConfig$sessionLe2;
304
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
305
- while (1) switch (_context4.prev = _context4.next) {
271
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
272
+ var _authConfig$sessionLe2;
273
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
274
+ while (1) switch (_context3.prev = _context3.next) {
306
275
  case 0:
307
- _context4.prev = 0;
308
- _context4.next = 3;
309
- return passkeyClient === null || passkeyClient === void 0 ? void 0 : passkeyClient.createReadWriteSession(_objectSpread2(_objectSpread2({
310
- targetPublicKey: authIframeClient === null || authIframeClient === void 0 ? void 0 : authIframeClient.iframePublicKey
311
- }, authConfig.sessionLengthSeconds !== undefined && {
312
- expirationSeconds: authConfig.sessionLengthSeconds.toString()
313
- }), {}, {
314
- organizationId: (_turnkey$config$defau2 = turnkey === null || turnkey === void 0 ? void 0 : turnkey.config.defaultOrganizationId) !== null && _turnkey$config$defau2 !== void 0 ? _turnkey$config$defau2 : process.env.NEXT_PUBLIC_ORGANIZATION_ID
315
- }));
316
- case 3:
317
- sessionResponse = _context4.sent;
318
- if (!(sessionResponse !== null && sessionResponse !== void 0 && sessionResponse.credentialBundle)) {
319
- _context4.next = 9;
320
- break;
321
- }
322
- _context4.next = 7;
323
- return handleAuthSuccess(sessionResponse.credentialBundle, (_authConfig$sessionLe2 = authConfig.sessionLengthSeconds) === null || _authConfig$sessionLe2 === void 0 ? void 0 : _authConfig$sessionLe2.toString());
324
- case 7:
325
- _context4.next = 10;
326
- break;
327
- case 9:
328
- case 10:
329
- _context4.next = 15;
276
+ _context3.prev = 0;
277
+ setLoading("passkey");
278
+ _context3.next = 4;
279
+ return passkeyClient === null || passkeyClient === void 0 ? void 0 : passkeyClient.loginWithPasskey({
280
+ sessionType: SessionType.READ_WRITE,
281
+ iframeClient: authIframeClient,
282
+ targetPublicKey: authIframeClient === null || authIframeClient === void 0 ? void 0 : authIframeClient.iframePublicKey,
283
+ expirationSeconds: (_authConfig$sessionLe2 = authConfig.sessionLengthSeconds) === null || _authConfig$sessionLe2 === void 0 ? void 0 : _authConfig$sessionLe2.toString()
284
+ });
285
+ case 4:
286
+ _context3.next = 6;
287
+ return onAuthSuccess();
288
+ case 6:
289
+ _context3.next = 12;
330
290
  break;
331
- case 12:
332
- _context4.prev = 12;
333
- _context4.t0 = _context4["catch"](0);
291
+ case 8:
292
+ _context3.prev = 8;
293
+ _context3.t0 = _context3["catch"](0);
334
294
  onError(authErrors.passkey.loginFailed);
295
+ console.error("Error during passkey login: ", _context3.t0);
296
+ case 12:
297
+ _context3.prev = 12;
298
+ setLoading(undefined);
299
+ return _context3.finish(12);
335
300
  case 15:
336
301
  case "end":
337
- return _context4.stop();
302
+ return _context3.stop();
338
303
  }
339
- }, _callee4, null, [[0, 12]]);
304
+ }, _callee3, null, [[0, 8, 12, 15]]);
340
305
  }));
341
306
  return function handleLoginWithPasskey() {
342
- return _ref6.apply(this, arguments);
307
+ return _ref5.apply(this, arguments);
343
308
  };
344
309
  }();
345
310
  var handleOtpLogin = /*#__PURE__*/function () {
346
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(type, value, otpType) {
311
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(type, value, otpType) {
347
312
  var createSuborgData, resp, suborgIds, suborgId, initAuthResponse;
348
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
349
- while (1) switch (_context5.prev = _context5.next) {
313
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
314
+ while (1) switch (_context4.prev = _context4.next) {
350
315
  case 0:
316
+ setLoading(otpType);
351
317
  createSuborgData = {};
352
318
  if (type === FilterType.Email) createSuborgData.email = value;else if (type === FilterType.PhoneNumber) createSuborgData.phoneNumber = value;
353
319
  if (customAccounts) {
354
320
  createSuborgData.customAccounts = customAccounts;
355
321
  }
356
- _context5.next = 5;
322
+ _context4.next = 6;
357
323
  return server.getOrCreateSuborg({
358
324
  filterType: type,
359
325
  filterValue: value,
360
326
  additionalData: createSuborgData
361
327
  });
362
- case 5:
363
- resp = _context5.sent;
328
+ case 6:
329
+ resp = _context4.sent;
364
330
  suborgIds = resp === null || resp === void 0 ? void 0 : resp.subOrganizationIds;
365
331
  if (!(!suborgIds || suborgIds.length === 0)) {
366
- _context5.next = 10;
332
+ _context4.next = 11;
367
333
  break;
368
334
  }
369
335
  onError(authErrors.otp.sendFailed);
370
- return _context5.abrupt("return");
371
- case 10:
336
+ return _context4.abrupt("return");
337
+ case 11:
372
338
  suborgId = suborgIds[0];
373
- _context5.next = 13;
374
- return server.sendOtp(_objectSpread2(_objectSpread2({
339
+ _context4.next = 14;
340
+ return server.sendOtp(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
375
341
  suborgID: suborgId,
376
342
  otpType: otpType,
377
343
  contact: value
378
- }, customSmsMessage && {
344
+ }, emailCustomization && {
345
+ emailCustomization: emailCustomization
346
+ }), sendFromEmailAddress && {
347
+ sendFromEmailAddress: sendFromEmailAddress
348
+ }), customSmsMessage && {
379
349
  customSmsMessage: customSmsMessage
380
350
  }), {}, {
381
351
  userIdentifier: authIframeClient === null || authIframeClient === void 0 ? void 0 : authIframeClient.iframePublicKey
382
352
  }));
383
- case 13:
384
- initAuthResponse = _context5.sent;
353
+ case 14:
354
+ initAuthResponse = _context4.sent;
385
355
  if (initAuthResponse && initAuthResponse.otpId) {
386
356
  setSuborgId(suborgId);
387
357
  setOtpId(initAuthResponse === null || initAuthResponse === void 0 ? void 0 : initAuthResponse.otpId);
@@ -389,21 +359,22 @@ var Auth = function Auth(_ref) {
389
359
  } else {
390
360
  onError(authErrors.otp.sendFailed);
391
361
  }
392
- case 15:
362
+ setLoading(undefined);
363
+ case 17:
393
364
  case "end":
394
- return _context5.stop();
365
+ return _context4.stop();
395
366
  }
396
- }, _callee5);
367
+ }, _callee4);
397
368
  }));
398
- return function handleOtpLogin(_x3, _x4, _x5) {
399
- return _ref7.apply(this, arguments);
369
+ return function handleOtpLogin(_x, _x2, _x3) {
370
+ return _ref6.apply(this, arguments);
400
371
  };
401
372
  }();
402
373
  var handleOAuthLogin = /*#__PURE__*/function () {
403
- var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(credential, providerName) {
404
- var createSuborgData, resp, suborgIds, suborgId, oauthResponse, _authConfig$sessionLe3;
405
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
406
- while (1) switch (_context6.prev = _context6.next) {
374
+ var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(credential, providerName) {
375
+ var createSuborgData, resp, suborgIds, suborgId, oauthSession;
376
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
377
+ while (1) switch (_context5.prev = _context5.next) {
407
378
  case 0:
408
379
  setOauthLoading(providerName);
409
380
  createSuborgData = {
@@ -415,24 +386,24 @@ var Auth = function Auth(_ref) {
415
386
  if (customAccounts) {
416
387
  createSuborgData.customAccounts = customAccounts;
417
388
  }
418
- _context6.next = 5;
389
+ _context5.next = 5;
419
390
  return server.getOrCreateSuborg({
420
391
  filterType: FilterType.OidcToken,
421
392
  filterValue: credential,
422
393
  additionalData: createSuborgData
423
394
  });
424
395
  case 5:
425
- resp = _context6.sent;
396
+ resp = _context5.sent;
426
397
  suborgIds = resp === null || resp === void 0 ? void 0 : resp.subOrganizationIds;
427
398
  if (!(!suborgIds || suborgIds.length === 0)) {
428
- _context6.next = 10;
399
+ _context5.next = 10;
429
400
  break;
430
401
  }
431
402
  onError(authErrors.oauth.loginFailed);
432
- return _context6.abrupt("return");
403
+ return _context5.abrupt("return");
433
404
  case 10:
434
405
  suborgId = suborgIds[0];
435
- _context6.next = 13;
406
+ _context5.next = 13;
436
407
  return server.oauth({
437
408
  suborgID: suborgId,
438
409
  oidcToken: credential,
@@ -440,54 +411,57 @@ var Auth = function Auth(_ref) {
440
411
  sessionLengthSeconds: authConfig.sessionLengthSeconds
441
412
  });
442
413
  case 13:
443
- oauthResponse = _context6.sent;
444
- if (!(oauthResponse && oauthResponse.token)) {
445
- _context6.next = 19;
414
+ oauthSession = _context5.sent;
415
+ if (!(oauthSession && oauthSession.token)) {
416
+ _context5.next = 21;
446
417
  break;
447
418
  }
448
- _context6.next = 17;
449
- return handleAuthSuccess(oauthResponse.token, (_authConfig$sessionLe3 = authConfig.sessionLengthSeconds) === null || _authConfig$sessionLe3 === void 0 ? void 0 : _authConfig$sessionLe3.toString());
419
+ _context5.next = 17;
420
+ return authIframeClient.loginWithSession(oauthSession);
450
421
  case 17:
451
- _context6.next = 20;
452
- break;
422
+ _context5.next = 19;
423
+ return onAuthSuccess();
453
424
  case 19:
425
+ _context5.next = 22;
426
+ break;
427
+ case 21:
454
428
  onError(authErrors.oauth.loginFailed);
455
- case 20:
429
+ case 22:
456
430
  case "end":
457
- return _context6.stop();
431
+ return _context5.stop();
458
432
  }
459
- }, _callee6);
433
+ }, _callee5);
460
434
  }));
461
- return function handleOAuthLogin(_x6, _x7) {
462
- return _ref8.apply(this, arguments);
435
+ return function handleOAuthLogin(_x4, _x5) {
436
+ return _ref7.apply(this, arguments);
463
437
  };
464
438
  }();
465
439
  var handleLoginWithWallet = /*#__PURE__*/function () {
466
- var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
467
- var publicKey, _walletClient$getWall, type, resp, suborgIds, _suborgId, sessionResponse, _authConfig$sessionLe4;
468
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
469
- while (1) switch (_context7.prev = _context7.next) {
440
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
441
+ var _authConfig$sessionLe3, publicKey, _walletClient$getWall, type, resp, suborgIds;
442
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
443
+ while (1) switch (_context6.prev = _context6.next) {
470
444
  case 0:
471
- setWalletLoading(true);
472
- _context7.prev = 1;
445
+ setLoading("wallet");
446
+ _context6.prev = 1;
473
447
  if (walletClient) {
474
- _context7.next = 4;
448
+ _context6.next = 4;
475
449
  break;
476
450
  }
477
451
  throw new Error("Wallet client not initialized");
478
452
  case 4:
479
- _context7.next = 6;
453
+ _context6.next = 6;
480
454
  return walletClient.getPublicKey();
481
455
  case 6:
482
- publicKey = _context7.sent;
456
+ publicKey = _context6.sent;
483
457
  if (publicKey) {
484
- _context7.next = 9;
458
+ _context6.next = 9;
485
459
  break;
486
460
  }
487
461
  throw new Error(authErrors.wallet.noPublicKey);
488
462
  case 9:
489
463
  _walletClient$getWall = walletClient.getWalletInterface(), type = _walletClient$getWall.type;
490
- _context7.next = 12;
464
+ _context6.next = 12;
491
465
  return server.getOrCreateSuborg({
492
466
  filterType: FilterType.PublicKey,
493
467
  filterValue: publicKey,
@@ -499,56 +473,45 @@ var Auth = function Auth(_ref) {
499
473
  }
500
474
  });
501
475
  case 12:
502
- resp = _context7.sent;
476
+ resp = _context6.sent;
503
477
  suborgIds = resp === null || resp === void 0 ? void 0 : resp.subOrganizationIds;
504
478
  if (!(!suborgIds || suborgIds.length === 0)) {
505
- _context7.next = 17;
479
+ _context6.next = 17;
506
480
  break;
507
481
  }
508
482
  onError(authErrors.wallet.loginFailed);
509
- return _context7.abrupt("return");
483
+ return _context6.abrupt("return");
510
484
  case 17:
511
- _suborgId = suborgIds[0];
512
- _context7.next = 20;
513
- return walletClient.createReadWriteSession(_objectSpread2(_objectSpread2({
514
- targetPublicKey: authIframeClient === null || authIframeClient === void 0 ? void 0 : authIframeClient.iframePublicKey
515
- }, _suborgId && {
516
- organizationId: _suborgId
517
- }), authConfig.sessionLengthSeconds !== undefined && {
518
- expirationSeconds: authConfig.sessionLengthSeconds.toString()
519
- }));
520
- case 20:
521
- sessionResponse = _context7.sent;
522
- if (!(sessionResponse !== null && sessionResponse !== void 0 && sessionResponse.credentialBundle)) {
523
- _context7.next = 26;
524
- break;
525
- }
526
- _context7.next = 24;
527
- return handleAuthSuccess(sessionResponse.credentialBundle, (_authConfig$sessionLe4 = authConfig.sessionLengthSeconds) === null || _authConfig$sessionLe4 === void 0 ? void 0 : _authConfig$sessionLe4.toString());
528
- case 24:
529
- _context7.next = 27;
485
+ _context6.next = 19;
486
+ return walletClient.loginWithWallet({
487
+ sessionType: SessionType.READ_WRITE,
488
+ iframeClient: authIframeClient,
489
+ targetPublicKey: authIframeClient === null || authIframeClient === void 0 ? void 0 : authIframeClient.iframePublicKey,
490
+ expirationSeconds: (_authConfig$sessionLe3 = authConfig.sessionLengthSeconds) === null || _authConfig$sessionLe3 === void 0 ? void 0 : _authConfig$sessionLe3.toString()
491
+ });
492
+ case 19:
493
+ _context6.next = 21;
494
+ return onAuthSuccess();
495
+ case 21:
496
+ _context6.next = 27;
530
497
  break;
531
- case 26:
532
- throw new Error(authErrors.wallet.loginFailed);
498
+ case 23:
499
+ _context6.prev = 23;
500
+ _context6.t0 = _context6["catch"](1);
501
+ onError(_context6.t0.message || authErrors.wallet.loginFailed);
502
+ console.error("Error during wallet login: ", _context6.t0);
533
503
  case 27:
534
- _context7.next = 32;
535
- break;
536
- case 29:
537
- _context7.prev = 29;
538
- _context7.t0 = _context7["catch"](1);
539
- onError(_context7.t0.message || authErrors.wallet.loginFailed);
540
- case 32:
541
- _context7.prev = 32;
542
- setWalletLoading(false);
543
- return _context7.finish(32);
544
- case 35:
504
+ _context6.prev = 27;
505
+ setLoading(undefined);
506
+ return _context6.finish(27);
507
+ case 30:
545
508
  case "end":
546
- return _context7.stop();
509
+ return _context6.stop();
547
510
  }
548
- }, _callee7, null, [[1, 29, 32, 35]]);
511
+ }, _callee6, null, [[1, 23, 27, 30]]);
549
512
  }));
550
513
  return function handleLoginWithWallet() {
551
- return _ref9.apply(this, arguments);
514
+ return _ref8.apply(this, arguments);
552
515
  };
553
516
  }();
554
517
  var renderBackButton = function renderBackButton() {
@@ -648,8 +611,12 @@ var Auth = function Auth(_ref) {
648
611
  }), jsx("button", {
649
612
  className: styles.authButton,
650
613
  type: "submit",
651
- disabled: !isValidEmail(email),
652
- children: "Continue"
614
+ disabled: !isValidEmail(email) || loading === OtpType.Email,
615
+ children: loading === OtpType.Email ? jsx(CircularProgress, {
616
+ size: 24,
617
+ thickness: 4,
618
+ className: styles.buttonProgress || ""
619
+ }) : "Continue"
653
620
  })]
654
621
  }) : null;
655
622
  case "phone":
@@ -669,8 +636,12 @@ var Auth = function Auth(_ref) {
669
636
  }), jsx("button", {
670
637
  className: styles.authButton,
671
638
  type: "submit",
672
- disabled: !isValidPhone(phone),
673
- children: "Continue"
639
+ disabled: !isValidPhone(phone) || loading === OtpType.Sms,
640
+ children: loading === OtpType.Sms ? jsx(CircularProgress, {
641
+ size: 24,
642
+ thickness: 4,
643
+ className: styles.buttonProgress || ""
644
+ }) : "Continue"
674
645
  })]
675
646
  }) : null;
676
647
  case "passkey":
@@ -680,7 +651,12 @@ var Auth = function Auth(_ref) {
680
651
  className: styles.authButton,
681
652
  type: "button",
682
653
  onClick: handleLoginWithPasskey,
683
- children: "Log in with passkey"
654
+ disabled: loading === "passkey",
655
+ children: loading === "passkey" ? jsx(CircularProgress, {
656
+ size: 24,
657
+ thickness: 4,
658
+ className: styles.buttonProgress || ""
659
+ }) : "Log in with passkey"
684
660
  }), jsx("div", {
685
661
  className: styles.noPasskeyLink,
686
662
  onClick: function onClick() {
@@ -696,8 +672,8 @@ var Auth = function Auth(_ref) {
696
672
  className: styles.authButton,
697
673
  type: "button",
698
674
  onClick: handleLoginWithWallet,
699
- disabled: walletLoading,
700
- children: walletLoading ? jsx(CircularProgress, {
675
+ disabled: loading === "wallet",
676
+ children: loading === "wallet" ? jsx(CircularProgress, {
701
677
  size: 24,
702
678
  thickness: 4,
703
679
  className: styles.buttonProgress || ""
@@ -822,8 +798,7 @@ var Auth = function Auth(_ref) {
822
798
  suborgId: suborgId,
823
799
  otpId: otpId,
824
800
  sessionLengthSeconds: authConfig.sessionLengthSeconds,
825
- authIframeClient: authIframeClient,
826
- onValidateSuccess: handleAuthSuccess,
801
+ onValidateSuccess: onAuthSuccess,
827
802
  onResendCode: handleResendCode
828
803
  }), !otpId && jsx("div", {
829
804
  className: styles.tos,
@@ -859,5 +834,5 @@ var Auth = function Auth(_ref) {
859
834
  });
860
835
  };
861
836
 
862
- export { Auth as default };
837
+ export { SessionType, Auth as default };
863
838
  //# sourceMappingURL=Auth.mjs.map