better-auth 1.4.0-beta.3 → 1.4.0-beta.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 (262) hide show
  1. package/dist/adapters/drizzle-adapter/index.d.cts +1 -1
  2. package/dist/adapters/drizzle-adapter/index.d.mts +1 -1
  3. package/dist/adapters/drizzle-adapter/index.d.ts +1 -1
  4. package/dist/adapters/index.d.cts +2 -2
  5. package/dist/adapters/index.d.mts +2 -2
  6. package/dist/adapters/index.d.ts +2 -2
  7. package/dist/adapters/kysely-adapter/index.d.cts +1 -1
  8. package/dist/adapters/kysely-adapter/index.d.mts +1 -1
  9. package/dist/adapters/kysely-adapter/index.d.ts +1 -1
  10. package/dist/adapters/memory-adapter/index.d.cts +1 -1
  11. package/dist/adapters/memory-adapter/index.d.mts +1 -1
  12. package/dist/adapters/memory-adapter/index.d.ts +1 -1
  13. package/dist/adapters/mongodb-adapter/index.d.cts +1 -1
  14. package/dist/adapters/mongodb-adapter/index.d.mts +1 -1
  15. package/dist/adapters/mongodb-adapter/index.d.ts +1 -1
  16. package/dist/adapters/prisma-adapter/index.d.cts +1 -1
  17. package/dist/adapters/prisma-adapter/index.d.mts +1 -1
  18. package/dist/adapters/prisma-adapter/index.d.ts +1 -1
  19. package/dist/adapters/test.d.cts +1 -1
  20. package/dist/adapters/test.d.mts +1 -1
  21. package/dist/adapters/test.d.ts +1 -1
  22. package/dist/api/index.cjs +7 -6
  23. package/dist/api/index.d.cts +1 -1
  24. package/dist/api/index.d.mts +1 -1
  25. package/dist/api/index.d.ts +1 -1
  26. package/dist/api/index.mjs +9 -8
  27. package/dist/client/index.cjs +3 -3
  28. package/dist/client/index.d.cts +3 -3
  29. package/dist/client/index.d.mts +3 -3
  30. package/dist/client/index.d.ts +3 -3
  31. package/dist/client/index.mjs +3 -3
  32. package/dist/client/plugins/index.d.cts +3 -3
  33. package/dist/client/plugins/index.d.mts +3 -3
  34. package/dist/client/plugins/index.d.ts +3 -3
  35. package/dist/client/react/index.cjs +2 -2
  36. package/dist/client/react/index.d.cts +9 -9
  37. package/dist/client/react/index.d.mts +9 -9
  38. package/dist/client/react/index.d.ts +9 -9
  39. package/dist/client/react/index.mjs +2 -2
  40. package/dist/client/solid/index.cjs +2 -2
  41. package/dist/client/solid/index.d.cts +9 -9
  42. package/dist/client/solid/index.d.mts +9 -9
  43. package/dist/client/solid/index.d.ts +9 -9
  44. package/dist/client/solid/index.mjs +2 -2
  45. package/dist/client/svelte/index.cjs +2 -2
  46. package/dist/client/svelte/index.d.cts +3 -3
  47. package/dist/client/svelte/index.d.mts +3 -3
  48. package/dist/client/svelte/index.d.ts +3 -3
  49. package/dist/client/svelte/index.mjs +2 -2
  50. package/dist/client/vue/index.cjs +3 -3
  51. package/dist/client/vue/index.d.cts +3 -3
  52. package/dist/client/vue/index.d.mts +3 -3
  53. package/dist/client/vue/index.d.ts +3 -3
  54. package/dist/client/vue/index.mjs +3 -3
  55. package/dist/cookies/index.cjs +2 -2
  56. package/dist/cookies/index.d.cts +1 -1
  57. package/dist/cookies/index.d.mts +1 -1
  58. package/dist/cookies/index.d.ts +1 -1
  59. package/dist/cookies/index.mjs +2 -2
  60. package/dist/db/index.cjs +1 -1
  61. package/dist/db/index.d.cts +2 -2
  62. package/dist/db/index.d.mts +2 -2
  63. package/dist/db/index.d.ts +2 -2
  64. package/dist/db/index.mjs +1 -1
  65. package/dist/index.cjs +7 -6
  66. package/dist/index.d.cts +9 -9
  67. package/dist/index.d.mts +9 -9
  68. package/dist/index.d.ts +9 -9
  69. package/dist/index.mjs +7 -6
  70. package/dist/integrations/next-js.cjs +6 -5
  71. package/dist/integrations/next-js.d.cts +1 -1
  72. package/dist/integrations/next-js.d.mts +1 -1
  73. package/dist/integrations/next-js.d.ts +1 -1
  74. package/dist/integrations/next-js.mjs +6 -5
  75. package/dist/integrations/node.d.cts +1 -1
  76. package/dist/integrations/node.d.mts +1 -1
  77. package/dist/integrations/node.d.ts +1 -1
  78. package/dist/integrations/react-start.cjs +6 -5
  79. package/dist/integrations/react-start.d.cts +1 -1
  80. package/dist/integrations/react-start.d.mts +1 -1
  81. package/dist/integrations/react-start.d.ts +1 -1
  82. package/dist/integrations/react-start.mjs +6 -5
  83. package/dist/integrations/svelte-kit.cjs +5 -4
  84. package/dist/integrations/svelte-kit.d.cts +1 -1
  85. package/dist/integrations/svelte-kit.d.mts +1 -1
  86. package/dist/integrations/svelte-kit.d.ts +1 -1
  87. package/dist/integrations/svelte-kit.mjs +5 -4
  88. package/dist/oauth2/index.cjs +5 -4
  89. package/dist/oauth2/index.d.cts +2 -2
  90. package/dist/oauth2/index.d.mts +2 -2
  91. package/dist/oauth2/index.d.ts +2 -2
  92. package/dist/oauth2/index.mjs +5 -4
  93. package/dist/plugins/admin/index.cjs +6 -5
  94. package/dist/plugins/admin/index.d.cts +7 -6
  95. package/dist/plugins/admin/index.d.mts +7 -6
  96. package/dist/plugins/admin/index.d.ts +7 -6
  97. package/dist/plugins/admin/index.mjs +6 -5
  98. package/dist/plugins/anonymous/index.cjs +5 -4
  99. package/dist/plugins/anonymous/index.d.cts +1 -1
  100. package/dist/plugins/anonymous/index.d.mts +1 -1
  101. package/dist/plugins/anonymous/index.d.ts +1 -1
  102. package/dist/plugins/anonymous/index.mjs +5 -4
  103. package/dist/plugins/bearer/index.cjs +5 -4
  104. package/dist/plugins/bearer/index.d.cts +1 -1
  105. package/dist/plugins/bearer/index.d.mts +1 -1
  106. package/dist/plugins/bearer/index.d.ts +1 -1
  107. package/dist/plugins/bearer/index.mjs +5 -4
  108. package/dist/plugins/captcha/index.cjs +5 -4
  109. package/dist/plugins/captcha/index.d.cts +1 -1
  110. package/dist/plugins/captcha/index.d.mts +1 -1
  111. package/dist/plugins/captcha/index.d.ts +1 -1
  112. package/dist/plugins/captcha/index.mjs +5 -4
  113. package/dist/plugins/custom-session/index.cjs +11 -8
  114. package/dist/plugins/custom-session/index.d.cts +1 -1
  115. package/dist/plugins/custom-session/index.d.mts +1 -1
  116. package/dist/plugins/custom-session/index.d.ts +1 -1
  117. package/dist/plugins/custom-session/index.mjs +11 -8
  118. package/dist/plugins/device-authorization/index.cjs +52 -19
  119. package/dist/plugins/device-authorization/index.d.cts +1 -1
  120. package/dist/plugins/device-authorization/index.d.mts +1 -1
  121. package/dist/plugins/device-authorization/index.d.ts +1 -1
  122. package/dist/plugins/device-authorization/index.mjs +52 -19
  123. package/dist/plugins/email-otp/index.cjs +62 -21
  124. package/dist/plugins/email-otp/index.d.cts +1 -1
  125. package/dist/plugins/email-otp/index.d.mts +1 -1
  126. package/dist/plugins/email-otp/index.d.ts +1 -1
  127. package/dist/plugins/email-otp/index.mjs +62 -21
  128. package/dist/plugins/generic-oauth/index.cjs +44 -25
  129. package/dist/plugins/generic-oauth/index.d.cts +1 -1
  130. package/dist/plugins/generic-oauth/index.d.mts +1 -1
  131. package/dist/plugins/generic-oauth/index.d.ts +1 -1
  132. package/dist/plugins/generic-oauth/index.mjs +44 -25
  133. package/dist/plugins/haveibeenpwned/index.cjs +5 -4
  134. package/dist/plugins/haveibeenpwned/index.d.cts +1 -1
  135. package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
  136. package/dist/plugins/haveibeenpwned/index.d.ts +1 -1
  137. package/dist/plugins/haveibeenpwned/index.mjs +5 -4
  138. package/dist/plugins/index.cjs +11 -10
  139. package/dist/plugins/index.d.cts +6 -6
  140. package/dist/plugins/index.d.mts +6 -6
  141. package/dist/plugins/index.d.ts +6 -6
  142. package/dist/plugins/index.mjs +13 -12
  143. package/dist/plugins/jwt/index.cjs +5 -4
  144. package/dist/plugins/jwt/index.d.cts +1 -1
  145. package/dist/plugins/jwt/index.d.mts +1 -1
  146. package/dist/plugins/jwt/index.d.ts +1 -1
  147. package/dist/plugins/jwt/index.mjs +5 -4
  148. package/dist/plugins/magic-link/index.cjs +32 -21
  149. package/dist/plugins/magic-link/index.mjs +32 -21
  150. package/dist/plugins/multi-session/index.cjs +11 -6
  151. package/dist/plugins/multi-session/index.d.cts +1 -1
  152. package/dist/plugins/multi-session/index.d.mts +1 -1
  153. package/dist/plugins/multi-session/index.d.ts +1 -1
  154. package/dist/plugins/multi-session/index.mjs +11 -6
  155. package/dist/plugins/oauth-proxy/index.cjs +11 -6
  156. package/dist/plugins/oauth-proxy/index.d.cts +1 -1
  157. package/dist/plugins/oauth-proxy/index.d.mts +1 -1
  158. package/dist/plugins/oauth-proxy/index.d.ts +1 -1
  159. package/dist/plugins/oauth-proxy/index.mjs +11 -6
  160. package/dist/plugins/oidc-provider/index.cjs +6 -5
  161. package/dist/plugins/oidc-provider/index.d.cts +5 -5
  162. package/dist/plugins/oidc-provider/index.d.mts +5 -5
  163. package/dist/plugins/oidc-provider/index.d.ts +5 -5
  164. package/dist/plugins/oidc-provider/index.mjs +6 -5
  165. package/dist/plugins/one-tap/index.cjs +8 -7
  166. package/dist/plugins/one-tap/index.mjs +8 -7
  167. package/dist/plugins/one-time-token/index.cjs +7 -6
  168. package/dist/plugins/one-time-token/index.d.cts +1 -1
  169. package/dist/plugins/one-time-token/index.d.mts +1 -1
  170. package/dist/plugins/one-time-token/index.d.ts +1 -1
  171. package/dist/plugins/one-time-token/index.mjs +7 -6
  172. package/dist/plugins/open-api/index.cjs +5 -4
  173. package/dist/plugins/open-api/index.d.cts +1 -1
  174. package/dist/plugins/open-api/index.d.mts +1 -1
  175. package/dist/plugins/open-api/index.d.ts +1 -1
  176. package/dist/plugins/open-api/index.mjs +5 -4
  177. package/dist/plugins/organization/index.cjs +7 -6
  178. package/dist/plugins/organization/index.d.cts +9 -9
  179. package/dist/plugins/organization/index.d.mts +9 -9
  180. package/dist/plugins/organization/index.d.ts +9 -9
  181. package/dist/plugins/organization/index.mjs +7 -6
  182. package/dist/plugins/passkey/index.cjs +17 -12
  183. package/dist/plugins/passkey/index.d.cts +1 -1
  184. package/dist/plugins/passkey/index.d.mts +1 -1
  185. package/dist/plugins/passkey/index.d.ts +1 -1
  186. package/dist/plugins/passkey/index.mjs +17 -12
  187. package/dist/plugins/phone-number/index.cjs +41 -24
  188. package/dist/plugins/phone-number/index.d.cts +1 -1
  189. package/dist/plugins/phone-number/index.d.mts +1 -1
  190. package/dist/plugins/phone-number/index.d.ts +1 -1
  191. package/dist/plugins/phone-number/index.mjs +41 -24
  192. package/dist/plugins/siwe/index.cjs +5 -4
  193. package/dist/plugins/siwe/index.d.cts +1 -1
  194. package/dist/plugins/siwe/index.d.mts +1 -1
  195. package/dist/plugins/siwe/index.d.ts +1 -1
  196. package/dist/plugins/siwe/index.mjs +5 -4
  197. package/dist/plugins/sso/index.cjs +89 -62
  198. package/dist/plugins/sso/index.d.cts +3 -3
  199. package/dist/plugins/sso/index.d.mts +3 -3
  200. package/dist/plugins/sso/index.d.ts +3 -3
  201. package/dist/plugins/sso/index.mjs +89 -62
  202. package/dist/plugins/two-factor/index.cjs +50 -19
  203. package/dist/plugins/two-factor/index.d.cts +1 -1
  204. package/dist/plugins/two-factor/index.d.mts +1 -1
  205. package/dist/plugins/two-factor/index.d.ts +1 -1
  206. package/dist/plugins/two-factor/index.mjs +50 -19
  207. package/dist/plugins/username/index.cjs +18 -11
  208. package/dist/plugins/username/index.d.cts +19 -19
  209. package/dist/plugins/username/index.d.mts +19 -19
  210. package/dist/plugins/username/index.d.ts +19 -19
  211. package/dist/plugins/username/index.mjs +18 -11
  212. package/dist/shared/{better-auth.CuyhlHls.cjs → better-auth.1iHKsGdY.cjs} +2 -2
  213. package/dist/shared/{better-auth.DyZUF2_t.d.ts → better-auth.3es9ZU_K.d.ts} +36 -37
  214. package/dist/shared/{better-auth.COdnr6eY.cjs → better-auth.B2Bmtu6f.cjs} +83 -47
  215. package/dist/shared/{better-auth.T3Ux10v9.mjs → better-auth.BAPVOPl3.mjs} +3 -3
  216. package/dist/shared/{better-auth.DxV4YGX3.mjs → better-auth.BAQSo96z.mjs} +6 -4
  217. package/dist/shared/{better-auth.cXemjp2M.mjs → better-auth.BHwIy11H.mjs} +83 -47
  218. package/dist/shared/{better-auth.B1Za4fb4.d.cts → better-auth.BLDIAFp8.d.cts} +5 -5
  219. package/dist/shared/{better-auth.DHiuXI9L.d.cts → better-auth.BOKSn3AP.d.cts} +36 -37
  220. package/dist/shared/{better-auth.ZC_QEMLv.d.cts → better-auth.BW0VS3vZ.d.cts} +1 -1
  221. package/dist/shared/{better-auth.DXd8qaHd.mjs → better-auth.Bc2H_kPB.mjs} +54 -28
  222. package/dist/shared/{better-auth.DhQzyejE.mjs → better-auth.BoY6Vo7c.mjs} +1 -1
  223. package/dist/shared/{better-auth.D1jaLDAW.mjs → better-auth.C-9OPnjJ.mjs} +151 -71
  224. package/dist/shared/{better-auth.A_lT_4ey.cjs → better-auth.C0WkvM-b.cjs} +151 -71
  225. package/dist/shared/{better-auth.iE8wqp5_.cjs → better-auth.C2xLgiCv.cjs} +1 -1
  226. package/dist/shared/{better-auth.Cdkx1UlR.cjs → better-auth.C4gSFtQb.cjs} +54 -28
  227. package/dist/shared/{better-auth.D3u5pPGf.d.ts → better-auth.CAc8m5ps.d.ts} +1 -1
  228. package/dist/shared/{better-auth.BUqsHDoX.d.ts → better-auth.CBpfh9gd.d.ts} +1 -1
  229. package/dist/shared/{better-auth.BUmFH1YH.d.mts → better-auth.CHakYG_s.d.mts} +5 -5
  230. package/dist/shared/{better-auth.Co88PbP3.mjs → better-auth.CIqzVuC5.mjs} +15 -9
  231. package/dist/shared/{better-auth.DL28hkwE.mjs → better-auth.CJk6lu9H.mjs} +5 -5
  232. package/dist/shared/{better-auth.wBgaxGEw.cjs → better-auth.CWoe8tep.cjs} +15 -9
  233. package/dist/shared/{better-auth.TQtfFmwt.mjs → better-auth.Cs4ObP2J.mjs} +246 -139
  234. package/dist/shared/{better-auth.BftmE2f4.mjs → better-auth.Cw2Wb5xl.mjs} +2 -2
  235. package/dist/shared/{better-auth.BTmQo2-r.mjs → better-auth.CyhdLtgz.mjs} +122 -54
  236. package/dist/shared/{better-auth.Cn3gHKIq.d.ts → better-auth.D1mfnXw8.d.ts} +5 -5
  237. package/dist/shared/better-auth.D2xndZ2p.mjs +5 -0
  238. package/dist/shared/{better-auth.LBYUF6qL.d.mts → better-auth.D63GoHoT.d.mts} +1 -1
  239. package/dist/shared/{better-auth.DrO1u8u7.cjs → better-auth.DVpUemsq.cjs} +49 -10
  240. package/dist/shared/{better-auth.CYRK2rir.cjs → better-auth.DcLnIy5M.cjs} +122 -54
  241. package/dist/shared/{better-auth.B-RhOtHf.cjs → better-auth.Df7v65t4.cjs} +3 -3
  242. package/dist/shared/{better-auth.g25nv4YL.mjs → better-auth.DpE8ZxDZ.mjs} +49 -10
  243. package/dist/shared/{better-auth.8am3GyvS.d.cts → better-auth.DqouI_5s.d.cts} +1 -1
  244. package/dist/shared/{better-auth.DRmln2Nr.cjs → better-auth.DxBcELEX.cjs} +6 -4
  245. package/dist/shared/{better-auth.BSU7i7gN.cjs → better-auth.Fhb5xDFB.cjs} +5 -5
  246. package/dist/shared/{better-auth.CNhgW39t.cjs → better-auth.W6wY8Xk1.cjs} +246 -139
  247. package/dist/shared/{better-auth.DIfV2UBl.cjs → better-auth.oHfRlmfe.cjs} +1 -1
  248. package/dist/shared/{better-auth.C3bLnul-.mjs → better-auth.pyHheoY8.mjs} +1 -1
  249. package/dist/shared/better-auth.uykCWCYS.cjs +7 -0
  250. package/dist/shared/{better-auth.DQBMcFsm.d.mts → better-auth.vNMd9aBC.d.mts} +36 -37
  251. package/dist/shared/{better-auth.BC_XVl81.d.mts → better-auth.x83uJ-Ru.d.mts} +1 -1
  252. package/dist/social-providers/index.cjs +5 -4
  253. package/dist/social-providers/index.mjs +5 -4
  254. package/dist/test-utils/index.cjs +10 -9
  255. package/dist/test-utils/index.d.cts +59 -57
  256. package/dist/test-utils/index.d.mts +59 -57
  257. package/dist/test-utils/index.d.ts +59 -57
  258. package/dist/test-utils/index.mjs +10 -9
  259. package/dist/types/index.d.cts +2 -2
  260. package/dist/types/index.d.mts +2 -2
  261. package/dist/types/index.d.ts +2 -2
  262. package/package.json +3 -2
