@better-auth-ui/react 1.6.3 → 1.6.4

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