@better-auth-ui/react 1.6.3 → 1.6.5

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 (355) hide show
  1. package/dist/components/auth/auth-provider.d.ts +23 -8
  2. package/dist/components/auth/auth-provider.js +35 -19
  3. package/dist/components/{email → auth/email}/email-changed.js +2 -2
  4. package/dist/components/{email → auth/email}/email-localization.js +1 -1
  5. package/dist/components/{email → auth/email}/email-styles.js +1 -1
  6. package/dist/components/{email → auth/email}/email-verification.js +2 -2
  7. package/dist/components/{email → auth/email}/magic-link.js +2 -2
  8. package/dist/components/{email → auth/email}/new-device.js +2 -2
  9. package/dist/components/{email → auth/email}/otp-email.js +2 -2
  10. package/dist/components/{email → auth/email}/password-changed.js +2 -2
  11. package/dist/components/{email → auth/email}/reset-password.js +2 -2
  12. package/dist/components/auth/fetch-options-provider.d.ts +19 -0
  13. package/dist/components/auth/fetch-options-provider.js +30 -0
  14. package/dist/email.d.ts +1 -0
  15. package/dist/email.js +11 -0
  16. package/dist/hooks/auth/use-authenticate.d.ts +5 -28
  17. package/dist/hooks/auth/use-authenticate.js +12 -12
  18. package/dist/hooks/auth/use-user.d.ts +19 -314
  19. package/dist/hooks/auth/use-user.js +5 -5
  20. package/dist/hooks/use-auth-mutation.d.ts +12 -7
  21. package/dist/hooks/use-auth-plugin.d.ts +31 -0
  22. package/dist/hooks/use-auth-plugin.js +10 -0
  23. package/dist/hooks/use-auth-query.d.ts +3 -3
  24. package/dist/index.d.ts +34 -32
  25. package/dist/index.js +75 -83
  26. package/dist/lib/auth-client.d.ts +23 -3687
  27. package/dist/lib/auth-plugin.d.ts +61 -0
  28. package/dist/lib/auth-server.d.ts +16 -0
  29. package/dist/mutations/auth/request-password-reset-mutation.d.ts +26 -0
  30. package/dist/mutations/auth/request-password-reset-mutation.js +24 -0
  31. package/dist/mutations/auth/reset-password-mutation.d.ts +25 -0
  32. package/dist/mutations/auth/reset-password-mutation.js +24 -0
  33. package/dist/mutations/auth/send-verification-email-mutation.d.ts +24 -0
  34. package/dist/mutations/auth/send-verification-email-mutation.js +24 -0
  35. package/dist/mutations/auth/sign-in-email-mutation.d.ts +71 -0
  36. package/dist/mutations/auth/sign-in-email-mutation.js +29 -0
  37. package/dist/mutations/auth/sign-in-social-mutation.d.ts +77 -0
  38. package/dist/mutations/auth/sign-in-social-mutation.js +24 -0
  39. package/dist/mutations/auth/sign-out-mutation.d.ts +25 -0
  40. package/dist/mutations/auth/sign-out-mutation.js +28 -0
  41. package/dist/mutations/auth/sign-up-email-mutation.d.ts +105 -0
  42. package/dist/mutations/auth/sign-up-email-mutation.js +29 -0
  43. package/dist/mutations/auth-mutation-options.d.ts +37 -20
  44. package/dist/mutations/auth-mutation-options.js +2 -2
  45. package/dist/mutations/magic-link/sign-in-magic-link-mutation.d.ts +24 -0
  46. package/dist/mutations/magic-link/sign-in-magic-link-mutation.js +24 -0
  47. package/dist/mutations/multi-session/revoke-multi-session-mutation.d.ts +25 -0
  48. package/dist/mutations/multi-session/revoke-multi-session-mutation.js +29 -0
  49. package/dist/mutations/multi-session/set-active-session-mutation.d.ts +62 -0
  50. package/dist/mutations/multi-session/set-active-session-mutation.js +31 -0
  51. package/dist/mutations/passkey/add-passkey-mutation.d.ts +71 -0
  52. package/dist/mutations/passkey/add-passkey-mutation.js +29 -0
  53. package/dist/mutations/passkey/delete-passkey-mutation.d.ts +25 -0
  54. package/dist/mutations/passkey/delete-passkey-mutation.js +29 -0
  55. package/dist/mutations/passkey/sign-in-passkey-mutation.d.ts +105 -0
  56. package/dist/mutations/passkey/sign-in-passkey-mutation.js +29 -0
  57. package/dist/mutations/settings/change-email-mutation.d.ts +25 -0
  58. package/dist/mutations/settings/change-email-mutation.js +29 -0
  59. package/dist/mutations/settings/change-password-mutation.d.ts +78 -0
  60. package/dist/mutations/settings/change-password-mutation.js +24 -0
  61. package/dist/mutations/settings/delete-user-mutation.d.ts +26 -0
  62. package/dist/mutations/settings/delete-user-mutation.js +24 -0
  63. package/dist/mutations/settings/link-social-mutation.d.ts +26 -0
  64. package/dist/mutations/settings/link-social-mutation.js +24 -0
  65. package/dist/mutations/settings/revoke-session-mutation.d.ts +25 -0
  66. package/dist/mutations/settings/revoke-session-mutation.js +29 -0
  67. package/dist/mutations/settings/unlink-account-mutation.d.ts +25 -0
  68. package/dist/mutations/settings/unlink-account-mutation.js +29 -0
  69. package/dist/mutations/settings/update-user-mutation.d.ts +25 -0
  70. package/dist/mutations/settings/update-user-mutation.js +35 -0
  71. package/dist/mutations/username/is-username-available-mutation.d.ts +27 -0
  72. package/dist/mutations/username/is-username-available-mutation.js +24 -0
  73. package/dist/mutations/username/sign-in-username-mutation.d.ts +75 -0
  74. package/dist/mutations/username/sign-in-username-mutation.js +29 -0
  75. package/dist/plugins/captcha-plugin.d.ts +29 -0
  76. package/dist/plugins/captcha-plugin.js +29 -0
  77. package/dist/plugins.d.ts +1 -0
  78. package/dist/plugins.js +3 -0
  79. package/dist/queries/auth/session-query.d.ts +71 -0
  80. package/dist/queries/auth/session-query.js +30 -0
  81. package/dist/queries/auth-query-options.d.ts +26 -15
  82. package/dist/queries/multi-session/list-device-sessions-query.d.ts +76 -0
  83. package/dist/queries/multi-session/list-device-sessions-query.js +31 -0
  84. package/dist/queries/passkey/list-passkeys-query.d.ts +74 -0
  85. package/dist/queries/passkey/list-passkeys-query.js +31 -0
  86. package/dist/queries/settings/account-info-query.d.ts +85 -0
  87. package/dist/queries/settings/account-info-query.js +31 -0
  88. package/dist/queries/settings/list-accounts-query.d.ts +76 -0
  89. package/dist/queries/settings/list-accounts-query.js +31 -0
  90. package/dist/queries/settings/list-sessions-query.d.ts +74 -0
  91. package/dist/queries/settings/list-sessions-query.js +31 -0
  92. package/dist/server/queries/auth/session-query.d.ts +57 -0
  93. package/dist/server/queries/auth/session-query.js +13 -0
  94. package/dist/server/queries/multi-session/list-device-sessions-query.d.ts +60 -0
  95. package/dist/server/queries/multi-session/list-device-sessions-query.js +12 -0
  96. package/dist/server/queries/passkey/list-passkeys-query.d.ts +60 -0
  97. package/dist/server/queries/passkey/list-passkeys-query.js +12 -0
  98. package/dist/server/queries/settings/account-info-query.d.ts +68 -0
  99. package/dist/server/queries/settings/account-info-query.js +12 -0
  100. package/dist/server/queries/settings/list-accounts-query.d.ts +60 -0
  101. package/dist/server/queries/settings/list-accounts-query.js +12 -0
  102. package/dist/server/queries/settings/list-sessions-query.d.ts +60 -0
  103. package/dist/server/queries/settings/list-sessions-query.js +12 -0
  104. package/dist/server.d.ts +7 -0
  105. package/dist/server.js +7 -0
  106. package/package.json +28 -22
  107. package/src/components/auth/auth-provider.tsx +88 -25
  108. package/src/components/{email → auth/email}/email-changed.tsx +1 -1
  109. package/src/components/{email → auth/email}/email-verification.tsx +1 -1
  110. package/src/components/{email → auth/email}/magic-link.tsx +1 -1
  111. package/src/components/{email → auth/email}/new-device.tsx +1 -1
  112. package/src/components/{email → auth/email}/otp-email.tsx +1 -1
  113. package/src/components/{email → auth/email}/password-changed.tsx +1 -1
  114. package/src/components/{email → auth/email}/reset-password.tsx +1 -1
  115. package/src/components/auth/fetch-options-provider.tsx +77 -0
  116. package/src/email.ts +1 -0
  117. package/src/hooks/auth/use-authenticate.ts +12 -6
  118. package/src/hooks/auth/use-user.ts +14 -9
  119. package/src/hooks/use-auth-mutation.ts +30 -12
  120. package/src/hooks/use-auth-plugin.ts +50 -0
  121. package/src/hooks/use-auth-query.ts +11 -7
  122. package/src/index.ts +34 -32
  123. package/src/lib/auth-client.ts +33 -31
  124. package/src/lib/auth-plugin.ts +77 -0
  125. package/src/lib/auth-server.ts +30 -0
  126. package/src/mutations/auth/request-password-reset-mutation.ts +58 -0
  127. package/src/mutations/auth/reset-password-mutation.ts +60 -0
  128. package/src/mutations/auth/send-verification-email-mutation.ts +58 -0
  129. package/src/mutations/auth/sign-in-email-mutation.ts +78 -0
  130. package/src/mutations/auth/sign-in-social-mutation.ts +64 -0
  131. package/src/mutations/auth/sign-out-mutation.ts +71 -0
  132. package/src/mutations/auth/sign-up-email-mutation.ts +74 -0
  133. package/src/mutations/auth-mutation-options.ts +83 -38
  134. package/src/mutations/magic-link/sign-in-magic-link-mutation.ts +59 -0
  135. package/src/mutations/multi-session/revoke-multi-session-mutation.ts +70 -0
  136. package/src/mutations/multi-session/set-active-session-mutation.ts +98 -0
  137. package/src/mutations/passkey/add-passkey-mutation.ts +66 -0
  138. package/src/mutations/passkey/delete-passkey-mutation.ts +66 -0
  139. package/src/mutations/passkey/sign-in-passkey-mutation.ts +74 -0
  140. package/src/mutations/settings/change-email-mutation.ts +67 -0
  141. package/src/mutations/settings/change-password-mutation.ts +59 -0
  142. package/src/mutations/settings/delete-user-mutation.ts +59 -0
  143. package/src/mutations/settings/link-social-mutation.ts +59 -0
  144. package/src/mutations/settings/revoke-session-mutation.ts +69 -0
  145. package/src/mutations/settings/unlink-account-mutation.ts +67 -0
  146. package/src/mutations/settings/update-user-mutation.ts +82 -0
  147. package/src/mutations/username/is-username-available-mutation.ts +62 -0
  148. package/src/mutations/username/sign-in-username-mutation.ts +74 -0
  149. package/src/plugins/captcha-plugin.tsx +75 -0
  150. package/src/plugins.ts +3 -0
  151. package/src/queries/auth/session-query.ts +135 -0
  152. package/src/queries/auth-query-options.ts +61 -12
  153. package/src/queries/multi-session/list-device-sessions-query.ts +177 -0
  154. package/src/queries/passkey/list-passkeys-query.ts +154 -0
  155. package/src/queries/settings/account-info-query.ts +158 -0
  156. package/src/queries/settings/list-accounts-query.ts +156 -0
  157. package/src/queries/settings/list-sessions-query.ts +154 -0
  158. package/src/server/queries/auth/session-query.ts +94 -0
  159. package/src/server/queries/multi-session/list-device-sessions-query.ts +102 -0
  160. package/src/server/queries/passkey/list-passkeys-query.ts +100 -0
  161. package/src/server/queries/settings/account-info-query.ts +101 -0
  162. package/src/server/queries/settings/list-accounts-query.ts +101 -0
  163. package/src/server/queries/settings/list-sessions-query.ts +101 -0
  164. package/src/server.ts +7 -0
  165. package/dist/core.d.ts +0 -1
  166. package/dist/core.js +0 -1
  167. package/dist/hooks/auth/use-is-username-available.d.ts +0 -20
  168. package/dist/hooks/auth/use-is-username-available.js +0 -13
  169. package/dist/hooks/auth/use-request-password-reset.d.ts +0 -21
  170. package/dist/hooks/auth/use-request-password-reset.js +0 -13
  171. package/dist/hooks/auth/use-reset-password.d.ts +0 -23
  172. package/dist/hooks/auth/use-reset-password.js +0 -13
  173. package/dist/hooks/auth/use-send-verification-email.d.ts +0 -19
  174. package/dist/hooks/auth/use-send-verification-email.js +0 -13
  175. package/dist/hooks/auth/use-session.d.ts +0 -35
  176. package/dist/hooks/auth/use-session.js +0 -16
  177. package/dist/hooks/auth/use-sign-in-email.d.ts +0 -26
  178. package/dist/hooks/auth/use-sign-in-email.js +0 -17
  179. package/dist/hooks/auth/use-sign-in-magic-link.d.ts +0 -27
  180. package/dist/hooks/auth/use-sign-in-magic-link.js +0 -13
  181. package/dist/hooks/auth/use-sign-in-passkey.d.ts +0 -21
  182. package/dist/hooks/auth/use-sign-in-passkey.js +0 -17
  183. package/dist/hooks/auth/use-sign-in-social.d.ts +0 -63
  184. package/dist/hooks/auth/use-sign-in-social.js +0 -13
  185. package/dist/hooks/auth/use-sign-in-username.d.ts +0 -25
  186. package/dist/hooks/auth/use-sign-in-username.js +0 -17
  187. package/dist/hooks/auth/use-sign-out.d.ts +0 -18
  188. package/dist/hooks/auth/use-sign-out.js +0 -16
  189. package/dist/hooks/auth/use-sign-up-email.d.ts +0 -1186
  190. package/dist/hooks/auth/use-sign-up-email.js +0 -17
  191. package/dist/hooks/settings/use-account-info.d.ts +0 -17
  192. package/dist/hooks/settings/use-account-info.js +0 -18
  193. package/dist/hooks/settings/use-add-passkey.d.ts +0 -21
  194. package/dist/hooks/settings/use-add-passkey.js +0 -17
  195. package/dist/hooks/settings/use-change-email.d.ts +0 -21
  196. package/dist/hooks/settings/use-change-email.js +0 -17
  197. package/dist/hooks/settings/use-change-password.d.ts +0 -21
  198. package/dist/hooks/settings/use-change-password.js +0 -13
  199. package/dist/hooks/settings/use-delete-passkey.d.ts +0 -19
  200. package/dist/hooks/settings/use-delete-passkey.js +0 -17
  201. package/dist/hooks/settings/use-delete-user.d.ts +0 -24
  202. package/dist/hooks/settings/use-delete-user.js +0 -13
  203. package/dist/hooks/settings/use-link-social.d.ts +0 -43
  204. package/dist/hooks/settings/use-link-social.js +0 -13
  205. package/dist/hooks/settings/use-list-accounts.d.ts +0 -22
  206. package/dist/hooks/settings/use-list-accounts.js +0 -15
  207. package/dist/hooks/settings/use-list-device-sessions.d.ts +0 -34
  208. package/dist/hooks/settings/use-list-device-sessions.js +0 -15
  209. package/dist/hooks/settings/use-list-sessions.d.ts +0 -23
  210. package/dist/hooks/settings/use-list-sessions.js +0 -15
  211. package/dist/hooks/settings/use-list-user-passkeys.d.ts +0 -14
  212. package/dist/hooks/settings/use-list-user-passkeys.js +0 -15
  213. package/dist/hooks/settings/use-revoke-multi-session.d.ts +0 -19
  214. package/dist/hooks/settings/use-revoke-multi-session.js +0 -17
  215. package/dist/hooks/settings/use-revoke-session.d.ts +0 -19
  216. package/dist/hooks/settings/use-revoke-session.js +0 -17
  217. package/dist/hooks/settings/use-set-active-session.d.ts +0 -20
  218. package/dist/hooks/settings/use-set-active-session.js +0 -20
  219. package/dist/hooks/settings/use-unlink-account.d.ts +0 -21
  220. package/dist/hooks/settings/use-unlink-account.js +0 -17
  221. package/dist/hooks/settings/use-update-user.d.ts +0 -1185
  222. package/dist/hooks/settings/use-update-user.js +0 -24
  223. package/dist/lib/auth-client.js +0 -11
  224. package/dist/lib/auth-config.d.ts +0 -43
  225. package/dist/lib/auth-context.d.ts +0 -2
  226. package/dist/lib/auth-context.js +0 -6
  227. package/dist/mutations/auth/is-username-available-options.d.ts +0 -19
  228. package/dist/mutations/auth/is-username-available-options.js +0 -7
  229. package/dist/mutations/auth/request-password-reset-options.d.ts +0 -15
  230. package/dist/mutations/auth/request-password-reset-options.js +0 -7
  231. package/dist/mutations/auth/reset-password-options.d.ts +0 -17
  232. package/dist/mutations/auth/reset-password-options.js +0 -7
  233. package/dist/mutations/auth/send-verification-email-options.d.ts +0 -15
  234. package/dist/mutations/auth/send-verification-email-options.js +0 -7
  235. package/dist/mutations/auth/sign-in-email-options.d.ts +0 -23
  236. package/dist/mutations/auth/sign-in-email-options.js +0 -11
  237. package/dist/mutations/auth/sign-in-magic-link-options.d.ts +0 -23
  238. package/dist/mutations/auth/sign-in-magic-link-options.js +0 -11
  239. package/dist/mutations/auth/sign-in-passkey-options.d.ts +0 -15
  240. package/dist/mutations/auth/sign-in-passkey-options.js +0 -11
  241. package/dist/mutations/auth/sign-in-social-options.d.ts +0 -61
  242. package/dist/mutations/auth/sign-in-social-options.js +0 -11
  243. package/dist/mutations/auth/sign-in-username-options.d.ts +0 -19
  244. package/dist/mutations/auth/sign-in-username-options.js +0 -11
  245. package/dist/mutations/auth/sign-out-options.d.ts +0 -12
  246. package/dist/mutations/auth/sign-out-options.js +0 -7
  247. package/dist/mutations/auth/sign-up-email-options.d.ts +0 -1180
  248. package/dist/mutations/auth/sign-up-email-options.js +0 -11
  249. package/dist/mutations/settings/add-passkey-options.d.ts +0 -15
  250. package/dist/mutations/settings/add-passkey-options.js +0 -11
  251. package/dist/mutations/settings/change-email-options.d.ts +0 -15
  252. package/dist/mutations/settings/change-email-options.js +0 -7
  253. package/dist/mutations/settings/change-password-options.d.ts +0 -17
  254. package/dist/mutations/settings/change-password-options.js +0 -7
  255. package/dist/mutations/settings/delete-passkey-options.d.ts +0 -13
  256. package/dist/mutations/settings/delete-passkey-options.js +0 -11
  257. package/dist/mutations/settings/delete-user-options.d.ts +0 -20
  258. package/dist/mutations/settings/delete-user-options.js +0 -7
  259. package/dist/mutations/settings/link-social-options.d.ts +0 -39
  260. package/dist/mutations/settings/link-social-options.js +0 -7
  261. package/dist/mutations/settings/revoke-multi-session-options.d.ts +0 -13
  262. package/dist/mutations/settings/revoke-multi-session-options.js +0 -11
  263. package/dist/mutations/settings/revoke-session-options.d.ts +0 -13
  264. package/dist/mutations/settings/revoke-session-options.js +0 -7
  265. package/dist/mutations/settings/set-active-session-options.d.ts +0 -13
  266. package/dist/mutations/settings/set-active-session-options.js +0 -11
  267. package/dist/mutations/settings/unlink-account-options.d.ts +0 -15
  268. package/dist/mutations/settings/unlink-account-options.js +0 -7
  269. package/dist/mutations/settings/update-user-options.d.ts +0 -1182
  270. package/dist/mutations/settings/update-user-options.js +0 -7
  271. package/dist/queries/auth/session-options.d.ts +0 -110
  272. package/dist/queries/auth/session-options.js +0 -7
  273. package/dist/queries/settings/account-info-options.d.ts +0 -32
  274. package/dist/queries/settings/account-info-options.js +0 -12
  275. package/dist/queries/settings/list-accounts-options.d.ts +0 -53
  276. package/dist/queries/settings/list-accounts-options.js +0 -12
  277. package/dist/queries/settings/list-device-sessions-options.d.ts +0 -99
  278. package/dist/queries/settings/list-device-sessions-options.js +0 -12
  279. package/dist/queries/settings/list-sessions-options.d.ts +0 -54
  280. package/dist/queries/settings/list-sessions-options.js +0 -12
  281. package/dist/queries/settings/list-user-passkeys-options.d.ts +0 -18
  282. package/dist/queries/settings/list-user-passkeys-options.js +0 -12
  283. package/src/core.ts +0 -1
  284. package/src/hooks/auth/use-is-username-available.ts +0 -31
  285. package/src/hooks/auth/use-request-password-reset.ts +0 -33
  286. package/src/hooks/auth/use-reset-password.ts +0 -31
  287. package/src/hooks/auth/use-send-verification-email.ts +0 -31
  288. package/src/hooks/auth/use-session.ts +0 -31
  289. package/src/hooks/auth/use-sign-in-email.ts +0 -41
  290. package/src/hooks/auth/use-sign-in-magic-link.ts +0 -29
  291. package/src/hooks/auth/use-sign-in-passkey.ts +0 -40
  292. package/src/hooks/auth/use-sign-in-social.ts +0 -31
  293. package/src/hooks/auth/use-sign-in-username.ts +0 -40
  294. package/src/hooks/auth/use-sign-out.ts +0 -34
  295. package/src/hooks/auth/use-sign-up-email.ts +0 -40
  296. package/src/hooks/settings/use-account-info.ts +0 -40
  297. package/src/hooks/settings/use-add-passkey.ts +0 -37
  298. package/src/hooks/settings/use-change-email.ts +0 -37
  299. package/src/hooks/settings/use-change-password.ts +0 -29
  300. package/src/hooks/settings/use-delete-passkey.ts +0 -37
  301. package/src/hooks/settings/use-delete-user.ts +0 -29
  302. package/src/hooks/settings/use-link-social.ts +0 -29
  303. package/src/hooks/settings/use-list-accounts.ts +0 -39
  304. package/src/hooks/settings/use-list-device-sessions.ts +0 -39
  305. package/src/hooks/settings/use-list-sessions.ts +0 -39
  306. package/src/hooks/settings/use-list-user-passkeys.ts +0 -39
  307. package/src/hooks/settings/use-revoke-multi-session.ts +0 -39
  308. package/src/hooks/settings/use-revoke-session.ts +0 -39
  309. package/src/hooks/settings/use-set-active-session.ts +0 -58
  310. package/src/hooks/settings/use-unlink-account.ts +0 -37
  311. package/src/hooks/settings/use-update-user.ts +0 -50
  312. package/src/lib/auth-config.ts +0 -48
  313. package/src/lib/auth-context.ts +0 -6
  314. package/src/mutations/auth/is-username-available-options.ts +0 -18
  315. package/src/mutations/auth/request-password-reset-options.ts +0 -14
  316. package/src/mutations/auth/reset-password-options.ts +0 -14
  317. package/src/mutations/auth/send-verification-email-options.ts +0 -14
  318. package/src/mutations/auth/sign-in-email-options.ts +0 -19
  319. package/src/mutations/auth/sign-in-magic-link-options.ts +0 -15
  320. package/src/mutations/auth/sign-in-passkey-options.ts +0 -15
  321. package/src/mutations/auth/sign-in-social-options.ts +0 -19
  322. package/src/mutations/auth/sign-in-username-options.ts +0 -15
  323. package/src/mutations/auth/sign-out-options.ts +0 -11
  324. package/src/mutations/auth/sign-up-email-options.ts +0 -15
  325. package/src/mutations/settings/add-passkey-options.ts +0 -15
  326. package/src/mutations/settings/change-email-options.ts +0 -11
  327. package/src/mutations/settings/change-password-options.ts +0 -14
  328. package/src/mutations/settings/delete-passkey-options.ts +0 -15
  329. package/src/mutations/settings/delete-user-options.ts +0 -11
  330. package/src/mutations/settings/link-social-options.ts +0 -11
  331. package/src/mutations/settings/revoke-multi-session-options.ts +0 -15
  332. package/src/mutations/settings/revoke-session-options.ts +0 -14
  333. package/src/mutations/settings/set-active-session-options.ts +0 -15
  334. package/src/mutations/settings/unlink-account-options.ts +0 -14
  335. package/src/mutations/settings/update-user-options.ts +0 -15
  336. package/src/queries/auth/session-options.ts +0 -18
  337. package/src/queries/settings/account-info-options.ts +0 -25
  338. package/src/queries/settings/list-accounts-options.ts +0 -26
  339. package/src/queries/settings/list-device-sessions-options.ts +0 -24
  340. package/src/queries/settings/list-sessions-options.ts +0 -23
  341. package/src/queries/settings/list-user-passkeys-options.ts +0 -23
  342. /package/dist/components/{email → auth/email}/email-changed.d.ts +0 -0
  343. /package/dist/components/{email → auth/email}/email-localization.d.ts +0 -0
  344. /package/dist/components/{email → auth/email}/email-styles.d.ts +0 -0
  345. /package/dist/components/{email → auth/email}/email-verification.d.ts +0 -0
  346. /package/dist/components/{email → auth/email}/index.d.ts +0 -0
  347. /package/dist/components/{email → auth/email}/index.js +0 -0
  348. /package/dist/components/{email → auth/email}/magic-link.d.ts +0 -0
  349. /package/dist/components/{email → auth/email}/new-device.d.ts +0 -0
  350. /package/dist/components/{email → auth/email}/otp-email.d.ts +0 -0
  351. /package/dist/components/{email → auth/email}/password-changed.d.ts +0 -0
  352. /package/dist/components/{email → auth/email}/reset-password.d.ts +0 -0
  353. /package/src/components/{email → auth/email}/email-localization.tsx +0 -0
  354. /package/src/components/{email → auth/email}/email-styles.tsx +0 -0
  355. /package/src/components/{email → auth/email}/index.ts +0 -0
@@ -1,1186 +0,0 @@
1
- import { AuthClient } from '../../lib/auth-client';
2
- import { signUpEmailOptions } from '../../mutations/auth/sign-up-email-options';
3
- export type UseSignUpEmailParams = NonNullable<Parameters<AuthClient["signUp"]["email"]>[0]>;
4
- export type UseSignUpEmailOptions = Omit<ReturnType<typeof signUpEmailOptions>, "mutationKey" | "mutationFn">;
5
- /**
6
- * Hook that creates a mutation for email/password sign-up.
7
- *
8
- * Resets the session query on success so the new session is refetched.
9
- *
10
- * @param options - React Query options forwarded to `useMutation`.
11
- * @returns The `useMutation` result.
12
- */
13
- export declare function useSignUpEmail(options?: UseSignUpEmailOptions): import('@tanstack/react-query').UseMutationResult<never, import('better-auth/client').BetterFetchError, import('better-auth').Prettify<import('better-auth/client').InferSignUpEmailCtx<{
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<{
1180
- name: string;
1181
- email: string;
1182
- password: string;
1183
- image?: string | undefined;
1184
- callbackURL?: string | undefined;
1185
- rememberMe?: boolean | undefined;
1186
- }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>>, unknown>;