@better-auth-ui/react 1.6.1 → 1.6.3

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 (302) hide show
  1. package/dist/components/auth/auth-provider.d.ts +4 -3
  2. package/dist/components/auth/auth-provider.js +24 -40
  3. package/dist/components/email/email-changed.d.ts +2 -2
  4. package/dist/components/email/email-changed.js +154 -68
  5. package/dist/components/email/email-localization.js +18 -23
  6. package/dist/components/email/email-styles.js +52 -77
  7. package/dist/components/email/email-verification.d.ts +2 -2
  8. package/dist/components/email/email-verification.js +138 -73
  9. package/dist/components/email/index.d.ts +9 -9
  10. package/dist/components/email/index.js +9 -9
  11. package/dist/components/email/magic-link.d.ts +2 -2
  12. package/dist/components/email/magic-link.js +139 -70
  13. package/dist/components/email/new-device.d.ts +2 -2
  14. package/dist/components/email/new-device.js +221 -88
  15. package/dist/components/email/otp-email.d.ts +2 -2
  16. package/dist/components/email/otp-email.js +127 -63
  17. package/dist/components/email/password-changed.d.ts +2 -2
  18. package/dist/components/email/password-changed.js +157 -74
  19. package/dist/components/email/reset-password.d.ts +2 -2
  20. package/dist/components/email/reset-password.js +138 -66
  21. package/dist/components/icons/apple.d.ts +1 -1
  22. package/dist/components/icons/apple.js +16 -9
  23. package/dist/components/icons/atlassian.d.ts +1 -1
  24. package/dist/components/icons/atlassian.js +38 -13
  25. package/dist/components/icons/cognito.d.ts +1 -1
  26. package/dist/components/icons/cognito.js +19 -9
  27. package/dist/components/icons/discord.d.ts +1 -1
  28. package/dist/components/icons/discord.js +16 -9
  29. package/dist/components/icons/dropbox.d.ts +1 -1
  30. package/dist/components/icons/dropbox.js +16 -9
  31. package/dist/components/icons/facebook.d.ts +1 -1
  32. package/dist/components/icons/facebook.js +19 -11
  33. package/dist/components/icons/figma.d.ts +1 -1
  34. package/dist/components/icons/figma.js +34 -12
  35. package/dist/components/icons/github.d.ts +1 -1
  36. package/dist/components/icons/github.js +16 -11
  37. package/dist/components/icons/gitlab.d.ts +1 -1
  38. package/dist/components/icons/gitlab.js +30 -9
  39. package/dist/components/icons/google.d.ts +1 -1
  40. package/dist/components/icons/google.js +39 -9
  41. package/dist/components/icons/huggingface.d.ts +1 -1
  42. package/dist/components/icons/huggingface.js +38 -9
  43. package/dist/components/icons/index.d.ts +35 -35
  44. package/dist/components/icons/index.js +35 -35
  45. package/dist/components/icons/kakao.d.ts +1 -1
  46. package/dist/components/icons/kakao.js +16 -11
  47. package/dist/components/icons/kick.d.ts +1 -1
  48. package/dist/components/icons/kick.js +20 -11
  49. package/dist/components/icons/line.d.ts +1 -1
  50. package/dist/components/icons/line.js +16 -9
  51. package/dist/components/icons/linear.d.ts +1 -1
  52. package/dist/components/icons/linear.js +16 -9
  53. package/dist/components/icons/linkedin.d.ts +1 -1
  54. package/dist/components/icons/linkedin.js +33 -9
  55. package/dist/components/icons/microsoft.d.ts +1 -1
  56. package/dist/components/icons/microsoft.js +30 -9
  57. package/dist/components/icons/naver.d.ts +1 -1
  58. package/dist/components/icons/naver.js +16 -9
  59. package/dist/components/icons/notion.d.ts +1 -1
  60. package/dist/components/icons/notion.js +16 -9
  61. package/dist/components/icons/paybin.d.ts +1 -1
  62. package/dist/components/icons/paybin.js +32 -8
  63. package/dist/components/icons/paypal.d.ts +1 -1
  64. package/dist/components/icons/paypal.js +30 -9
  65. package/dist/components/icons/polar.d.ts +1 -1
  66. package/dist/components/icons/polar.js +24 -9
  67. package/dist/components/icons/railway.d.ts +1 -1
  68. package/dist/components/icons/railway.js +16 -9
  69. package/dist/components/icons/reddit.d.ts +1 -1
  70. package/dist/components/icons/reddit.js +21 -9
  71. package/dist/components/icons/roblox.d.ts +1 -1
  72. package/dist/components/icons/roblox.js +17 -12
  73. package/dist/components/icons/salesforce.d.ts +1 -1
  74. package/dist/components/icons/salesforce.js +16 -9
  75. package/dist/components/icons/slack.d.ts +1 -1
  76. package/dist/components/icons/slack.js +30 -9
  77. package/dist/components/icons/spotify.d.ts +1 -1
  78. package/dist/components/icons/spotify.js +16 -9
  79. package/dist/components/icons/tiktok.d.ts +1 -1
  80. package/dist/components/icons/tiktok.js +23 -10
  81. package/dist/components/icons/twitch.d.ts +1 -1
  82. package/dist/components/icons/twitch.js +43 -12
  83. package/dist/components/icons/vercel.d.ts +1 -1
  84. package/dist/components/icons/vercel.js +16 -9
  85. package/dist/components/icons/vk.d.ts +1 -1
  86. package/dist/components/icons/vk.js +16 -9
  87. package/dist/components/icons/wechat.d.ts +1 -1
  88. package/dist/components/icons/wechat.js +16 -9
  89. package/dist/components/icons/x.d.ts +1 -1
  90. package/dist/components/icons/x.js +16 -9
  91. package/dist/components/icons/zoom.d.ts +1 -1
  92. package/dist/components/icons/zoom.js +69 -11
  93. package/dist/components/settings/account/theme-preview.js +286 -7
  94. package/dist/core.d.ts +1 -1
  95. package/dist/hooks/auth/use-authenticate.d.ts +30 -6
  96. package/dist/hooks/auth/use-authenticate.js +22 -27
  97. package/dist/hooks/auth/use-is-username-available.d.ts +20 -0
  98. package/dist/hooks/auth/use-is-username-available.js +13 -0
  99. package/dist/hooks/auth/use-request-password-reset.d.ts +12 -17
  100. package/dist/hooks/auth/use-request-password-reset.js +12 -13
  101. package/dist/hooks/auth/use-reset-password.d.ts +14 -31
  102. package/dist/hooks/auth/use-reset-password.js +12 -12
  103. package/dist/hooks/auth/use-send-verification-email.d.ts +11 -16
  104. package/dist/hooks/auth/use-send-verification-email.js +12 -12
  105. package/dist/hooks/auth/use-session.d.ts +31 -5
  106. package/dist/hooks/auth/use-session.js +15 -17
  107. package/dist/hooks/auth/use-sign-in-email.d.ts +12 -39
  108. package/dist/hooks/auth/use-sign-in-email.js +16 -24
  109. package/dist/hooks/auth/use-sign-in-magic-link.d.ts +15 -20
  110. package/dist/hooks/auth/use-sign-in-magic-link.js +12 -12
  111. package/dist/hooks/auth/use-sign-in-passkey.d.ts +13 -50
  112. package/dist/hooks/auth/use-sign-in-passkey.js +16 -24
  113. package/dist/hooks/auth/use-sign-in-social.d.ts +32 -62
  114. package/dist/hooks/auth/use-sign-in-social.js +12 -12
  115. package/dist/hooks/auth/use-sign-in-username.d.ts +25 -0
  116. package/dist/hooks/auth/use-sign-in-username.js +17 -0
  117. package/dist/hooks/auth/use-sign-out.d.ts +11 -12
  118. package/dist/hooks/auth/use-sign-out.js +15 -23
  119. package/dist/hooks/auth/use-sign-up-email.d.ts +178 -262
  120. package/dist/hooks/auth/use-sign-up-email.js +16 -24
  121. package/dist/hooks/auth/use-user.d.ts +63 -61
  122. package/dist/hooks/auth/use-user.js +10 -13
  123. package/dist/hooks/settings/use-account-info.d.ts +12 -12
  124. package/dist/hooks/settings/use-account-info.js +17 -24
  125. package/dist/hooks/settings/use-add-passkey.d.ts +11 -33
  126. package/dist/hooks/settings/use-add-passkey.js +16 -23
  127. package/dist/hooks/settings/use-change-email.d.ts +12 -15
  128. package/dist/hooks/settings/use-change-email.js +16 -22
  129. package/dist/hooks/settings/use-change-password.d.ts +12 -45
  130. package/dist/hooks/settings/use-change-password.js +12 -10
  131. package/dist/hooks/settings/use-delete-passkey.d.ts +11 -13
  132. package/dist/hooks/settings/use-delete-passkey.js +16 -23
  133. package/dist/hooks/settings/use-delete-user.d.ts +14 -32
  134. package/dist/hooks/settings/use-delete-user.js +12 -10
  135. package/dist/hooks/settings/use-link-social.d.ts +23 -26
  136. package/dist/hooks/settings/use-link-social.js +12 -9
  137. package/dist/hooks/settings/use-list-accounts.d.ts +10 -8
  138. package/dist/hooks/settings/use-list-accounts.js +14 -22
  139. package/dist/hooks/settings/use-list-device-sessions.d.ts +30 -7
  140. package/dist/hooks/settings/use-list-device-sessions.js +14 -21
  141. package/dist/hooks/settings/use-list-sessions.d.ts +10 -7
  142. package/dist/hooks/settings/use-list-sessions.js +14 -21
  143. package/dist/hooks/settings/use-list-user-passkeys.d.ts +9 -6
  144. package/dist/hooks/settings/use-list-user-passkeys.js +14 -21
  145. package/dist/hooks/settings/use-revoke-multi-session.d.ts +12 -12
  146. package/dist/hooks/settings/use-revoke-multi-session.js +16 -19
  147. package/dist/hooks/settings/use-revoke-session.d.ts +12 -12
  148. package/dist/hooks/settings/use-revoke-session.js +16 -20
  149. package/dist/hooks/settings/use-set-active-session.d.ts +13 -30
  150. package/dist/hooks/settings/use-set-active-session.js +19 -27
  151. package/dist/hooks/settings/use-unlink-account.d.ts +13 -13
  152. package/dist/hooks/settings/use-unlink-account.js +16 -20
  153. package/dist/hooks/settings/use-update-user.d.ts +1179 -5
  154. package/dist/hooks/settings/use-update-user.js +23 -28
  155. package/dist/hooks/use-auth-mutation.d.ts +12 -0
  156. package/dist/hooks/use-auth-mutation.js +11 -0
  157. package/dist/hooks/use-auth-query.d.ts +14 -0
  158. package/dist/hooks/use-auth-query.js +15 -0
  159. package/dist/index.d.ts +40 -36
  160. package/dist/index.js +84 -36
  161. package/dist/lib/auth-client.d.ts +1254 -1254
  162. package/dist/lib/auth-client.js +11 -11
  163. package/dist/lib/auth-config.d.ts +3 -3
  164. package/dist/lib/auth-context.d.ts +2 -2
  165. package/dist/lib/auth-context.js +5 -2
  166. package/dist/lib/provider-icons.d.ts +2 -2
  167. package/dist/lib/provider-icons.js +75 -47
  168. package/dist/lib/utils.d.ts +1 -1
  169. package/dist/lib/utils.js +7 -4
  170. package/dist/mutations/auth/is-username-available-options.d.ts +19 -0
  171. package/dist/mutations/auth/is-username-available-options.js +7 -0
  172. package/dist/mutations/auth/request-password-reset-options.d.ts +15 -0
  173. package/dist/mutations/auth/request-password-reset-options.js +7 -0
  174. package/dist/mutations/auth/reset-password-options.d.ts +17 -0
  175. package/dist/mutations/auth/reset-password-options.js +7 -0
  176. package/dist/mutations/auth/send-verification-email-options.d.ts +15 -0
  177. package/dist/mutations/auth/send-verification-email-options.js +7 -0
  178. package/dist/mutations/auth/sign-in-email-options.d.ts +23 -0
  179. package/dist/mutations/auth/sign-in-email-options.js +11 -0
  180. package/dist/mutations/auth/sign-in-magic-link-options.d.ts +23 -0
  181. package/dist/mutations/auth/sign-in-magic-link-options.js +11 -0
  182. package/dist/mutations/auth/sign-in-passkey-options.d.ts +15 -0
  183. package/dist/mutations/auth/sign-in-passkey-options.js +11 -0
  184. package/dist/mutations/auth/sign-in-social-options.d.ts +61 -0
  185. package/dist/mutations/auth/sign-in-social-options.js +11 -0
  186. package/dist/mutations/auth/sign-in-username-options.d.ts +19 -0
  187. package/dist/mutations/auth/sign-in-username-options.js +11 -0
  188. package/dist/mutations/auth/sign-out-options.d.ts +12 -0
  189. package/dist/mutations/auth/sign-out-options.js +7 -0
  190. package/dist/mutations/auth/sign-up-email-options.d.ts +1180 -0
  191. package/dist/mutations/auth/sign-up-email-options.js +11 -0
  192. package/dist/mutations/auth-mutation-options.d.ts +25 -0
  193. package/dist/mutations/auth-mutation-options.js +19 -0
  194. package/dist/mutations/settings/add-passkey-options.d.ts +15 -0
  195. package/dist/mutations/settings/add-passkey-options.js +11 -0
  196. package/dist/mutations/settings/change-email-options.d.ts +15 -0
  197. package/dist/mutations/settings/change-email-options.js +7 -0
  198. package/dist/mutations/settings/change-password-options.d.ts +17 -0
  199. package/dist/mutations/settings/change-password-options.js +7 -0
  200. package/dist/mutations/settings/delete-passkey-options.d.ts +13 -0
  201. package/dist/mutations/settings/delete-passkey-options.js +11 -0
  202. package/dist/mutations/settings/delete-user-options.d.ts +20 -0
  203. package/dist/mutations/settings/delete-user-options.js +7 -0
  204. package/dist/mutations/settings/link-social-options.d.ts +39 -0
  205. package/dist/mutations/settings/link-social-options.js +7 -0
  206. package/dist/mutations/settings/revoke-multi-session-options.d.ts +13 -0
  207. package/dist/mutations/settings/revoke-multi-session-options.js +11 -0
  208. package/dist/mutations/settings/revoke-session-options.d.ts +13 -0
  209. package/dist/mutations/settings/revoke-session-options.js +7 -0
  210. package/dist/mutations/settings/set-active-session-options.d.ts +13 -0
  211. package/dist/mutations/settings/set-active-session-options.js +11 -0
  212. package/dist/mutations/settings/unlink-account-options.d.ts +15 -0
  213. package/dist/mutations/settings/unlink-account-options.js +7 -0
  214. package/dist/mutations/settings/update-user-options.d.ts +1182 -0
  215. package/dist/mutations/settings/update-user-options.js +7 -0
  216. package/dist/queries/auth/session-options.d.ts +110 -0
  217. package/dist/queries/auth/session-options.js +7 -0
  218. package/dist/queries/auth-query-options.d.ts +29 -0
  219. package/dist/queries/auth-query-options.js +17 -0
  220. package/dist/queries/settings/account-info-options.d.ts +32 -0
  221. package/dist/queries/settings/account-info-options.js +12 -0
  222. package/dist/queries/settings/list-accounts-options.d.ts +53 -0
  223. package/dist/queries/settings/list-accounts-options.js +12 -0
  224. package/dist/queries/settings/list-device-sessions-options.d.ts +99 -0
  225. package/dist/queries/settings/list-device-sessions-options.js +12 -0
  226. package/dist/queries/settings/list-sessions-options.d.ts +54 -0
  227. package/dist/queries/settings/list-sessions-options.js +12 -0
  228. package/dist/queries/settings/list-user-passkeys-options.d.ts +18 -0
  229. package/dist/queries/settings/list-user-passkeys-options.js +12 -0
  230. package/package.json +11 -11
  231. package/src/components/auth/auth-provider.tsx +4 -6
  232. package/src/hooks/auth/use-authenticate.ts +8 -9
  233. package/src/hooks/auth/use-is-username-available.ts +31 -0
  234. package/src/hooks/auth/use-request-password-reset.ts +20 -11
  235. package/src/hooks/auth/use-reset-password.ts +20 -12
  236. package/src/hooks/auth/use-send-verification-email.ts +19 -11
  237. package/src/hooks/auth/use-session.ts +22 -17
  238. package/src/hooks/auth/use-sign-in-email.ts +24 -19
  239. package/src/hooks/auth/use-sign-in-magic-link.ts +19 -13
  240. package/src/hooks/auth/use-sign-in-passkey.ts +24 -18
  241. package/src/hooks/auth/use-sign-in-social.ts +19 -11
  242. package/src/hooks/auth/use-sign-in-username.ts +40 -0
  243. package/src/hooks/auth/use-sign-out.ts +20 -20
  244. package/src/hooks/auth/use-sign-up-email.ts +25 -21
  245. package/src/hooks/auth/use-user.ts +7 -9
  246. package/src/hooks/settings/use-account-info.ts +31 -21
  247. package/src/hooks/settings/use-add-passkey.ts +22 -17
  248. package/src/hooks/settings/use-change-email.ts +24 -20
  249. package/src/hooks/settings/use-change-password.ts +19 -11
  250. package/src/hooks/settings/use-delete-passkey.ts +21 -16
  251. package/src/hooks/settings/use-delete-user.ts +19 -11
  252. package/src/hooks/settings/use-link-social.ts +20 -10
  253. package/src/hooks/settings/use-list-accounts.ts +28 -16
  254. package/src/hooks/settings/use-list-device-sessions.ts +29 -22
  255. package/src/hooks/settings/use-list-sessions.ts +28 -15
  256. package/src/hooks/settings/use-list-user-passkeys.ts +28 -17
  257. package/src/hooks/settings/use-revoke-multi-session.ts +28 -19
  258. package/src/hooks/settings/use-revoke-session.ts +26 -18
  259. package/src/hooks/settings/use-set-active-session.ts +40 -28
  260. package/src/hooks/settings/use-unlink-account.ts +23 -17
  261. package/src/hooks/settings/use-update-user.ts +33 -27
  262. package/src/hooks/use-auth-mutation.ts +29 -0
  263. package/src/hooks/use-auth-query.ts +36 -0
  264. package/src/index.ts +4 -0
  265. package/src/lib/auth-config.ts +1 -1
  266. package/src/mutations/auth/is-username-available-options.ts +18 -0
  267. package/src/mutations/auth/request-password-reset-options.ts +14 -0
  268. package/src/mutations/auth/reset-password-options.ts +14 -0
  269. package/src/mutations/auth/send-verification-email-options.ts +14 -0
  270. package/src/mutations/auth/sign-in-email-options.ts +19 -0
  271. package/src/mutations/auth/sign-in-magic-link-options.ts +15 -0
  272. package/src/mutations/auth/sign-in-passkey-options.ts +15 -0
  273. package/src/mutations/auth/sign-in-social-options.ts +19 -0
  274. package/src/mutations/auth/sign-in-username-options.ts +15 -0
  275. package/src/mutations/auth/sign-out-options.ts +11 -0
  276. package/src/mutations/auth/sign-up-email-options.ts +15 -0
  277. package/src/mutations/auth-mutation-options.ts +49 -0
  278. package/src/mutations/settings/add-passkey-options.ts +15 -0
  279. package/src/mutations/settings/change-email-options.ts +11 -0
  280. package/src/mutations/settings/change-password-options.ts +14 -0
  281. package/src/mutations/settings/delete-passkey-options.ts +15 -0
  282. package/src/mutations/settings/delete-user-options.ts +11 -0
  283. package/src/mutations/settings/link-social-options.ts +11 -0
  284. package/src/mutations/settings/revoke-multi-session-options.ts +15 -0
  285. package/src/mutations/settings/revoke-session-options.ts +14 -0
  286. package/src/mutations/settings/set-active-session-options.ts +15 -0
  287. package/src/mutations/settings/unlink-account-options.ts +14 -0
  288. package/src/mutations/settings/update-user-options.ts +15 -0
  289. package/src/queries/auth/session-options.ts +18 -0
  290. package/src/queries/auth-query-options.ts +34 -0
  291. package/src/queries/settings/account-info-options.ts +25 -0
  292. package/src/queries/settings/list-accounts-options.ts +26 -0
  293. package/src/queries/settings/list-device-sessions-options.ts +24 -0
  294. package/src/queries/settings/list-sessions-options.ts +23 -0
  295. package/src/queries/settings/list-user-passkeys-options.ts +23 -0
  296. package/dist/hooks/auth/use-auth-mutation.d.ts +0 -18
  297. package/dist/hooks/auth/use-auth-mutation.js +0 -10
  298. package/dist/hooks/auth/use-auth-query.d.ts +0 -24
  299. package/dist/hooks/auth/use-auth-query.js +0 -10
  300. package/dist/lib/auth-config.js +0 -1
  301. package/src/hooks/auth/use-auth-mutation.ts +0 -56
  302. package/src/hooks/auth/use-auth-query.ts +0 -50