@@ -1,7 +1,7 @@
1
1
  import * as z from 'zod';
2
2
  import 'better-call';
3
- import '../../shared/better-auth.D1jaLDAW.mjs';
4
- import { a as createAuthEndpoint, c as createAuthMiddleware, b as getSession } from '../../shared/better-auth.Co88PbP3.mjs';
3
+ import '../../shared/better-auth.C-9OPnjJ.mjs';
4
+ import { a as createAuthEndpoint, c as createAuthMiddleware, b as getSession } from '../../shared/better-auth.CIqzVuC5.mjs';
5
5
  import '../../shared/better-auth.CiuwFiHM.mjs';
6
6
  import '@better-auth/utils/base64';
7
7
  import '@better-auth/utils/hmac';
@@ -22,12 +22,13 @@ import '../../shared/better-auth.DdzSJf-n.mjs';
22
22
  import '../../shared/better-auth.B4Qoxdgc.mjs';
23
23
  import '@better-auth/utils/random';
24
24
  import '@better-fetch/fetch';
25
- import '../../shared/better-auth.DxV4YGX3.mjs';
26
- import '../../shared/better-auth.C3bLnul-.mjs';
25
+ import '../../shared/better-auth.BAQSo96z.mjs';
26
+ import '../../shared/better-auth.pyHheoY8.mjs';
27
27
  import '../../shared/better-auth.CvNZNAOW.mjs';
28
28
  import 'jose/errors';
29
29
  import '../../shared/better-auth.BUPPRXfK.mjs';
30
30
  import 'defu';
31
+ import '../../shared/better-auth.D2xndZ2p.mjs';
31
32
 
32
33
  const getSessionQuerySchema = z.optional(
33
34
  z.object({
@@ -35,10 +36,12 @@ const getSessionQuerySchema = z.optional(
35
36
  * If cookie cache is enabled, it will disable the cache
36
37
  * and fetch the session from the database
37
38
  */
38
- disableCookieCache: z.boolean().describe("Disable cookie cache and fetch session from database").or(z.string().transform((v) => v === "true")).optional(),
39
- disableRefresh: z.boolean().describe(
40
- "Disable session refresh. Useful for checking session status, without updating the session"
41
- ).optional()
39
+ disableCookieCache: z.boolean().meta({
40
+ description: "Disable cookie cache and fetch session from database"
41
+ }).or(z.string().transform((v) => v === "true")).optional(),
42
+ disableRefresh: z.boolean().meta({
43
+ description: "Disable session refresh. Useful for checking session status, without updating the session"
44
+ }).optional()
42
45
  })
43
46
  );
44
47
  const customSession = (fn, options, pluginOptions) => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  const z = require('zod');
4
4
  const betterCall = require('better-call');
5
- const session = require('../../shared/better-auth.wBgaxGEw.cjs');
5
+ const session = require('../../shared/better-auth.CWoe8tep.cjs');
6
6
  require('@better-auth/utils/hash');
7
7
  require('@noble/ciphers/chacha.js');
8
8
  require('@noble/ciphers/utils.js');
@@ -12,7 +12,7 @@ require('@noble/hashes/scrypt.js');
12
12
  require('@better-auth/utils/hex');
13
13
  require('@noble/hashes/utils.js');
14
14
  const random = require('../../shared/better-auth.CYeOI8C-.cjs');
15
- const cookies_index = require('../../shared/better-auth.DIfV2UBl.cjs');
15
+ const cookies_index = require('../../shared/better-auth.oHfRlmfe.cjs');
16
16
  const schema$1 = require('../../shared/better-auth.DcYLM7Us.cjs');
17
17
  require('../../shared/better-auth.B6fIklBU.cjs');
18
18
  require('../../shared/better-auth.DTvRBuq4.cjs');
@@ -21,10 +21,11 @@ require('kysely');
21
21
  const client = require('../../shared/better-auth.BMgeJg3r.cjs');
22
22
  require('../../shared/better-auth.C1hdVENX.cjs');
23
23
  require('../../shared/better-auth.DgMx7bVs.cjs');
24
+ require('../../shared/better-auth.uykCWCYS.cjs');
24
25
  require('@better-auth/utils/hmac');
25
26
  require('@better-auth/utils/binary');
26
27
  require('../../shared/better-auth.ANpbi45u.cjs');
27
- require('../../shared/better-auth.DRmln2Nr.cjs');
28
+ require('../../shared/better-auth.DxBcELEX.cjs');
28
29
 
29
30
  function _interopNamespaceCompat(e) {
30
31
  if (e && typeof e === 'object' && 'default' in e) return e;
@@ -197,12 +198,20 @@ const deviceAuthorization = (options = {}) => {
197
198
  {
198
199
  method: "POST",
199
200
  body: z__namespace.object({
200
- client_id: z__namespace.string().describe("The client ID of the application"),
201
- scope: z__namespace.string().describe("Space-separated list of scopes").optional()
201
+ client_id: z__namespace.string().meta({
202
+ description: "The client ID of the application"
203
+ }),
204
+ scope: z__namespace.string().meta({
205
+ description: "Space-separated list of scopes"
206
+ }).optional()
202
207
  }),
203
208
  error: z__namespace.object({
204
- error: z__namespace.enum(["invalid_request", "invalid_client"]).describe("Error code"),
205
- error_description: z__namespace.string().describe("Detailed error description")
209
+ error: z__namespace.enum(["invalid_request", "invalid_client"]).meta({
210
+ description: "Error code"
211
+ }),
212
+ error_description: z__namespace.string().meta({
213
+ description: "Detailed error description"
214
+ })
206
215
  }),
207
216
  metadata: {
208
217
  openapi: {
@@ -328,9 +337,15 @@ Follow [rfc8628#section-3.2](https://datatracker.ietf.org/doc/html/rfc8628#secti
328
337
  {
329
338
  method: "POST",
330
339
  body: z__namespace.object({
331
- grant_type: z__namespace.literal("urn:ietf:params:oauth:grant-type:device_code").describe("The grant type for device flow"),
332
- device_code: z__namespace.string().describe("The device verification code"),
333
- client_id: z__namespace.string().describe("The client ID of the application")
340
+ grant_type: z__namespace.literal("urn:ietf:params:oauth:grant-type:device_code").meta({
341
+ description: "The grant type for device flow"
342
+ }),
343
+ device_code: z__namespace.string().meta({
344
+ description: "The device verification code"
345
+ }),
346
+ client_id: z__namespace.string().meta({
347
+ description: "The client ID of the application"
348
+ })
334
349
  }),
335
350
  error: z__namespace.object({
336
351
  error: z__namespace.enum([
@@ -340,8 +355,12 @@ Follow [rfc8628#section-3.2](https://datatracker.ietf.org/doc/html/rfc8628#secti
340
355
  "access_denied",
341
356
  "invalid_request",
342
357
  "invalid_grant"
343
- ]).describe("Error code"),
344
- error_description: z__namespace.string().describe("Detailed error description")
358
+ ]).meta({
359
+ description: "Error code"
360
+ }),
361
+ error_description: z__namespace.string().meta({
362
+ description: "Detailed error description"
363
+ })
345
364
  }),
346
365
  metadata: {
347
366
  openapi: {
@@ -560,11 +579,17 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
560
579
  {
561
580
  method: "GET",
562
581
  query: z__namespace.object({
563
- user_code: z__namespace.string().describe("The user code to verify")
582
+ user_code: z__namespace.string().meta({
583
+ description: "The user code to verify"
584
+ })
564
585
  }),
565
586
  error: z__namespace.object({
566
- error: z__namespace.enum(["invalid_request"]).describe("Error code"),
567
- error_description: z__namespace.string().describe("Detailed error description")
587
+ error: z__namespace.enum(["invalid_request"]).meta({
588
+ description: "Error code"
589
+ }),
590
+ error_description: z__namespace.string().meta({
591
+ description: "Detailed error description"
592
+ })
568
593
  }),
569
594
  metadata: {
570
595
  openapi: {
@@ -630,15 +655,21 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
630
655
  {
631
656
  method: "POST",
632
657
  body: z__namespace.object({
633
- userCode: z__namespace.string().describe("The user code to approve")
658
+ userCode: z__namespace.string().meta({
659
+ description: "The user code to approve"
660
+ })
634
661
  }),
635
662
  error: z__namespace.object({
636
663
  error: z__namespace.enum([
637
664
  "invalid_request",
638
665
  "expired_token",
639
666
  "device_code_already_processed"
640
- ]).describe("Error code"),
641
- error_description: z__namespace.string().describe("Detailed error description")
667
+ ]).meta({
668
+ description: "Error code"
669
+ }),
670
+ error_description: z__namespace.string().meta({
671
+ description: "Detailed error description"
672
+ })
642
673
  }),
643
674
  requireHeaders: true,
644
675
  metadata: {
@@ -723,7 +754,9 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
723
754
  {
724
755
  method: "POST",
725
756
  body: z__namespace.object({
726
- userCode: z__namespace.string().describe("The user code to deny")
757
+ userCode: z__namespace.string().meta({
758
+ description: "The user code to deny"
759
+ })
727
760
  }),
728
761
  metadata: {
729
762
  openapi: {
@@ -1,6 +1,6 @@
1
1
  import * as better_call from 'better-call';
2
2
  import * as z from 'zod';
3
- import { I as InferOptionSchema } from '../../shared/better-auth.DHiuXI9L.cjs';
3
+ import { I as InferOptionSchema } from '../../shared/better-auth.BOKSn3AP.cjs';
4
4
  import 'kysely';
5
5
  import '../../shared/better-auth.v_lf-jeY.cjs';
6
6
  import '../../shared/better-auth.DTtXpZYr.cjs';
@@ -1,6 +1,6 @@
1
1
  import * as better_call from 'better-call';
2
2
  import * as z from 'zod';
3
- import { I as InferOptionSchema } from '../../shared/better-auth.DQBMcFsm.mjs';
3
+ import { I as InferOptionSchema } from '../../shared/better-auth.vNMd9aBC.mjs';
4
4
  import 'kysely';
5
5
  import '../../shared/better-auth.XefKa8DI.mjs';
6
6
  import '../../shared/better-auth.DTtXpZYr.mjs';
@@ -1,6 +1,6 @@
1
1
  import * as better_call from 'better-call';
2
2
  import * as z from 'zod';
3
- import { I as InferOptionSchema } from '../../shared/better-auth.DyZUF2_t.js';
3
+ import { I as InferOptionSchema } from '../../shared/better-auth.3es9ZU_K.js';
4
4
  import 'kysely';
5
5
  import '../../shared/better-auth.4SXCyo06.js';
6
6
  import '../../shared/better-auth.DTtXpZYr.js';
@@ -1,6 +1,6 @@
1
1
  import * as z from 'zod';
2
2
  import { APIError } from 'better-call';
3
- import { a as createAuthEndpoint, g as getSessionFromCtx } from '../../shared/better-auth.Co88PbP3.mjs';
3
+ import { a as createAuthEndpoint, g as getSessionFromCtx } from '../../shared/better-auth.CIqzVuC5.mjs';
4
4
  import '@better-auth/utils/hash';
5
5
  import '@noble/ciphers/chacha.js';
6
6
  import '@noble/ciphers/utils.js';
@@ -10,7 +10,7 @@ import '@noble/hashes/scrypt.js';
10
10
  import '@better-auth/utils/hex';
11
11
  import '@noble/hashes/utils.js';
12
12
  import { g as generateRandomString } from '../../shared/better-auth.B4Qoxdgc.mjs';
13
- import { m as ms } from '../../shared/better-auth.C3bLnul-.mjs';
13
+ import { m as ms } from '../../shared/better-auth.pyHheoY8.mjs';
14
14
  import { m as mergeSchema } from '../../shared/better-auth.CJ2rnsDV.mjs';
15
15
  import '../../shared/better-auth.CiuwFiHM.mjs';
16
16
  import '../../shared/better-auth.C4g12FAA.mjs';
@@ -19,10 +19,11 @@ import 'kysely';
19
19
  export { d as deviceAuthorizationClient } from '../../shared/better-auth.BpA03GIs.mjs';
20
20
  import '../../shared/better-auth.CW6D9eSx.mjs';
21
21
  import '../../shared/better-auth.CvNZNAOW.mjs';
22
+ import '../../shared/better-auth.D2xndZ2p.mjs';
22
23
  import '@better-auth/utils/hmac';
23
24
  import '@better-auth/utils/binary';
24
25
  import '../../shared/better-auth.DdzSJf-n.mjs';
25
- import '../../shared/better-auth.DxV4YGX3.mjs';
26
+ import '../../shared/better-auth.BAQSo96z.mjs';
26
27
 
27
28
  const schema = {
28
29
  deviceCode: {
@@ -181,12 +182,20 @@ const deviceAuthorization = (options = {}) => {
181
182
  {
182
183
  method: "POST",
183
184
  body: z.object({
184
- client_id: z.string().describe("The client ID of the application"),
185
- scope: z.string().describe("Space-separated list of scopes").optional()
185
+ client_id: z.string().meta({
186
+ description: "The client ID of the application"
187
+ }),
188
+ scope: z.string().meta({
189
+ description: "Space-separated list of scopes"
190
+ }).optional()
186
191
  }),
187
192
  error: z.object({
188
- error: z.enum(["invalid_request", "invalid_client"]).describe("Error code"),
189
- error_description: z.string().describe("Detailed error description")
193
+ error: z.enum(["invalid_request", "invalid_client"]).meta({
194
+ description: "Error code"
195
+ }),
196
+ error_description: z.string().meta({
197
+ description: "Detailed error description"
198
+ })
190
199
  }),
191
200
  metadata: {
192
201
  openapi: {
@@ -312,9 +321,15 @@ Follow [rfc8628#section-3.2](https://datatracker.ietf.org/doc/html/rfc8628#secti
312
321
  {
313
322
  method: "POST",
314
323
  body: z.object({
315
- grant_type: z.literal("urn:ietf:params:oauth:grant-type:device_code").describe("The grant type for device flow"),
316
- device_code: z.string().describe("The device verification code"),
317
- client_id: z.string().describe("The client ID of the application")
324
+ grant_type: z.literal("urn:ietf:params:oauth:grant-type:device_code").meta({
325
+ description: "The grant type for device flow"
326
+ }),
327
+ device_code: z.string().meta({
328
+ description: "The device verification code"
329
+ }),
330
+ client_id: z.string().meta({
331
+ description: "The client ID of the application"
332
+ })
318
333
  }),
319
334
  error: z.object({
320
335
  error: z.enum([
@@ -324,8 +339,12 @@ Follow [rfc8628#section-3.2](https://datatracker.ietf.org/doc/html/rfc8628#secti
324
339
  "access_denied",
325
340
  "invalid_request",
326
341
  "invalid_grant"
327
- ]).describe("Error code"),
328
- error_description: z.string().describe("Detailed error description")
342
+ ]).meta({
343
+ description: "Error code"
344
+ }),
345
+ error_description: z.string().meta({
346
+ description: "Detailed error description"
347
+ })
329
348
  }),
330
349
  metadata: {
331
350
  openapi: {
@@ -544,11 +563,17 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
544
563
  {
545
564
  method: "GET",
546
565
  query: z.object({
547
- user_code: z.string().describe("The user code to verify")
566
+ user_code: z.string().meta({
567
+ description: "The user code to verify"
568
+ })
548
569
  }),
549
570
  error: z.object({
550
- error: z.enum(["invalid_request"]).describe("Error code"),
551
- error_description: z.string().describe("Detailed error description")
571
+ error: z.enum(["invalid_request"]).meta({
572
+ description: "Error code"
573
+ }),
574
+ error_description: z.string().meta({
575
+ description: "Detailed error description"
576
+ })
552
577
  }),
553
578
  metadata: {
554
579
  openapi: {
@@ -614,15 +639,21 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
614
639
  {
615
640
  method: "POST",
616
641
  body: z.object({
617
- userCode: z.string().describe("The user code to approve")
642
+ userCode: z.string().meta({
643
+ description: "The user code to approve"
644
+ })
618
645
  }),
619
646
  error: z.object({
620
647
  error: z.enum([
621
648
  "invalid_request",
622
649
  "expired_token",
623
650
  "device_code_already_processed"
624
- ]).describe("Error code"),
625
- error_description: z.string().describe("Detailed error description")
651
+ ]).meta({
652
+ description: "Error code"
653
+ }),
654
+ error_description: z.string().meta({
655
+ description: "Detailed error description"
656
+ })
626
657
  }),
627
658
  requireHeaders: true,
628
659
  metadata: {
@@ -707,7 +738,9 @@ Follow [rfc8628#section-3.4](https://datatracker.ietf.org/doc/html/rfc8628#secti
707
738
  {
708
739
  method: "POST",
709
740
  body: z.object({
710
- userCode: z.string().describe("The user code to deny")
741
+ userCode: z.string().meta({
742
+ description: "The user code to deny"
743
+ })
711
744
  }),
712
745
  metadata: {
713
746
  openapi: {
@@ -2,9 +2,9 @@
2
2
 
3
3
  const z = require('zod');
4
4
  const betterCall = require('better-call');
5
- require('../../shared/better-auth.A_lT_4ey.cjs');
6
- const session = require('../../shared/better-auth.wBgaxGEw.cjs');
7
- const cookies_index = require('../../shared/better-auth.DIfV2UBl.cjs');
5
+ require('../../shared/better-auth.C0WkvM-b.cjs');
6
+ const session = require('../../shared/better-auth.CWoe8tep.cjs');
7
+ const cookies_index = require('../../shared/better-auth.oHfRlmfe.cjs');
8
8
  require('../../shared/better-auth.DcYLM7Us.cjs');
9
9
  require('../../shared/better-auth.B6fIklBU.cjs');
10
10
  require('../../shared/better-auth.DTvRBuq4.cjs');
@@ -21,7 +21,7 @@ require('@noble/ciphers/utils.js');
21
21
  require('@noble/hashes/scrypt.js');
22
22
  require('@better-auth/utils/hex');
23
23
  require('@noble/hashes/utils.js');
24
- require('../../shared/better-auth.DRmln2Nr.cjs');
24
+ require('../../shared/better-auth.DxBcELEX.cjs');
25
25
  require('../../shared/better-auth.ANpbi45u.cjs');
26
26
  require('jose/errors');
27
27
  require('@better-auth/utils/random');
@@ -30,6 +30,7 @@ require('../../shared/better-auth.Bg6iw3ig.cjs');
30
30
  require('@better-auth/utils/hmac');
31
31
  require('@better-auth/utils/binary');
32
32
  require('defu');
33
+ require('../../shared/better-auth.uykCWCYS.cjs');
33
34
 
34
35
  function _interopNamespaceCompat(e) {
35
36
  if (e && typeof e === 'object' && 'default' in e) return e;
@@ -139,8 +140,12 @@ const emailOTP = (options) => {
139
140
  {
140
141
  method: "POST",
141
142
  body: z__namespace.object({
142
- email: z__namespace.string({}).describe("Email address to send the OTP"),
143
- type: z__namespace.enum(types).describe("Type of the OTP")
143
+ email: z__namespace.string({}).meta({
144
+ description: "Email address to send the OTP"
145
+ }),
146
+ type: z__namespace.enum(types).meta({
147
+ description: "Type of the OTP"
148
+ })
144
149
  }),
145
150
  metadata: {
146
151
  openapi: {
@@ -263,8 +268,13 @@ const emailOTP = (options) => {
263
268
  {
264
269
  method: "POST",
265
270
  body: z__namespace.object({
266
- email: z__namespace.string({}).describe("Email address to send the OTP"),
267
- type: z__namespace.enum(types).describe("Type of the OTP")
271
+ email: z__namespace.string({}).meta({
272
+ description: "Email address to send the OTP"
273
+ }),
274
+ type: z__namespace.enum(types).meta({
275
+ required: true,
276
+ description: "Type of the OTP"
277
+ })
268
278
  }),
269
279
  metadata: {
270
280
  SERVER_ONLY: true,
@@ -317,8 +327,13 @@ const emailOTP = (options) => {
317
327
  {
318
328
  method: "GET",
319
329
  query: z__namespace.object({
320
- email: z__namespace.string({}).describe("Email address the OTP was sent to"),
321
- type: z__namespace.enum(types).describe("Type of the OTP")
330
+ email: z__namespace.string({}).meta({
331
+ description: "Email address the OTP was sent to"
332
+ }),
333
+ type: z__namespace.enum(types).meta({
334
+ required: true,
335
+ description: "Type of the OTP"
336
+ })
322
337
  }),
323
338
  metadata: {
324
339
  SERVER_ONLY: true,
@@ -397,9 +412,17 @@ const emailOTP = (options) => {
397
412
  {
398
413
  method: "POST",
399
414
  body: z__namespace.object({
400
- email: z__namespace.string().describe("Email address the OTP was sent to"),
401
- type: z__namespace.enum(types).describe("Type of the OTP"),
402
- otp: z__namespace.string().describe("OTP to verify")
415
+ email: z__namespace.string().meta({
416
+ description: "Email address the OTP was sent to"
417
+ }),
418
+ type: z__namespace.enum(types).meta({
419
+ required: true,
420
+ description: "Type of the OTP"
421
+ }),
422
+ otp: z__namespace.string().meta({
423
+ required: true,
424
+ description: "OTP to verify"
425
+ })
403
426
  }),
404
427
  metadata: {
405
428
  openapi: {
@@ -502,8 +525,13 @@ const emailOTP = (options) => {
502
525
  {
503
526
  method: "POST",
504
527
  body: z__namespace.object({
505
- email: z__namespace.string({}).describe("Email address to verify"),
506
- otp: z__namespace.string().describe("OTP to verify")
528
+ email: z__namespace.string({}).meta({
529
+ description: "Email address to verify"
530
+ }),
531
+ otp: z__namespace.string().meta({
532
+ required: true,
533
+ description: "OTP to verify"
534
+ })
507
535
  }),
508
536
  metadata: {
509
537
  openapi: {
@@ -662,8 +690,13 @@ const emailOTP = (options) => {
662
690
  {
663
691
  method: "POST",
664
692
  body: z__namespace.object({
665
- email: z__namespace.string({}).describe("Email address to sign in"),
666
- otp: z__namespace.string().describe("OTP sent to the email")
693
+ email: z__namespace.string({}).meta({
694
+ description: "Email address to sign in"
695
+ }),
696
+ otp: z__namespace.string().meta({
697
+ required: true,
698
+ description: "OTP sent to the email"
699
+ })
667
700
  }),
668
701
  metadata: {
669
702
  openapi: {
@@ -822,7 +855,9 @@ const emailOTP = (options) => {
822
855
  {
823
856
  method: "POST",
824
857
  body: z__namespace.object({
825
- email: z__namespace.string().describe("Email address to send the OTP")
858
+ email: z__namespace.string().meta({
859
+ description: "Email address to send the OTP"
860
+ })
826
861
  }),
827
862
  metadata: {
828
863
  openapi: {
@@ -899,9 +934,15 @@ const emailOTP = (options) => {
899
934
  {
900
935
  method: "POST",
901
936
  body: z__namespace.object({
902
- email: z__namespace.string().describe("Email address to reset the password"),
903
- otp: z__namespace.string().describe("OTP sent to the email"),
904
- password: z__namespace.string().describe("New password")
937
+ email: z__namespace.string().meta({
938
+ description: "Email address to reset the password"
939
+ }),
940
+ otp: z__namespace.string().meta({
941
+ description: "OTP sent to the email"
942
+ }),
943
+ password: z__namespace.string().meta({
944
+ description: "New password"
945
+ })
905
946
  }),
906
947
  metadata: {
907
948
  openapi: {
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.DHiuXI9L.cjs';
2
+ import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.BOKSn3AP.cjs';
3
3
  import * as z from 'zod';
4
4
  import 'kysely';
5
5
  import '../../shared/better-auth.v_lf-jeY.cjs';
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.DQBMcFsm.mjs';
2
+ import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.vNMd9aBC.mjs';
3
3
  import * as z from 'zod';
4
4
  import 'kysely';
5
5
  import '../../shared/better-auth.XefKa8DI.mjs';
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.DyZUF2_t.js';
2
+ import { d as AuthContext, U as User, H as HookEndpointContext } from '../../shared/better-auth.3es9ZU_K.js';
3
3
  import * as z from 'zod';
4
4
  import 'kysely';
5
5
  import '../../shared/better-auth.4SXCyo06.js';