@@ -0,0 +1,1182 @@
1
+ import { AuthClient } from '../../lib/auth-client';
2
+ /**
3
+ * Mutation options factory for updating the authenticated user's profile.
4
+ *
5
+ * The returned `mutationKey` (`["auth", "updateUser"]`) is stable and can
6
+ * be passed to `useIsMutating` or matched inside a global `MutationCache`
7
+ * observer for toast handling.
8
+ *
9
+ * @param authClient - The Better Auth client.
10
+ */
11
+ export declare function updateUserOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<{
12
+ status: boolean;
13
+ } | null, import('better-auth/client').BetterFetchError, void | import('better-auth').Prettify<import('better-auth/client').InferUserUpdateCtx<{
14
+ plugins: ({
15
+ id: "magic-link";
16
+ version: string;
17
+ $InferServerPlugin: ReturnType<(options: import('better-auth/plugins/magic-link').MagicLinkOptions) => {
18
+ id: "magic-link";
19
+ version: string;
20
+ endpoints: {
21
+ signInMagicLink: import('better-auth').StrictEndpoint<"/sign-in/magic-link", {
22
+ method: "POST";
23
+ requireHeaders: true;
24
+ body: import('zod').ZodObject<{
25
+ email: import('zod').ZodEmail;
26
+ name: import('zod').ZodOptional<import('zod').ZodString>;
27
+ callbackURL: import('zod').ZodOptional<import('zod').ZodString>;
28
+ newUserCallbackURL: import('zod').ZodOptional<import('zod').ZodString>;
29
+ errorCallbackURL: import('zod').ZodOptional<import('zod').ZodString>;
30
+ metadata: import('zod').ZodOptional<import('zod').ZodRecord<import('zod').ZodString, import('zod').ZodAny>>;
31
+ }, import('zod/v4/core').$strip>;
32
+ metadata: {
33
+ openapi: {
34
+ operationId: string;
35
+ description: string;
36
+ responses: {
37
+ 200: {
38
+ description: string;
39
+ content: {
40
+ "application/json": {
41
+ schema: {
42
+ type: "object";
43
+ properties: {
44
+ status: {
45
+ type: string;
46
+ };
47
+ };
48
+ };
49
+ };
50
+ };
51
+ };
52
+ };
53
+ };
54
+ };
55
+ }, {
56
+ status: boolean;
57
+ }>;
58
+ magicLinkVerify: import('better-auth').StrictEndpoint<"/magic-link/verify", {
59
+ method: "GET";
60
+ query: import('zod').ZodObject<{
61
+ token: import('zod').ZodString;
62
+ callbackURL: import('zod').ZodOptional<import('zod').ZodString>;
63
+ errorCallbackURL: import('zod').ZodOptional<import('zod').ZodString>;
64
+ newUserCallbackURL: import('zod').ZodOptional<import('zod').ZodString>;
65
+ }, import('zod/v4/core').$strip>;
66
+ use: ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<void>)[];
67
+ requireHeaders: true;
68
+ metadata: {
69
+ openapi: {
70
+ operationId: string;
71
+ description: string;
72
+ responses: {
73
+ 200: {
74
+ description: string;
75
+ content: {
76
+ "application/json": {
77
+ schema: {
78
+ type: "object";
79
+ properties: {
80
+ session: {
81
+ $ref: string;
82
+ };
83
+ user: {
84
+ $ref: string;
85
+ };
86
+ };
87
+ };
88
+ };
89
+ };
90
+ };
91
+ };
92
+ };
93
+ };
94
+ }, {
95
+ token: string;
96
+ user: {
97
+ id: string;
98
+ createdAt: Date;
99
+ updatedAt: Date;
100
+ email: string;
101
+ emailVerified: boolean;
102
+ name: string;
103
+ image?: string | null | undefined;
104
+ };
105
+ session: {
106
+ id: string;
107
+ createdAt: Date;
108
+ updatedAt: Date;
109
+ userId: string;
110
+ expiresAt: Date;
111
+ token: string;
112
+ ipAddress?: string | null | undefined;
113
+ userAgent?: string | null | undefined;
114
+ };
115
+ }>;
116
+ };
117
+ rateLimit: {
118
+ pathMatcher(path: string): boolean;
119
+ window: number;
120
+ max: number;
121
+ }[];
122
+ options: import('better-auth/plugins/magic-link').MagicLinkOptions;
123
+ }>;
124
+ } | {
125
+ id: "multi-session";
126
+ version: string;
127
+ $InferServerPlugin: ReturnType<(options?: import('better-auth/plugins/multi-session').MultiSessionConfig | undefined) => {
128
+ id: "multi-session";
129
+ version: string;
130
+ endpoints: {
131
+ listDeviceSessions: import('better-auth').StrictEndpoint<"/multi-session/list-device-sessions", {
132
+ method: "GET";
133
+ requireHeaders: true;
134
+ }, {
135
+ session: {
136
+ id: string;
137
+ createdAt: Date;
138
+ updatedAt: Date;
139
+ userId: string;
140
+ expiresAt: Date;
141
+ token: string;
142
+ ipAddress?: string | null | undefined;
143
+ userAgent?: string | null | undefined;
144
+ };
145
+ user: {
146
+ id: string;
147
+ createdAt: Date;
148
+ updatedAt: Date;
149
+ email: string;
150
+ emailVerified: boolean;
151
+ name: string;
152
+ image?: string | null | undefined;
153
+ };
154
+ }[]>;
155
+ setActiveSession: import('better-auth').StrictEndpoint<"/multi-session/set-active", {
156
+ method: "POST";
157
+ body: import('zod').ZodObject<{
158
+ sessionToken: import('zod').ZodString;
159
+ }, import('zod/v4/core').$strip>;
160
+ requireHeaders: true;
161
+ metadata: {
162
+ openapi: {
163
+ description: string;
164
+ responses: {
165
+ 200: {
166
+ description: string;
167
+ content: {
168
+ "application/json": {
169
+ schema: {
170
+ type: "object";
171
+ properties: {
172
+ session: {
173
+ $ref: string;
174
+ };
175
+ };
176
+ };
177
+ };
178
+ };
179
+ };
180
+ };
181
+ };
182
+ };
183
+ }, {
184
+ session: {
185
+ id: string;
186
+ createdAt: Date;
187
+ updatedAt: Date;
188
+ userId: string;
189
+ expiresAt: Date;
190
+ token: string;
191
+ ipAddress?: string | null | undefined;
192
+ userAgent?: string | null | undefined;
193
+ } & Record<string, any>;
194
+ user: {
195
+ id: string;
196
+ createdAt: Date;
197
+ updatedAt: Date;
198
+ email: string;
199
+ emailVerified: boolean;
200
+ name: string;
201
+ image?: string | null | undefined;
202
+ } & Record<string, any>;
203
+ }>;
204
+ revokeDeviceSession: import('better-auth').StrictEndpoint<"/multi-session/revoke", {
205
+ method: "POST";
206
+ body: import('zod').ZodObject<{
207
+ sessionToken: import('zod').ZodString;
208
+ }, import('zod/v4/core').$strip>;
209
+ requireHeaders: true;
210
+ use: ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
211
+ session: {
212
+ session: Record<string, any> & {
213
+ id: string;
214
+ createdAt: Date;
215
+ updatedAt: Date;
216
+ userId: string;
217
+ expiresAt: Date;
218
+ token: string;
219
+ ipAddress?: string | null | undefined;
220
+ userAgent?: string | null | undefined;
221
+ };
222
+ user: Record<string, any> & {
223
+ id: string;
224
+ createdAt: Date;
225
+ updatedAt: Date;
226
+ email: string;
227
+ emailVerified: boolean;
228
+ name: string;
229
+ image?: string | null | undefined;
230
+ };
231
+ };
232
+ }>)[];
233
+ metadata: {
234
+ openapi: {
235
+ description: string;
236
+ responses: {
237
+ 200: {
238
+ description: string;
239
+ content: {
240
+ "application/json": {
241
+ schema: {
242
+ type: "object";
243
+ properties: {
244
+ status: {
245
+ type: string;
246
+ };
247
+ };
248
+ };
249
+ };
250
+ };
251
+ };
252
+ };
253
+ };
254
+ };
255
+ }, {
256
+ status: boolean;
257
+ }>;
258
+ };
259
+ hooks: {
260
+ after: {
261
+ matcher: (context: import('better-auth').HookEndpointContext) => boolean;
262
+ handler: (inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<void>;
263
+ }[];
264
+ };
265
+ options: import('better-auth/plugins/multi-session').MultiSessionConfig | undefined;
266
+ $ERROR_CODES: {
267
+ INVALID_SESSION_TOKEN: import('better-auth').RawError<"INVALID_SESSION_TOKEN">;
268
+ };
269
+ }>;
270
+ atomListeners: {
271
+ matcher(path: string): path is "/multi-session/set-active";
272
+ signal: "$sessionSignal";
273
+ }[];
274
+ $ERROR_CODES: {
275
+ INVALID_SESSION_TOKEN: import('better-auth').RawError<"INVALID_SESSION_TOKEN">;
276
+ };
277
+ } | {
278
+ id: "passkey";
279
+ version: string;
280
+ $InferServerPlugin: ReturnType<(options?: import('@better-auth/passkey/client').PasskeyOptions | undefined) => {
281
+ id: "passkey";
282
+ version: string;
283
+ endpoints: {
284
+ generatePasskeyRegistrationOptions: import('better-auth').StrictEndpoint<"/passkey/generate-register-options", {
285
+ method: "GET";
286
+ use: ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
287
+ session: {
288
+ session: Record<string, any> & {
289
+ id: string;
290
+ createdAt: Date;
291
+ updatedAt: Date;
292
+ userId: string;
293
+ expiresAt: Date;
294
+ token: string;
295
+ ipAddress?: string | null | undefined;
296
+ userAgent?: string | null | undefined;
297
+ };
298
+ user: Record<string, any> & {
299
+ id: string;
300
+ createdAt: Date;
301
+ updatedAt: Date;
302
+ email: string;
303
+ emailVerified: boolean;
304
+ name: string;
305
+ image?: string | null | undefined;
306
+ };
307
+ };
308
+ }>)[] | undefined;
309
+ query: import('zod').ZodOptional<import('zod').ZodObject<{
310
+ authenticatorAttachment: import('zod').ZodOptional<import('zod').ZodEnum<{
311
+ platform: "platform";
312
+ "cross-platform": "cross-platform";
313
+ }>>;
314
+ name: import('zod').ZodOptional<import('zod').ZodString>;
315
+ context: import('zod').ZodOptional<import('zod').ZodString>;
316
+ }, import('zod/v4/core').$strip>>;
317
+ metadata: {
318
+ openapi: {
319
+ operationId: string;
320
+ description: string;
321
+ responses: {
322
+ 200: {
323
+ description: string;
324
+ parameters: {
325
+ query: {
326
+ authenticatorAttachment: {
327
+ description: string;
328
+ required: boolean;
329
+ };
330
+ name: {
331
+ description: string;
332
+ required: boolean;
333
+ };
334
+ context: {
335
+ description: string;
336
+ required: boolean;
337
+ };
338
+ };
339
+ };
340
+ content: {
341
+ "application/json": {
342
+ schema: {
343
+ type: "object";
344
+ properties: {
345
+ challenge: {
346
+ type: string;
347
+ };
348
+ rp: {
349
+ type: string;
350
+ properties: {
351
+ name: {
352
+ type: string;
353
+ };
354
+ id: {
355
+ type: string;
356
+ };
357
+ };
358
+ };
359
+ user: {
360
+ type: string;
361
+ properties: {
362
+ id: {
363
+ type: string;
364
+ };
365
+ name: {
366
+ type: string;
367
+ };
368
+ displayName: {
369
+ type: string;
370
+ };
371
+ };
372
+ };
373
+ pubKeyCredParams: {
374
+ type: string;
375
+ items: {
376
+ type: string;
377
+ properties: {
378
+ type: {
379
+ type: string;
380
+ };
381
+ alg: {
382
+ type: string;
383
+ };
384
+ };
385
+ };
386
+ };
387
+ timeout: {
388
+ type: string;
389
+ };
390
+ excludeCredentials: {
391
+ type: string;
392
+ items: {
393
+ type: string;
394
+ properties: {
395
+ id: {
396
+ type: string;
397
+ };
398
+ type: {
399
+ type: string;
400
+ };
401
+ transports: {
402
+ type: string;
403
+ items: {
404
+ type: string;
405
+ };
406
+ };
407
+ };
408
+ };
409
+ };
410
+ authenticatorSelection: {
411
+ type: string;
412
+ properties: {
413
+ authenticatorAttachment: {
414
+ type: string;
415
+ };
416
+ requireResidentKey: {
417
+ type: string;
418
+ };
419
+ userVerification: {
420
+ type: string;
421
+ };
422
+ };
423
+ };
424
+ attestation: {
425
+ type: string;
426
+ };
427
+ extensions: {
428
+ type: string;
429
+ };
430
+ };
431
+ };
432
+ };
433
+ };
434
+ };
435
+ };
436
+ };
437
+ };
438
+ }, import('@better-auth/passkey/client').PublicKeyCredentialCreationOptionsJSON>;
439
+ generatePasskeyAuthenticationOptions: import('better-auth').StrictEndpoint<"/passkey/generate-authenticate-options", {
440
+ method: "GET";
441
+ metadata: {
442
+ openapi: {
443
+ operationId: string;
444
+ description: string;
445
+ responses: {
446
+ 200: {
447
+ description: string;
448
+ content: {
449
+ "application/json": {
450
+ schema: {
451
+ type: "object";
452
+ properties: {
453
+ challenge: {
454
+ type: string;
455
+ };
456
+ rp: {
457
+ type: string;
458
+ properties: {
459
+ name: {
460
+ type: string;
461
+ };
462
+ id: {
463
+ type: string;
464
+ };
465
+ };
466
+ };
467
+ user: {
468
+ type: string;
469
+ properties: {
470
+ id: {
471
+ type: string;
472
+ };
473
+ name: {
474
+ type: string;
475
+ };
476
+ displayName: {
477
+ type: string;
478
+ };
479
+ };
480
+ };
481
+ timeout: {
482
+ type: string;
483
+ };
484
+ allowCredentials: {
485
+ type: string;
486
+ items: {
487
+ type: string;
488
+ properties: {
489
+ id: {
490
+ type: string;
491
+ };
492
+ type: {
493
+ type: string;
494
+ };
495
+ transports: {
496
+ type: string;
497
+ items: {
498
+ type: string;
499
+ };
500
+ };
501
+ };
502
+ };
503
+ };
504
+ userVerification: {
505
+ type: string;
506
+ };
507
+ authenticatorSelection: {
508
+ type: string;
509
+ properties: {
510
+ authenticatorAttachment: {
511
+ type: string;
512
+ };
513
+ requireResidentKey: {
514
+ type: string;
515
+ };
516
+ userVerification: {
517
+ type: string;
518
+ };
519
+ };
520
+ };
521
+ extensions: {
522
+ type: string;
523
+ };
524
+ };
525
+ };
526
+ };
527
+ };
528
+ };
529
+ };
530
+ };
531
+ };
532
+ }, import('@better-auth/passkey/client').PublicKeyCredentialRequestOptionsJSON>;
533
+ verifyPasskeyRegistration: import('better-auth').StrictEndpoint<"/passkey/verify-registration", {
534
+ method: "POST";
535
+ body: import('zod').ZodObject<{
536
+ response: import('zod').ZodAny;
537
+ name: import('zod').ZodOptional<import('zod').ZodString>;
538
+ }, import('zod/v4/core').$strip>;
539
+ use: ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
540
+ session: {
541
+ session: Record<string, any> & {
542
+ id: string;
543
+ createdAt: Date;
544
+ updatedAt: Date;
545
+ userId: string;
546
+ expiresAt: Date;
547
+ token: string;
548
+ ipAddress?: string | null | undefined;
549
+ userAgent?: string | null | undefined;
550
+ };
551
+ user: Record<string, any> & {
552
+ id: string;
553
+ createdAt: Date;
554
+ updatedAt: Date;
555
+ email: string;
556
+ emailVerified: boolean;
557
+ name: string;
558
+ image?: string | null | undefined;
559
+ };
560
+ };
561
+ }>)[] | undefined;
562
+ metadata: {
563
+ openapi: {
564
+ operationId: string;
565
+ description: string;
566
+ responses: {
567
+ 200: {
568
+ description: string;
569
+ content: {
570
+ "application/json": {
571
+ schema: {
572
+ $ref: string;
573
+ };
574
+ };
575
+ };
576
+ };
577
+ 400: {
578
+ description: string;
579
+ };
580
+ };
581
+ };
582
+ };
583
+ }, import('@better-auth/passkey/client').Passkey>;
584
+ verifyPasskeyAuthentication: import('better-auth').StrictEndpoint<"/passkey/verify-authentication", {
585
+ method: "POST";
586
+ body: import('zod').ZodObject<{
587
+ response: import('zod').ZodRecord<import('zod').ZodAny, import('zod').ZodAny>;
588
+ }, import('zod/v4/core').$strip>;
589
+ metadata: {
590
+ openapi: {
591
+ operationId: string;
592
+ description: string;
593
+ responses: {
594
+ 200: {
595
+ description: string;
596
+ content: {
597
+ "application/json": {
598
+ schema: {
599
+ type: "object";
600
+ properties: {
601
+ session: {
602
+ $ref: string;
603
+ };
604
+ user: {
605
+ $ref: string;
606
+ };
607
+ };
608
+ };
609
+ };
610
+ };
611
+ };
612
+ };
613
+ };
614
+ $Infer: {
615
+ body: {
616
+ response: import('@better-auth/passkey/client').AuthenticationResponseJSON;
617
+ };
618
+ };
619
+ };
620
+ }, {
621
+ session: {
622
+ id: string;
623
+ createdAt: Date;
624
+ updatedAt: Date;
625
+ userId: string;
626
+ expiresAt: Date;
627
+ token: string;
628
+ ipAddress?: string | null | undefined;
629
+ userAgent?: string | null | undefined;
630
+ };
631
+ }>;
632
+ listPasskeys: import('better-auth').StrictEndpoint<"/passkey/list-user-passkeys", {
633
+ method: "GET";
634
+ use: ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
635
+ session: {
636
+ session: Record<string, any> & {
637
+ id: string;
638
+ createdAt: Date;
639
+ updatedAt: Date;
640
+ userId: string;
641
+ expiresAt: Date;
642
+ token: string;
643
+ ipAddress?: string | null | undefined;
644
+ userAgent?: string | null | undefined;
645
+ };
646
+ user: Record<string, any> & {
647
+ id: string;
648
+ createdAt: Date;
649
+ updatedAt: Date;
650
+ email: string;
651
+ emailVerified: boolean;
652
+ name: string;
653
+ image?: string | null | undefined;
654
+ };
655
+ };
656
+ }>)[];
657
+ metadata: {
658
+ openapi: {
659
+ description: string;
660
+ responses: {
661
+ "200": {
662
+ description: string;
663
+ content: {
664
+ "application/json": {
665
+ schema: {
666
+ type: "array";
667
+ items: {
668
+ $ref: string;
669
+ required: string[];
670
+ };
671
+ description: string;
672
+ };
673
+ };
674
+ };
675
+ };
676
+ };
677
+ };
678
+ };
679
+ }, import('@better-auth/passkey/client').Passkey[]>;
680
+ deletePasskey: import('better-auth').StrictEndpoint<"/passkey/delete-passkey", {
681
+ method: "POST";
682
+ body: import('zod').ZodObject<{
683
+ id: import('zod').ZodString;
684
+ }, import('zod/v4/core').$strip>;
685
+ use: (((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
686
+ session: {
687
+ session: Record<string, any> & {
688
+ id: string;
689
+ createdAt: Date;
690
+ updatedAt: Date;
691
+ userId: string;
692
+ expiresAt: Date;
693
+ token: string;
694
+ ipAddress?: string | null | undefined;
695
+ userAgent?: string | null | undefined;
696
+ };
697
+ user: Record<string, any> & {
698
+ id: string;
699
+ createdAt: Date;
700
+ updatedAt: Date;
701
+ email: string;
702
+ emailVerified: boolean;
703
+ name: string;
704
+ image?: string | null | undefined;
705
+ };
706
+ };
707
+ }>) | ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
708
+ verifiedResource: {};
709
+ }>))[];
710
+ metadata: {
711
+ openapi: {
712
+ description: string;
713
+ responses: {
714
+ "200": {
715
+ description: string;
716
+ content: {
717
+ "application/json": {
718
+ schema: {
719
+ type: "object";
720
+ properties: {
721
+ status: {
722
+ type: string;
723
+ description: string;
724
+ };
725
+ };
726
+ required: string[];
727
+ };
728
+ };
729
+ };
730
+ };
731
+ };
732
+ };
733
+ };
734
+ }, {
735
+ status: boolean;
736
+ }>;
737
+ updatePasskey: import('better-auth').StrictEndpoint<"/passkey/update-passkey", {
738
+ method: "POST";
739
+ body: import('zod').ZodObject<{
740
+ id: import('zod').ZodString;
741
+ name: import('zod').ZodString;
742
+ }, import('zod/v4/core').$strip>;
743
+ use: (((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
744
+ session: {
745
+ session: Record<string, any> & {
746
+ id: string;
747
+ createdAt: Date;
748
+ updatedAt: Date;
749
+ userId: string;
750
+ expiresAt: Date;
751
+ token: string;
752
+ ipAddress?: string | null | undefined;
753
+ userAgent?: string | null | undefined;
754
+ };
755
+ user: Record<string, any> & {
756
+ id: string;
757
+ createdAt: Date;
758
+ updatedAt: Date;
759
+ email: string;
760
+ emailVerified: boolean;
761
+ name: string;
762
+ image?: string | null | undefined;
763
+ };
764
+ };
765
+ }>) | ((inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<{
766
+ verifiedResource: {};
767
+ }>))[];
768
+ metadata: {
769
+ openapi: {
770
+ description: string;
771
+ responses: {
772
+ "200": {
773
+ description: string;
774
+ content: {
775
+ "application/json": {
776
+ schema: {
777
+ type: "object";
778
+ properties: {
779
+ passkey: {
780
+ $ref: string;
781
+ };
782
+ };
783
+ required: string[];
784
+ };
785
+ };
786
+ };
787
+ };
788
+ };
789
+ };
790
+ };
791
+ }, {
792
+ passkey: import('@better-auth/passkey/client').Passkey;
793
+ }>;
794
+ };
795
+ schema: {
796
+ passkey: {
797
+ fields: {
798
+ name: {
799
+ type: "string";
800
+ required: false;
801
+ };
802
+ publicKey: {
803
+ type: "string";
804
+ required: true;
805
+ };
806
+ userId: {
807
+ type: "string";
808
+ references: {
809
+ model: string;
810
+ field: string;
811
+ };
812
+ required: true;
813
+ index: true;
814
+ };
815
+ credentialID: {
816
+ type: "string";
817
+ required: true;
818
+ index: true;
819
+ };
820
+ counter: {
821
+ type: "number";
822
+ required: true;
823
+ };
824
+ deviceType: {
825
+ type: "string";
826
+ required: true;
827
+ };
828
+ backedUp: {
829
+ type: "boolean";
830
+ required: true;
831
+ };
832
+ transports: {
833
+ type: "string";
834
+ required: false;
835
+ };
836
+ createdAt: {
837
+ type: "date";
838
+ required: false;
839
+ };
840
+ aaguid: {
841
+ type: "string";
842
+ required: false;
843
+ };
844
+ };
845
+ };
846
+ };
847
+ $ERROR_CODES: {
848
+ CHALLENGE_NOT_FOUND: import('better-auth').RawError<"CHALLENGE_NOT_FOUND">;
849
+ YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
850
+ FAILED_TO_VERIFY_REGISTRATION: import('better-auth').RawError<"FAILED_TO_VERIFY_REGISTRATION">;
851
+ PASSKEY_NOT_FOUND: import('better-auth').RawError<"PASSKEY_NOT_FOUND">;
852
+ AUTHENTICATION_FAILED: import('better-auth').RawError<"AUTHENTICATION_FAILED">;
853
+ UNABLE_TO_CREATE_SESSION: import('better-auth').RawError<"UNABLE_TO_CREATE_SESSION">;
854
+ FAILED_TO_UPDATE_PASSKEY: import('better-auth').RawError<"FAILED_TO_UPDATE_PASSKEY">;
855
+ PREVIOUSLY_REGISTERED: import('better-auth').RawError<"PREVIOUSLY_REGISTERED">;
856
+ REGISTRATION_CANCELLED: import('better-auth').RawError<"REGISTRATION_CANCELLED">;
857
+ AUTH_CANCELLED: import('better-auth').RawError<"AUTH_CANCELLED">;
858
+ UNKNOWN_ERROR: import('better-auth').RawError<"UNKNOWN_ERROR">;
859
+ SESSION_REQUIRED: import('better-auth').RawError<"SESSION_REQUIRED">;
860
+ RESOLVE_USER_REQUIRED: import('better-auth').RawError<"RESOLVE_USER_REQUIRED">;
861
+ RESOLVED_USER_INVALID: import('better-auth').RawError<"RESOLVED_USER_INVALID">;
862
+ };
863
+ options: import('@better-auth/passkey/client').PasskeyOptions | undefined;
864
+ }>;
865
+ getActions: ($fetch: import('better-auth/client').BetterFetch, $store: import('better-auth').ClientStore) => {
866
+ signIn: {
867
+ passkey: (opts?: {
868
+ autoFill?: boolean;
869
+ extensions?: import('@better-auth/passkey/client').AuthenticationExtensionsClientInputs;
870
+ returnWebAuthnResponse?: boolean;
871
+ fetchOptions?: import('better-auth').ClientFetchOption;
872
+ } | undefined, options?: import('better-auth').ClientFetchOption | undefined) => Promise<{
873
+ data: null;
874
+ error: {
875
+ message?: string | undefined;
876
+ status: number;
877
+ statusText: string;
878
+ };
879
+ } | {
880
+ data: {
881
+ session: import('better-auth').Session;
882
+ user: import('better-auth').User;
883
+ };
884
+ error: null;
885
+ } | {
886
+ webauthn: {
887
+ response: import('@better-auth/passkey/client').AuthenticationResponseJSON;
888
+ clientExtensionResults: import('@better-auth/passkey/client').AuthenticationExtensionsClientOutputs;
889
+ };
890
+ data: null;
891
+ error: {
892
+ message?: string | undefined;
893
+ status: number;
894
+ statusText: string;
895
+ };
896
+ } | {
897
+ webauthn: {
898
+ response: import('@better-auth/passkey/client').AuthenticationResponseJSON;
899
+ clientExtensionResults: import('@better-auth/passkey/client').AuthenticationExtensionsClientOutputs;
900
+ };
901
+ data: {
902
+ session: import('better-auth').Session;
903
+ user: import('better-auth').User;
904
+ };
905
+ error: null;
906
+ } | {
907
+ data: null;
908
+ error: {
909
+ code: string;
910
+ message: string;
911
+ status: number;
912
+ statusText: string;
913
+ };
914
+ }>;
915
+ };
916
+ passkey: {
917
+ addPasskey: (opts?: {
918
+ fetchOptions?: import('better-auth').ClientFetchOption;
919
+ name?: string;
920
+ authenticatorAttachment?: "platform" | "cross-platform";
921
+ context?: string | null;
922
+ extensions?: import('@better-auth/passkey/client').AuthenticationExtensionsClientInputs;
923
+ useAutoRegister?: boolean;
924
+ returnWebAuthnResponse?: boolean;
925
+ } | undefined, fetchOpts?: import('better-auth').ClientFetchOption | undefined) => Promise<{
926
+ data: null;
927
+ error: {
928
+ message?: string | undefined;
929
+ status: number;
930
+ statusText: string;
931
+ };
932
+ } | {
933
+ data: import('@better-auth/passkey/client').Passkey;
934
+ error: null;
935
+ } | {
936
+ webauthn: {
937
+ response: import('@better-auth/passkey/client').RegistrationResponseJSON;
938
+ clientExtensionResults: import('@better-auth/passkey/client').AuthenticationExtensionsClientOutputs;
939
+ };
940
+ data: import('@better-auth/passkey/client').Passkey;
941
+ error: null;
942
+ } | {
943
+ data: null;
944
+ error: {
945
+ code: string;
946
+ message: string;
947
+ status: number;
948
+ statusText: string;
949
+ };
950
+ }>;
951
+ };
952
+ $Infer: {
953
+ Passkey: import('@better-auth/passkey/client').Passkey;
954
+ };
955
+ };
956
+ getAtoms($fetch: import('better-auth/client').BetterFetch): {
957
+ listPasskeys: import('better-auth/client').AuthQueryAtom<import('@better-auth/passkey/client').Passkey[]>;
958
+ $listPasskeys: import('better-auth/client').PreinitializedWritableAtom<any> & object;
959
+ };
960
+ pathMethods: {
961
+ "/passkey/register": "POST";
962
+ "/passkey/authenticate": "POST";
963
+ };
964
+ atomListeners: ({
965
+ matcher(path: string): path is "/passkey/delete-passkey" | "/passkey/update-passkey" | "/passkey/verify-registration" | "/sign-out";
966
+ signal: "$listPasskeys";
967
+ } | {
968
+ matcher: (path: string) => path is "/passkey/verify-authentication";
969
+ signal: "$sessionSignal";
970
+ })[];
971
+ $ERROR_CODES: {
972
+ CHALLENGE_NOT_FOUND: import('better-auth').RawError<"CHALLENGE_NOT_FOUND">;
973
+ YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import('better-auth').RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
974
+ FAILED_TO_VERIFY_REGISTRATION: import('better-auth').RawError<"FAILED_TO_VERIFY_REGISTRATION">;
975
+ PASSKEY_NOT_FOUND: import('better-auth').RawError<"PASSKEY_NOT_FOUND">;
976
+ AUTHENTICATION_FAILED: import('better-auth').RawError<"AUTHENTICATION_FAILED">;
977
+ UNABLE_TO_CREATE_SESSION: import('better-auth').RawError<"UNABLE_TO_CREATE_SESSION">;
978
+ FAILED_TO_UPDATE_PASSKEY: import('better-auth').RawError<"FAILED_TO_UPDATE_PASSKEY">;
979
+ PREVIOUSLY_REGISTERED: import('better-auth').RawError<"PREVIOUSLY_REGISTERED">;
980
+ REGISTRATION_CANCELLED: import('better-auth').RawError<"REGISTRATION_CANCELLED">;
981
+ AUTH_CANCELLED: import('better-auth').RawError<"AUTH_CANCELLED">;
982
+ UNKNOWN_ERROR: import('better-auth').RawError<"UNKNOWN_ERROR">;
983
+ SESSION_REQUIRED: import('better-auth').RawError<"SESSION_REQUIRED">;
984
+ RESOLVE_USER_REQUIRED: import('better-auth').RawError<"RESOLVE_USER_REQUIRED">;
985
+ RESOLVED_USER_INVALID: import('better-auth').RawError<"RESOLVED_USER_INVALID">;
986
+ };
987
+ } | {
988
+ id: "username";
989
+ version: string;
990
+ $InferServerPlugin: ReturnType<(options?: import('better-auth/plugins/username').UsernameOptions | undefined) => {
991
+ id: "username";
992
+ version: string;
993
+ init(ctx: import('better-auth').AuthContext): {
994
+ options: {
995
+ databaseHooks: {
996
+ user: {
997
+ create: {
998
+ before(user: {
999
+ id: string;
1000
+ createdAt: Date;
1001
+ updatedAt: Date;
1002
+ email: string;
1003
+ emailVerified: boolean;
1004
+ name: string;
1005
+ image?: string | null | undefined;
1006
+ } & Record<string, unknown>, context: import('better-auth').GenericEndpointContext | null): Promise<{
1007
+ data: {
1008
+ displayUsername?: string | undefined;
1009
+ username?: string | undefined;
1010
+ id: string;
1011
+ createdAt: Date;
1012
+ updatedAt: Date;
1013
+ email: string;
1014
+ emailVerified: boolean;
1015
+ name: string;
1016
+ image?: string | null | undefined;
1017
+ };
1018
+ }>;
1019
+ };
1020
+ update: {
1021
+ before(user: Partial<{
1022
+ id: string;
1023
+ createdAt: Date;
1024
+ updatedAt: Date;
1025
+ email: string;
1026
+ emailVerified: boolean;
1027
+ name: string;
1028
+ image?: string | null | undefined;
1029
+ }> & Record<string, unknown>, context: import('better-auth').GenericEndpointContext | null): Promise<{
1030
+ data: {
1031
+ displayUsername?: string | undefined;
1032
+ username?: string | undefined;
1033
+ id?: string | undefined;
1034
+ createdAt?: Date | undefined;
1035
+ updatedAt?: Date | undefined;
1036
+ email?: string | undefined;
1037
+ emailVerified?: boolean | undefined;
1038
+ name?: string | undefined;
1039
+ image?: string | null | undefined;
1040
+ };
1041
+ }>;
1042
+ };
1043
+ };
1044
+ };
1045
+ };
1046
+ };
1047
+ endpoints: {
1048
+ signInUsername: import('better-auth').StrictEndpoint<"/sign-in/username", {
1049
+ method: "POST";
1050
+ body: import('zod').ZodObject<{
1051
+ username: import('zod').ZodString;
1052
+ password: import('zod').ZodString;
1053
+ rememberMe: import('zod').ZodOptional<import('zod').ZodBoolean>;
1054
+ callbackURL: import('zod').ZodOptional<import('zod').ZodString>;
1055
+ }, import('zod/v4/core').$strip>;
1056
+ metadata: {
1057
+ openapi: {
1058
+ summary: string;
1059
+ description: string;
1060
+ responses: {
1061
+ 200: {
1062
+ description: string;
1063
+ content: {
1064
+ "application/json": {
1065
+ schema: {
1066
+ type: "object";
1067
+ properties: {
1068
+ token: {
1069
+ type: string;
1070
+ description: string;
1071
+ };
1072
+ user: {
1073
+ $ref: string;
1074
+ };
1075
+ };
1076
+ required: string[];
1077
+ };
1078
+ };
1079
+ };
1080
+ };
1081
+ 422: {
1082
+ description: string;
1083
+ content: {
1084
+ "application/json": {
1085
+ schema: {
1086
+ type: "object";
1087
+ properties: {
1088
+ message: {
1089
+ type: string;
1090
+ };
1091
+ };
1092
+ };
1093
+ };
1094
+ };
1095
+ };
1096
+ };
1097
+ };
1098
+ };
1099
+ }, {
1100
+ token: string;
1101
+ user: {
1102
+ id: string;
1103
+ createdAt: Date;
1104
+ updatedAt: Date;
1105
+ email: string;
1106
+ emailVerified: boolean;
1107
+ name: string;
1108
+ image?: string | null | undefined;
1109
+ } & {
1110
+ username: string;
1111
+ displayUsername: string;
1112
+ };
1113
+ }>;
1114
+ isUsernameAvailable: import('better-auth').StrictEndpoint<"/is-username-available", {
1115
+ method: "POST";
1116
+ body: import('zod').ZodObject<{
1117
+ username: import('zod').ZodString;
1118
+ }, import('zod/v4/core').$strip>;
1119
+ }, {
1120
+ available: boolean;
1121
+ }>;
1122
+ };
1123
+ schema: {
1124
+ user: {
1125
+ fields: {
1126
+ username: {
1127
+ type: "string";
1128
+ required: false;
1129
+ sortable: true;
1130
+ unique: true;
1131
+ returned: true;
1132
+ transform: {
1133
+ input(value: import('better-auth').DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
1134
+ };
1135
+ };
1136
+ displayUsername: {
1137
+ type: "string";
1138
+ required: false;
1139
+ transform: {
1140
+ input(value: import('better-auth').DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
1141
+ };
1142
+ };
1143
+ };
1144
+ };
1145
+ };
1146
+ hooks: {
1147
+ before: {
1148
+ matcher(context: import('better-auth').HookEndpointContext): boolean;
1149
+ handler: (inputContext: import('better-auth').MiddlewareInputContext<import('better-auth').MiddlewareOptions>) => Promise<void>;
1150
+ }[];
1151
+ };
1152
+ options: import('better-auth/plugins/username').UsernameOptions | undefined;
1153
+ $ERROR_CODES: {
1154
+ EMAIL_NOT_VERIFIED: import('better-auth').RawError<"EMAIL_NOT_VERIFIED">;
1155
+ UNEXPECTED_ERROR: import('better-auth').RawError<"UNEXPECTED_ERROR">;
1156
+ INVALID_USERNAME_OR_PASSWORD: import('better-auth').RawError<"INVALID_USERNAME_OR_PASSWORD">;
1157
+ USERNAME_IS_ALREADY_TAKEN: import('better-auth').RawError<"USERNAME_IS_ALREADY_TAKEN">;
1158
+ USERNAME_TOO_SHORT: import('better-auth').RawError<"USERNAME_TOO_SHORT">;
1159
+ USERNAME_TOO_LONG: import('better-auth').RawError<"USERNAME_TOO_LONG">;
1160
+ INVALID_USERNAME: import('better-auth').RawError<"INVALID_USERNAME">;
1161
+ INVALID_DISPLAY_USERNAME: import('better-auth').RawError<"INVALID_DISPLAY_USERNAME">;
1162
+ };
1163
+ }>;
1164
+ atomListeners: {
1165
+ matcher: (path: string) => path is "/sign-in/username";
1166
+ signal: "$sessionSignal";
1167
+ }[];
1168
+ $ERROR_CODES: {
1169
+ EMAIL_NOT_VERIFIED: import('better-auth').RawError<"EMAIL_NOT_VERIFIED">;
1170
+ UNEXPECTED_ERROR: import('better-auth').RawError<"UNEXPECTED_ERROR">;
1171
+ INVALID_USERNAME_OR_PASSWORD: import('better-auth').RawError<"INVALID_USERNAME_OR_PASSWORD">;
1172
+ USERNAME_IS_ALREADY_TAKEN: import('better-auth').RawError<"USERNAME_IS_ALREADY_TAKEN">;
1173
+ USERNAME_TOO_SHORT: import('better-auth').RawError<"USERNAME_TOO_SHORT">;
1174
+ USERNAME_TOO_LONG: import('better-auth').RawError<"USERNAME_TOO_LONG">;
1175
+ INVALID_USERNAME: import('better-auth').RawError<"INVALID_USERNAME">;
1176
+ INVALID_DISPLAY_USERNAME: import('better-auth').RawError<"INVALID_DISPLAY_USERNAME">;
1177
+ };
1178
+ })[];
1179
+ }, import('better-auth').ClientFetchOption<Partial<Partial<{}> & {
1180
+ name?: string | undefined;
1181
+ image?: string | undefined | null;
1182
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>>, unknown>, "mutationKey">;