better-auth 1.3.8-beta.1 → 1.3.8-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/dist/adapters/drizzle-adapter/index.cjs +3 -3
  2. package/dist/adapters/drizzle-adapter/index.d.cts +3 -3
  3. package/dist/adapters/drizzle-adapter/index.d.mts +3 -3
  4. package/dist/adapters/drizzle-adapter/index.d.ts +3 -3
  5. package/dist/adapters/drizzle-adapter/index.mjs +3 -3
  6. package/dist/adapters/index.cjs +3 -3
  7. package/dist/adapters/index.d.cts +4 -4
  8. package/dist/adapters/index.d.mts +4 -4
  9. package/dist/adapters/index.d.ts +4 -4
  10. package/dist/adapters/index.mjs +3 -3
  11. package/dist/adapters/kysely-adapter/index.cjs +4 -4
  12. package/dist/adapters/kysely-adapter/index.d.cts +3 -3
  13. package/dist/adapters/kysely-adapter/index.d.mts +3 -3
  14. package/dist/adapters/kysely-adapter/index.d.ts +3 -3
  15. package/dist/adapters/kysely-adapter/index.mjs +4 -4
  16. package/dist/adapters/memory-adapter/index.cjs +4 -4
  17. package/dist/adapters/memory-adapter/index.d.cts +3 -3
  18. package/dist/adapters/memory-adapter/index.d.mts +3 -3
  19. package/dist/adapters/memory-adapter/index.d.ts +3 -3
  20. package/dist/adapters/memory-adapter/index.mjs +4 -4
  21. package/dist/adapters/mongodb-adapter/index.cjs +4 -4
  22. package/dist/adapters/mongodb-adapter/index.d.cts +3 -3
  23. package/dist/adapters/mongodb-adapter/index.d.mts +3 -3
  24. package/dist/adapters/mongodb-adapter/index.d.ts +3 -3
  25. package/dist/adapters/mongodb-adapter/index.mjs +4 -4
  26. package/dist/adapters/prisma-adapter/index.cjs +3 -3
  27. package/dist/adapters/prisma-adapter/index.d.cts +3 -3
  28. package/dist/adapters/prisma-adapter/index.d.mts +3 -3
  29. package/dist/adapters/prisma-adapter/index.d.ts +3 -3
  30. package/dist/adapters/prisma-adapter/index.mjs +3 -3
  31. package/dist/adapters/test.cjs +1 -1
  32. package/dist/adapters/test.d.cts +3 -3
  33. package/dist/adapters/test.d.mts +3 -3
  34. package/dist/adapters/test.d.ts +3 -3
  35. package/dist/adapters/test.mjs +1 -1
  36. package/dist/api/index.cjs +38 -37
  37. package/dist/api/index.d.cts +3 -3
  38. package/dist/api/index.d.mts +3 -3
  39. package/dist/api/index.d.ts +3 -3
  40. package/dist/api/index.mjs +9 -7
  41. package/dist/chunks/node-sqlite-dialect.cjs +171 -0
  42. package/dist/chunks/node-sqlite-dialect.mjs +165 -0
  43. package/dist/client/index.cjs +2 -2
  44. package/dist/client/index.d.cts +5 -5
  45. package/dist/client/index.d.mts +5 -5
  46. package/dist/client/index.d.ts +5 -5
  47. package/dist/client/index.mjs +2 -2
  48. package/dist/client/plugins/index.cjs +2 -0
  49. package/dist/client/plugins/index.d.cts +6 -5
  50. package/dist/client/plugins/index.d.mts +6 -5
  51. package/dist/client/plugins/index.d.ts +6 -5
  52. package/dist/client/plugins/index.mjs +1 -0
  53. package/dist/client/react/index.cjs +1 -1
  54. package/dist/client/react/index.d.cts +4 -4
  55. package/dist/client/react/index.d.mts +4 -4
  56. package/dist/client/react/index.d.ts +4 -4
  57. package/dist/client/react/index.mjs +1 -1
  58. package/dist/client/solid/index.cjs +1 -1
  59. package/dist/client/solid/index.d.cts +10 -10
  60. package/dist/client/solid/index.d.mts +10 -10
  61. package/dist/client/solid/index.d.ts +10 -10
  62. package/dist/client/solid/index.mjs +1 -1
  63. package/dist/client/svelte/index.cjs +1 -1
  64. package/dist/client/svelte/index.d.cts +10 -10
  65. package/dist/client/svelte/index.d.mts +10 -10
  66. package/dist/client/svelte/index.d.ts +10 -10
  67. package/dist/client/svelte/index.mjs +1 -1
  68. package/dist/client/vue/index.cjs +1 -1
  69. package/dist/client/vue/index.d.cts +4 -4
  70. package/dist/client/vue/index.d.mts +4 -4
  71. package/dist/client/vue/index.d.ts +4 -4
  72. package/dist/client/vue/index.mjs +1 -1
  73. package/dist/cookies/index.cjs +20 -430
  74. package/dist/cookies/index.d.cts +3 -3
  75. package/dist/cookies/index.d.mts +3 -3
  76. package/dist/cookies/index.d.ts +3 -3
  77. package/dist/cookies/index.mjs +10 -424
  78. package/dist/db/index.cjs +6 -6
  79. package/dist/db/index.d.cts +4 -4
  80. package/dist/db/index.d.mts +4 -4
  81. package/dist/db/index.d.ts +4 -4
  82. package/dist/db/index.mjs +6 -6
  83. package/dist/index.cjs +11 -10
  84. package/dist/index.d.cts +13 -13
  85. package/dist/index.d.mts +13 -13
  86. package/dist/index.d.ts +13 -13
  87. package/dist/index.mjs +11 -10
  88. package/dist/integrations/next-js.cjs +9 -6
  89. package/dist/integrations/next-js.d.cts +3 -3
  90. package/dist/integrations/next-js.d.mts +3 -3
  91. package/dist/integrations/next-js.d.ts +3 -3
  92. package/dist/integrations/next-js.mjs +8 -5
  93. package/dist/integrations/node.d.cts +3 -3
  94. package/dist/integrations/node.d.mts +3 -3
  95. package/dist/integrations/node.d.ts +3 -3
  96. package/dist/integrations/react-start.cjs +9 -6
  97. package/dist/integrations/react-start.d.cts +3 -3
  98. package/dist/integrations/react-start.d.mts +3 -3
  99. package/dist/integrations/react-start.d.ts +3 -3
  100. package/dist/integrations/react-start.mjs +8 -5
  101. package/dist/integrations/svelte-kit.cjs +6 -5
  102. package/dist/integrations/svelte-kit.d.cts +3 -3
  103. package/dist/integrations/svelte-kit.d.mts +3 -3
  104. package/dist/integrations/svelte-kit.d.ts +3 -3
  105. package/dist/integrations/svelte-kit.mjs +5 -4
  106. package/dist/oauth2/index.cjs +13 -10
  107. package/dist/oauth2/index.d.cts +34 -8
  108. package/dist/oauth2/index.d.mts +34 -8
  109. package/dist/oauth2/index.d.ts +34 -8
  110. package/dist/oauth2/index.mjs +11 -10
  111. package/dist/plugins/access/index.d.cts +1 -1
  112. package/dist/plugins/access/index.d.mts +1 -1
  113. package/dist/plugins/access/index.d.ts +1 -1
  114. package/dist/plugins/admin/access/index.d.cts +1 -1
  115. package/dist/plugins/admin/access/index.d.mts +1 -1
  116. package/dist/plugins/admin/access/index.d.ts +1 -1
  117. package/dist/plugins/admin/index.cjs +12 -11
  118. package/dist/plugins/admin/index.d.cts +7 -7
  119. package/dist/plugins/admin/index.d.mts +7 -7
  120. package/dist/plugins/admin/index.d.ts +7 -7
  121. package/dist/plugins/admin/index.mjs +12 -11
  122. package/dist/plugins/anonymous/index.cjs +12 -11
  123. package/dist/plugins/anonymous/index.d.cts +3 -3
  124. package/dist/plugins/anonymous/index.d.mts +3 -3
  125. package/dist/plugins/anonymous/index.d.ts +3 -3
  126. package/dist/plugins/anonymous/index.mjs +6 -5
  127. package/dist/plugins/bearer/index.cjs +7 -6
  128. package/dist/plugins/bearer/index.d.cts +3 -3
  129. package/dist/plugins/bearer/index.d.mts +3 -3
  130. package/dist/plugins/bearer/index.d.ts +3 -3
  131. package/dist/plugins/bearer/index.mjs +5 -4
  132. package/dist/plugins/captcha/index.d.cts +3 -3
  133. package/dist/plugins/captcha/index.d.mts +3 -3
  134. package/dist/plugins/captcha/index.d.ts +3 -3
  135. package/dist/plugins/custom-session/index.cjs +10 -9
  136. package/dist/plugins/custom-session/index.d.cts +3 -3
  137. package/dist/plugins/custom-session/index.d.mts +3 -3
  138. package/dist/plugins/custom-session/index.d.ts +3 -3
  139. package/dist/plugins/custom-session/index.mjs +5 -4
  140. package/dist/plugins/device-authorization/index.cjs +922 -0
  141. package/dist/plugins/device-authorization/index.d.cts +638 -0
  142. package/dist/plugins/device-authorization/index.d.mts +638 -0
  143. package/dist/plugins/device-authorization/index.d.ts +638 -0
  144. package/dist/plugins/device-authorization/index.mjs +905 -0
  145. package/dist/plugins/email-otp/index.cjs +16 -15
  146. package/dist/plugins/email-otp/index.d.cts +3 -3
  147. package/dist/plugins/email-otp/index.d.mts +3 -3
  148. package/dist/plugins/email-otp/index.d.ts +3 -3
  149. package/dist/plugins/email-otp/index.mjs +7 -6
  150. package/dist/plugins/generic-oauth/index.cjs +46 -31
  151. package/dist/plugins/generic-oauth/index.d.cts +5 -19
  152. package/dist/plugins/generic-oauth/index.d.mts +5 -19
  153. package/dist/plugins/generic-oauth/index.d.ts +5 -19
  154. package/dist/plugins/generic-oauth/index.mjs +38 -23
  155. package/dist/plugins/haveibeenpwned/index.cjs +5 -4
  156. package/dist/plugins/haveibeenpwned/index.d.cts +3 -3
  157. package/dist/plugins/haveibeenpwned/index.d.mts +3 -3
  158. package/dist/plugins/haveibeenpwned/index.d.ts +3 -3
  159. package/dist/plugins/haveibeenpwned/index.mjs +5 -4
  160. package/dist/plugins/index.cjs +30 -24
  161. package/dist/plugins/index.d.cts +8 -7
  162. package/dist/plugins/index.d.mts +8 -7
  163. package/dist/plugins/index.d.ts +8 -7
  164. package/dist/plugins/index.mjs +14 -11
  165. package/dist/plugins/jwt/index.cjs +58 -17
  166. package/dist/plugins/jwt/index.d.cts +14 -3
  167. package/dist/plugins/jwt/index.d.mts +14 -3
  168. package/dist/plugins/jwt/index.d.ts +14 -3
  169. package/dist/plugins/jwt/index.mjs +53 -12
  170. package/dist/plugins/magic-link/index.cjs +13 -12
  171. package/dist/plugins/magic-link/index.mjs +10 -9
  172. package/dist/plugins/multi-session/index.cjs +14 -13
  173. package/dist/plugins/multi-session/index.d.cts +3 -3
  174. package/dist/plugins/multi-session/index.d.mts +3 -3
  175. package/dist/plugins/multi-session/index.d.ts +3 -3
  176. package/dist/plugins/multi-session/index.mjs +7 -6
  177. package/dist/plugins/oauth-proxy/index.cjs +8 -7
  178. package/dist/plugins/oauth-proxy/index.d.cts +3 -3
  179. package/dist/plugins/oauth-proxy/index.d.mts +3 -3
  180. package/dist/plugins/oauth-proxy/index.d.ts +3 -3
  181. package/dist/plugins/oauth-proxy/index.mjs +5 -4
  182. package/dist/plugins/oidc-provider/index.cjs +6 -5
  183. package/dist/plugins/oidc-provider/index.d.cts +7 -7
  184. package/dist/plugins/oidc-provider/index.d.mts +7 -7
  185. package/dist/plugins/oidc-provider/index.d.ts +7 -7
  186. package/dist/plugins/oidc-provider/index.mjs +6 -5
  187. package/dist/plugins/one-tap/index.cjs +8 -7
  188. package/dist/plugins/one-tap/index.mjs +7 -6
  189. package/dist/plugins/one-time-token/index.cjs +11 -8
  190. package/dist/plugins/one-time-token/index.d.cts +3 -3
  191. package/dist/plugins/one-time-token/index.d.mts +3 -3
  192. package/dist/plugins/one-time-token/index.d.ts +3 -3
  193. package/dist/plugins/one-time-token/index.mjs +11 -8
  194. package/dist/plugins/open-api/index.cjs +7 -6
  195. package/dist/plugins/open-api/index.d.cts +3 -3
  196. package/dist/plugins/open-api/index.d.mts +3 -3
  197. package/dist/plugins/open-api/index.d.ts +3 -3
  198. package/dist/plugins/open-api/index.mjs +5 -4
  199. package/dist/plugins/organization/access/index.d.cts +1 -1
  200. package/dist/plugins/organization/access/index.d.mts +1 -1
  201. package/dist/plugins/organization/access/index.d.ts +1 -1
  202. package/dist/plugins/organization/index.cjs +13 -12
  203. package/dist/plugins/organization/index.d.cts +7 -7
  204. package/dist/plugins/organization/index.d.mts +7 -7
  205. package/dist/plugins/organization/index.d.ts +7 -7
  206. package/dist/plugins/organization/index.mjs +13 -12
  207. package/dist/plugins/passkey/index.cjs +23 -22
  208. package/dist/plugins/passkey/index.d.cts +3 -3
  209. package/dist/plugins/passkey/index.d.mts +3 -3
  210. package/dist/plugins/passkey/index.d.ts +3 -3
  211. package/dist/plugins/passkey/index.mjs +7 -6
  212. package/dist/plugins/phone-number/index.cjs +32 -31
  213. package/dist/plugins/phone-number/index.d.cts +3 -3
  214. package/dist/plugins/phone-number/index.d.mts +3 -3
  215. package/dist/plugins/phone-number/index.d.ts +3 -3
  216. package/dist/plugins/phone-number/index.mjs +9 -8
  217. package/dist/plugins/siwe/index.cjs +11 -10
  218. package/dist/plugins/siwe/index.d.cts +41 -0
  219. package/dist/plugins/siwe/index.d.mts +41 -0
  220. package/dist/plugins/siwe/index.d.ts +41 -0
  221. package/dist/plugins/siwe/index.mjs +9 -8
  222. package/dist/plugins/sso/index.cjs +11 -10
  223. package/dist/plugins/sso/index.d.cts +5 -5
  224. package/dist/plugins/sso/index.d.mts +5 -5
  225. package/dist/plugins/sso/index.d.ts +5 -5
  226. package/dist/plugins/sso/index.mjs +7 -6
  227. package/dist/plugins/two-factor/index.cjs +47 -46
  228. package/dist/plugins/two-factor/index.d.cts +3 -3
  229. package/dist/plugins/two-factor/index.d.mts +3 -3
  230. package/dist/plugins/two-factor/index.d.ts +3 -3
  231. package/dist/plugins/two-factor/index.mjs +5 -4
  232. package/dist/plugins/username/index.cjs +19 -18
  233. package/dist/plugins/username/index.d.cts +5 -5
  234. package/dist/plugins/username/index.d.mts +5 -5
  235. package/dist/plugins/username/index.d.ts +5 -5
  236. package/dist/plugins/username/index.mjs +10 -9
  237. package/dist/shared/{better-auth.CwsxfHfN.mjs → better-auth.B-xYKxwt.mjs} +9 -97
  238. package/dist/shared/{better-auth.Bf5MnLaK.d.cts → better-auth.B29NjI62.d.cts} +4 -4
  239. package/dist/shared/{better-auth.GpOOav9x.cjs → better-auth.B3274wGK.cjs} +7 -1
  240. package/dist/shared/{better-auth.p1GhhfhV.mjs → better-auth.B548OOOk.mjs} +32 -30
  241. package/dist/shared/better-auth.BMgeJg3r.cjs +17 -0
  242. package/dist/shared/{better-auth.BCerfnoo.cjs → better-auth.BNhZazTR.cjs} +20 -1
  243. package/dist/shared/{better-auth.DIfzDoPN.mjs → better-auth.BQNzC8cU.mjs} +1 -1
  244. package/dist/shared/{better-auth.gABN3TsS.mjs → better-auth.BSGkasIG.mjs} +2 -2
  245. package/dist/shared/{better-auth.6hiPn8Kd.d.mts → better-auth.BU9YW_qQ.d.cts} +6 -6
  246. package/dist/shared/{better-auth.0SyTY9U9.d.ts → better-auth.BWfwO5vl.d.cts} +21 -73
  247. package/dist/shared/{better-auth.BDEfedYa.d.mts → better-auth.BYJu3IQC.d.ts} +4 -4
  248. package/dist/shared/{better-auth.PgM8qMHr.mjs → better-auth.BZZKN1g7.mjs} +1 -1
  249. package/dist/shared/{better-auth.BtemoGGn.mjs → better-auth.B_3Nie7C.mjs} +2 -2
  250. package/dist/shared/{better-auth.CCCUvENJ.cjs → better-auth.BblrvPZ3.cjs} +1 -1
  251. package/dist/shared/better-auth.BfeJWAMn.mjs +497 -0
  252. package/dist/shared/{better-auth.DH3YjMQH.mjs → better-auth.BjBlybv-.mjs} +7 -1
  253. package/dist/shared/better-auth.BpA03GIs.mjs +15 -0
  254. package/dist/shared/{better-auth.DrzbcRgZ.cjs → better-auth.BpptWVxZ.cjs} +65 -64
  255. package/dist/shared/{better-auth.D85s0t2j.d.mts → better-auth.BqrGtIt2.d.mts} +1 -1
  256. package/dist/shared/{better-auth.C_0BlDB0.d.ts → better-auth.BvN9j5Ap.d.ts} +1 -1
  257. package/dist/shared/{better-auth.BS4wi0R-.d.mts → better-auth.Bxn_1Cii.d.ts} +21 -73
  258. package/dist/shared/{better-auth.DiE4yQHn.mjs → better-auth.C8Y2rhan.mjs} +5 -4
  259. package/dist/shared/{better-auth.Co0UDY4N.cjs → better-auth.CFZJKUMM.cjs} +10 -98
  260. package/dist/shared/{better-auth.CVQe8izV.mjs → better-auth.CGGao4aY.mjs} +7 -0
  261. package/dist/shared/{better-auth.NCWQv_ti.cjs → better-auth.CKjaHNrP.cjs} +39 -45
  262. package/dist/shared/{better-auth.CFtZttAn.cjs → better-auth.CL4S7WA5.cjs} +2 -2
  263. package/dist/shared/{better-auth.Bgs2SPcK.cjs → better-auth.CMnvkNNK.cjs} +2 -2
  264. package/dist/shared/{better-auth.BbDyeJdW.cjs → better-auth.CR4J09bm.cjs} +6 -5
  265. package/dist/shared/{better-auth.DMus0Wrm.mjs → better-auth.Cl1MyjEq.mjs} +254 -510
  266. package/dist/shared/{better-auth.Db2g2HxM.cjs → better-auth.CmdI9lHT.cjs} +1 -1
  267. package/dist/shared/{better-auth.DrQaSEU_.mjs → better-auth.CsvyivcG.mjs} +21 -27
  268. package/dist/shared/{better-auth.CVYnNkfw.cjs → better-auth.CtToz4qL.cjs} +7 -0
  269. package/dist/shared/{better-auth.YmpB7UaD.d.cts → better-auth.D2gg3ys1.d.cts} +1 -1
  270. package/dist/shared/{better-auth.Je5iPAGQ.d.mts → better-auth.D4yr0Ou1.d.ts} +200 -11
  271. package/dist/shared/{better-auth.HYhkNVyD.mjs → better-auth.D96SwENp.mjs} +20 -1
  272. package/dist/shared/better-auth.DF-MUmVw.mjs +479 -0
  273. package/dist/shared/{better-auth.BDR52Rf2.d.cts → better-auth.DTtXpZYr.d.cts} +2 -1
  274. package/dist/shared/{better-auth.BDR52Rf2.d.mts → better-auth.DTtXpZYr.d.mts} +2 -1
  275. package/dist/shared/{better-auth.BDR52Rf2.d.ts → better-auth.DTtXpZYr.d.ts} +2 -1
  276. package/dist/shared/{better-auth.BDBtglk1.mjs → better-auth.DVsI0DHa.mjs} +1 -1
  277. package/dist/shared/{better-auth.DX362szo.mjs → better-auth.DY8mXezF.mjs} +4 -3
  278. package/dist/shared/{better-auth.PFi3XfiT.mjs → better-auth.DZVMh_VM.mjs} +3 -2
  279. package/dist/shared/better-auth.DmBU2Klq.cjs +526 -0
  280. package/dist/shared/{better-auth._D1fz1Yx.d.ts → better-auth.DoFtnL_B.d.mts} +4 -4
  281. package/dist/shared/{better-auth.MrJBhiF6.mjs → better-auth.Dqe7GuxR.mjs} +4 -4
  282. package/dist/shared/{better-auth.CkqBZvXM.d.cts → better-auth.Du7MKGKS.d.cts} +200 -11
  283. package/dist/shared/{better-auth.X6YzBCDT.d.cts → better-auth.DymB1NxW.d.mts} +6 -6
  284. package/dist/shared/{better-auth.DnUZno9_.d.ts → better-auth.F1OUHOUm.d.mts} +200 -11
  285. package/dist/shared/{better-auth.CRyLLXtn.cjs → better-auth.UmJlYEfa.cjs} +395 -662
  286. package/dist/shared/{better-auth.WTr4EDT7.cjs → better-auth.cBJ0kvYy.cjs} +36 -35
  287. package/dist/shared/better-auth.l2-e84v_.cjs +491 -0
  288. package/dist/shared/{better-auth.CkEkCniR.d.cts → better-auth.oCjO5qEz.d.mts} +21 -73
  289. package/dist/shared/{better-auth.D4eTSyUO.cjs → better-auth.pXA_xs2e.cjs} +50 -48
  290. package/dist/shared/{better-auth.DrKKZc3v.cjs → better-auth.spuYC23a.cjs} +4 -4
  291. package/dist/shared/{better-auth.CLfudv58.d.ts → better-auth.tDeNcGKy.d.ts} +5 -5
  292. package/dist/shared/{better-auth.DbrEw0kN.cjs → better-auth.vPQBmXQL.cjs} +1 -1
  293. package/dist/social-providers/index.cjs +12 -10
  294. package/dist/social-providers/index.d.cts +2 -2
  295. package/dist/social-providers/index.d.mts +2 -2
  296. package/dist/social-providers/index.d.ts +2 -2
  297. package/dist/social-providers/index.mjs +11 -10
  298. package/dist/test-utils/index.cjs +16 -13
  299. package/dist/test-utils/index.d.cts +32 -116
  300. package/dist/test-utils/index.d.mts +32 -116
  301. package/dist/test-utils/index.d.ts +32 -116
  302. package/dist/test-utils/index.mjs +16 -13
  303. package/dist/types/index.d.cts +4 -4
  304. package/dist/types/index.d.mts +4 -4
  305. package/dist/types/index.d.ts +4 -4
  306. package/package.json +20 -4
@@ -1,424 +1,10 @@
1
- import { B as BetterAuthError } from '../shared/better-auth.DdzSJf-n.mjs';
2
- import { g as getDate } from '../shared/better-auth.CW6D9eSx.mjs';
3
- import { a as isProduction, e as env } from '../shared/better-auth.CMQ3rA-I.mjs';
4
- import { base64Url } from '@better-auth/utils/base64';
5
- import { createHMAC } from '@better-auth/utils/hmac';
6
- import { s as safeJSONParse } from '../shared/better-auth.PgM8qMHr.mjs';
7
- import { a as getBaseURL } from '../shared/better-auth.CuS_eDdK.mjs';
8
- import { binary } from '@better-auth/utils/binary';
9
- import '../shared/better-auth.DH3YjMQH.mjs';
10
-
11
- const createTime = (value, format) => {
12
- const toMilliseconds = () => {
13
- switch (format) {
14
- case "ms":
15
- return value;
16
- case "s":
17
- return value * 1e3;
18
- case "m":
19
- return value * 1e3 * 60;
20
- case "h":
21
- return value * 1e3 * 60 * 60;
22
- case "d":
23
- return value * 1e3 * 60 * 60 * 24;
24
- case "w":
25
- return value * 1e3 * 60 * 60 * 24 * 7;
26
- case "y":
27
- return value * 1e3 * 60 * 60 * 24 * 365;
28
- }
29
- };
30
- const time = {
31
- t: `${value}${format}`,
32
- value,
33
- tFormat: format,
34
- toMilliseconds,
35
- toSeconds: () => time.toMilliseconds() / 1e3,
36
- toMinutes: () => time.toSeconds() / 60,
37
- toHours: () => time.toMinutes() / 60,
38
- toDays: () => time.toHours() / 24,
39
- toWeeks: () => time.toDays() / 7,
40
- toYears: () => time.toDays() / 365,
41
- getDate: () => new Date(Date.now() + time.toMilliseconds()),
42
- add: (other) => {
43
- const otherMs = typeof other === "string" ? parseTime(other).toMilliseconds() : other.toMilliseconds();
44
- return createTime(time.toMilliseconds() + otherMs, "ms");
45
- },
46
- subtract: (other) => {
47
- const otherMs = typeof other === "string" ? parseTime(other).toMilliseconds() : other.toMilliseconds();
48
- return createTime(time.toMilliseconds() - otherMs, "ms");
49
- },
50
- multiply: (factor) => createTime(time.toMilliseconds() * factor, "ms"),
51
- divide: (divisor) => createTime(time.toMilliseconds() / divisor, "ms"),
52
- equals: (other) => {
53
- const otherMs = typeof other === "string" ? parseTime(other).toMilliseconds() : other.toMilliseconds();
54
- return time.toMilliseconds() === otherMs;
55
- },
56
- lessThan: (other) => {
57
- const otherMs = typeof other === "string" ? parseTime(other).toMilliseconds() : other.toMilliseconds();
58
- return time.toMilliseconds() < otherMs;
59
- },
60
- greaterThan: (other) => {
61
- const otherMs = typeof other === "string" ? parseTime(other).toMilliseconds() : other.toMilliseconds();
62
- return time.toMilliseconds() > otherMs;
63
- },
64
- format: (pattern) => {
65
- const date = time.getDate();
66
- return pattern.replace(/YYYY|MM|DD|HH|mm|ss/g, (match) => {
67
- switch (match) {
68
- case "YYYY":
69
- return date.getFullYear().toString();
70
- case "MM":
71
- return (date.getMonth() + 1).toString().padStart(2, "0");
72
- case "DD":
73
- return date.getDate().toString().padStart(2, "0");
74
- case "HH":
75
- return date.getHours().toString().padStart(2, "0");
76
- case "mm":
77
- return date.getMinutes().toString().padStart(2, "0");
78
- case "ss":
79
- return date.getSeconds().toString().padStart(2, "0");
80
- default:
81
- return match;
82
- }
83
- });
84
- },
85
- fromNow: () => {
86
- const ms = time.toMilliseconds();
87
- if (ms < 0) return time.ago();
88
- if (ms < 1e3) return "in a few seconds";
89
- if (ms < 6e4) return `in ${Math.round(ms / 1e3)} seconds`;
90
- if (ms < 36e5) return `in ${Math.round(ms / 6e4)} minutes`;
91
- if (ms < 864e5) return `in ${Math.round(ms / 36e5)} hours`;
92
- if (ms < 6048e5) return `in ${Math.round(ms / 864e5)} days`;
93
- if (ms < 26298e5) return `in ${Math.round(ms / 6048e5)} weeks`;
94
- if (ms < 315576e5) return `in ${Math.round(ms / 26298e5)} months`;
95
- return `in ${Math.round(ms / 315576e5)} years`;
96
- },
97
- ago: () => {
98
- const ms = -time.toMilliseconds();
99
- if (ms < 0) return time.fromNow();
100
- if (ms < 1e3) return "a few seconds ago";
101
- if (ms < 6e4) return `${Math.round(ms / 1e3)} seconds ago`;
102
- if (ms < 36e5) return `${Math.round(ms / 6e4)} minutes ago`;
103
- if (ms < 864e5) return `${Math.round(ms / 36e5)} hours ago`;
104
- if (ms < 6048e5) return `${Math.round(ms / 864e5)} days ago`;
105
- if (ms < 26298e5) return `${Math.round(ms / 6048e5)} weeks ago`;
106
- if (ms < 315576e5) return `${Math.round(ms / 26298e5)} months ago`;
107
- return `${Math.round(ms / 315576e5)} years ago`;
108
- }
109
- };
110
- return time;
111
- };
112
- const parseTime = (time) => {
113
- const match = time.match(/^(\d+)(ms|s|m|h|d|w|y)$/);
114
- if (!match) throw new Error("Invalid time format");
115
- return createTime(parseInt(match[1]), match[2]);
116
- };
117
-
118
- function parseSetCookieHeader(setCookie) {
119
- const cookies = /* @__PURE__ */ new Map();
120
- const cookieArray = setCookie.split(", ");
121
- cookieArray.forEach((cookieString) => {
122
- const parts = cookieString.split(";").map((part) => part.trim());
123
- const [nameValue, ...attributes] = parts;
124
- const [name, ...valueParts] = nameValue.split("=");
125
- const value = valueParts.join("=");
126
- if (!name || value === void 0) {
127
- return;
128
- }
129
- const attrObj = { value };
130
- attributes.forEach((attribute) => {
131
- const [attrName, ...attrValueParts] = attribute.split("=");
132
- const attrValue = attrValueParts.join("=");
133
- const normalizedAttrName = attrName.trim().toLowerCase();
134
- switch (normalizedAttrName) {
135
- case "max-age":
136
- attrObj["max-age"] = attrValue ? parseInt(attrValue.trim(), 10) : void 0;
137
- break;
138
- case "expires":
139
- attrObj.expires = attrValue ? new Date(attrValue.trim()) : void 0;
140
- break;
141
- case "domain":
142
- attrObj.domain = attrValue ? attrValue.trim() : void 0;
143
- break;
144
- case "path":
145
- attrObj.path = attrValue ? attrValue.trim() : void 0;
146
- break;
147
- case "secure":
148
- attrObj.secure = true;
149
- break;
150
- case "httponly":
151
- attrObj.httponly = true;
152
- break;
153
- case "samesite":
154
- attrObj.samesite = attrValue ? attrValue.trim().toLowerCase() : void 0;
155
- break;
156
- default:
157
- attrObj[normalizedAttrName] = attrValue ? attrValue.trim() : true;
158
- break;
159
- }
160
- });
161
- cookies.set(name, attrObj);
162
- });
163
- return cookies;
164
- }
165
- function setCookieToHeader(headers) {
166
- return (context) => {
167
- const setCookieHeader = context.response.headers.get("set-cookie");
168
- if (!setCookieHeader) {
169
- return;
170
- }
171
- const cookieMap = /* @__PURE__ */ new Map();
172
- const existingCookiesHeader = headers.get("cookie") || "";
173
- existingCookiesHeader.split(";").forEach((cookie) => {
174
- const [name, ...rest] = cookie.trim().split("=");
175
- if (name && rest.length > 0) {
176
- cookieMap.set(name, rest.join("="));
177
- }
178
- });
179
- const setCookieHeaders = setCookieHeader.split(",");
180
- setCookieHeaders.forEach((header) => {
181
- const cookies = parseSetCookieHeader(header);
182
- cookies.forEach((value, name) => {
183
- cookieMap.set(name, value.value);
184
- });
185
- });
186
- const updatedCookies = Array.from(cookieMap.entries()).map(([name, value]) => `${name}=${value}`).join("; ");
187
- headers.set("cookie", updatedCookies);
188
- };
189
- }
190
-
191
- function createCookieGetter(options) {
192
- const secure = options.advanced?.useSecureCookies !== void 0 ? options.advanced?.useSecureCookies : options.baseURL !== void 0 ? options.baseURL.startsWith("https://") ? true : false : isProduction;
193
- const secureCookiePrefix = secure ? "__Secure-" : "";
194
- const crossSubdomainEnabled = !!options.advanced?.crossSubDomainCookies?.enabled;
195
- const domain = crossSubdomainEnabled ? options.advanced?.crossSubDomainCookies?.domain || (options.baseURL ? new URL(options.baseURL).hostname : void 0) : void 0;
196
- if (crossSubdomainEnabled && !domain) {
197
- throw new BetterAuthError(
198
- "baseURL is required when crossSubdomainCookies are enabled"
199
- );
200
- }
201
- function createCookie(cookieName, overrideAttributes = {}) {
202
- const prefix = options.advanced?.cookiePrefix || "better-auth";
203
- const name = options.advanced?.cookies?.[cookieName]?.name || `${prefix}.${cookieName}`;
204
- const attributes = options.advanced?.cookies?.[cookieName]?.attributes;
205
- return {
206
- name: `${secureCookiePrefix}${name}`,
207
- attributes: {
208
- secure: !!secureCookiePrefix,
209
- sameSite: "lax",
210
- path: "/",
211
- httpOnly: true,
212
- ...crossSubdomainEnabled ? { domain } : {},
213
- ...options.advanced?.defaultCookieAttributes,
214
- ...overrideAttributes,
215
- ...attributes
216
- }
217
- };
218
- }
219
- return createCookie;
220
- }
221
- function getCookies(options) {
222
- const createCookie = createCookieGetter(options);
223
- const sessionMaxAge = options.session?.expiresIn || createTime(7, "d").toSeconds();
224
- const sessionToken = createCookie("session_token", {
225
- maxAge: sessionMaxAge
226
- });
227
- const sessionData = createCookie("session_data", {
228
- maxAge: options.session?.cookieCache?.maxAge || 60 * 5
229
- });
230
- const dontRememberToken = createCookie("dont_remember");
231
- return {
232
- sessionToken: {
233
- name: sessionToken.name,
234
- options: sessionToken.attributes
235
- },
236
- /**
237
- * This cookie is used to store the session data in the cookie
238
- * This is useful for when you want to cache the session in the cookie
239
- */
240
- sessionData: {
241
- name: sessionData.name,
242
- options: sessionData.attributes
243
- },
244
- dontRememberToken: {
245
- name: dontRememberToken.name,
246
- options: dontRememberToken.attributes
247
- }
248
- };
249
- }
250
- async function setCookieCache(ctx, session) {
251
- const shouldStoreSessionDataInCookie = ctx.context.options.session?.cookieCache?.enabled;
252
- if (shouldStoreSessionDataInCookie) {
253
- const filteredSession = Object.entries(session.session).reduce(
254
- (acc, [key, value]) => {
255
- const fieldConfig = ctx.context.options.session?.additionalFields?.[key];
256
- if (!fieldConfig || fieldConfig.returned !== false) {
257
- acc[key] = value;
258
- }
259
- return acc;
260
- },
261
- {}
262
- );
263
- const sessionData = { session: filteredSession, user: session.user };
264
- const expiresAtDate = getDate(
265
- ctx.context.authCookies.sessionData.options.maxAge || 60,
266
- "sec"
267
- ).getTime();
268
- const data = base64Url.encode(
269
- JSON.stringify({
270
- session: sessionData,
271
- expiresAt: expiresAtDate,
272
- signature: await createHMAC("SHA-256", "base64urlnopad").sign(
273
- ctx.context.secret,
274
- JSON.stringify({
275
- ...sessionData,
276
- expiresAt: expiresAtDate
277
- })
278
- )
279
- }),
280
- {
281
- padding: false
282
- }
283
- );
284
- if (data.length > 4093) {
285
- throw new BetterAuthError(
286
- "Session data is too large to store in the cookie. Please disable session cookie caching or reduce the size of the session data"
287
- );
288
- }
289
- ctx.setCookie(
290
- ctx.context.authCookies.sessionData.name,
291
- data,
292
- ctx.context.authCookies.sessionData.options
293
- );
294
- }
295
- }
296
- async function setSessionCookie(ctx, session, dontRememberMe, overrides) {
297
- const dontRememberMeCookie = await ctx.getSignedCookie(
298
- ctx.context.authCookies.dontRememberToken.name,
299
- ctx.context.secret
300
- );
301
- dontRememberMe = dontRememberMe !== void 0 ? dontRememberMe : !!dontRememberMeCookie;
302
- const options = ctx.context.authCookies.sessionToken.options;
303
- const maxAge = dontRememberMe ? void 0 : ctx.context.sessionConfig.expiresIn;
304
- await ctx.setSignedCookie(
305
- ctx.context.authCookies.sessionToken.name,
306
- session.session.token,
307
- ctx.context.secret,
308
- {
309
- ...options,
310
- maxAge,
311
- ...overrides
312
- }
313
- );
314
- if (dontRememberMe) {
315
- await ctx.setSignedCookie(
316
- ctx.context.authCookies.dontRememberToken.name,
317
- "true",
318
- ctx.context.secret,
319
- ctx.context.authCookies.dontRememberToken.options
320
- );
321
- }
322
- await setCookieCache(ctx, session);
323
- ctx.context.setNewSession(session);
324
- if (ctx.context.options.secondaryStorage) {
325
- await ctx.context.secondaryStorage?.set(
326
- session.session.token,
327
- JSON.stringify({
328
- user: session.user,
329
- session: session.session
330
- }),
331
- Math.floor(
332
- (new Date(session.session.expiresAt).getTime() - Date.now()) / 1e3
333
- )
334
- );
335
- }
336
- }
337
- function deleteSessionCookie(ctx, skipDontRememberMe) {
338
- ctx.setCookie(ctx.context.authCookies.sessionToken.name, "", {
339
- ...ctx.context.authCookies.sessionToken.options,
340
- maxAge: 0
341
- });
342
- ctx.setCookie(ctx.context.authCookies.sessionData.name, "", {
343
- ...ctx.context.authCookies.sessionData.options,
344
- maxAge: 0
345
- });
346
- if (!skipDontRememberMe) {
347
- ctx.setCookie(ctx.context.authCookies.dontRememberToken.name, "", {
348
- ...ctx.context.authCookies.dontRememberToken.options,
349
- maxAge: 0
350
- });
351
- }
352
- }
353
- function parseCookies(cookieHeader) {
354
- const cookies = cookieHeader.split("; ");
355
- const cookieMap = /* @__PURE__ */ new Map();
356
- cookies.forEach((cookie) => {
357
- const [name, value] = cookie.split("=");
358
- cookieMap.set(name, value);
359
- });
360
- return cookieMap;
361
- }
362
- const getSessionCookie = (request, config) => {
363
- if (config?.cookiePrefix) {
364
- if (config.cookieName) {
365
- config.cookiePrefix = `${config.cookiePrefix}-`;
366
- } else {
367
- config.cookiePrefix = `${config.cookiePrefix}.`;
368
- }
369
- }
370
- const headers = "headers" in request ? request.headers : request;
371
- const req = request instanceof Request ? request : void 0;
372
- getBaseURL(req?.url, config?.path, req);
373
- const cookies = headers.get("cookie");
374
- if (!cookies) {
375
- return null;
376
- }
377
- const { cookieName = "session_token", cookiePrefix = "better-auth." } = config || {};
378
- const name = `${cookiePrefix}${cookieName}`;
379
- const secureCookieName = `__Secure-${name}`;
380
- const parsedCookie = parseCookies(cookies);
381
- const sessionToken = parsedCookie.get(name) || parsedCookie.get(secureCookieName);
382
- if (sessionToken) {
383
- return sessionToken;
384
- }
385
- return null;
386
- };
387
- const getCookieCache = async (request, config) => {
388
- const headers = request instanceof Headers ? request : request.headers;
389
- const cookies = headers.get("cookie");
390
- if (!cookies) {
391
- return null;
392
- }
393
- const { cookieName = "session_data", cookiePrefix = "better-auth" } = config || {};
394
- const name = config?.isSecure !== void 0 ? config.isSecure ? `__Secure-${cookiePrefix}.${cookieName}` : `${cookiePrefix}.${cookieName}` : isProduction ? `__Secure-${cookiePrefix}.${cookieName}` : `${cookiePrefix}.${cookieName}`;
395
- const parsedCookie = parseCookies(cookies);
396
- const sessionData = parsedCookie.get(name);
397
- if (sessionData) {
398
- const sessionDataPayload = safeJSONParse(binary.decode(base64Url.decode(sessionData)));
399
- if (!sessionDataPayload) {
400
- return null;
401
- }
402
- const secret = config?.secret || env.BETTER_AUTH_SECRET;
403
- if (!secret) {
404
- throw new BetterAuthError(
405
- "getCookieCache requires a secret to be provided. Either pass it as an option or set the BETTER_AUTH_SECRET environment variable"
406
- );
407
- }
408
- const isValid = await createHMAC("SHA-256", "base64urlnopad").verify(
409
- secret,
410
- JSON.stringify({
411
- ...sessionDataPayload.session,
412
- expiresAt: sessionDataPayload.expiresAt
413
- }),
414
- sessionDataPayload.signature
415
- );
416
- if (!isValid) {
417
- return null;
418
- }
419
- return sessionDataPayload.session;
420
- }
421
- return null;
422
- };
423
-
424
- export { createCookieGetter, deleteSessionCookie, getCookieCache, getCookies, getSessionCookie, parseCookies, parseSetCookieHeader, setCookieCache, setCookieToHeader, setSessionCookie };
1
+ import '../shared/better-auth.DdzSJf-n.mjs';
2
+ import '../shared/better-auth.CW6D9eSx.mjs';
3
+ import '../shared/better-auth.CMQ3rA-I.mjs';
4
+ import '@better-auth/utils/base64';
5
+ export { c as createCookieGetter, d as deleteSessionCookie, h as getCookieCache, g as getCookies, f as getSessionCookie, a as parseCookies, p as parseSetCookieHeader, b as setCookieCache, e as setCookieToHeader, s as setSessionCookie } from '../shared/better-auth.DF-MUmVw.mjs';
6
+ import '@better-auth/utils/hmac';
7
+ import '../shared/better-auth.BZZKN1g7.mjs';
8
+ import '../shared/better-auth.CuS_eDdK.mjs';
9
+ import '@better-auth/utils/binary';
10
+ import '../shared/better-auth.BjBlybv-.mjs';
package/dist/db/index.cjs CHANGED
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- const getMigration = require('../shared/better-auth.DrKKZc3v.cjs');
3
+ const getMigration = require('../shared/better-auth.spuYC23a.cjs');
4
4
  const getTables = require('../shared/better-auth.BEphVDyL.cjs');
5
5
  const toZod = require('../shared/better-auth.BT1jd5k2.cjs');
6
6
  const schema = require('../shared/better-auth.BIMq4RPW.cjs');
7
7
  require('../shared/better-auth.C1hdVENX.cjs');
8
8
  require('../shared/better-auth.Cxlqz5AU.cjs');
9
9
  require('../shared/better-auth.B6fIklBU.cjs');
10
- require('../shared/better-auth.DbrEw0kN.cjs');
11
- require('../shared/better-auth.GpOOav9x.cjs');
10
+ require('../shared/better-auth.vPQBmXQL.cjs');
11
+ require('../shared/better-auth.B3274wGK.cjs');
12
12
  require('../shared/better-auth.Bg6iw3ig.cjs');
13
13
  require('@better-auth/utils/random');
14
14
  require('zod/v4');
@@ -25,10 +25,10 @@ require('@better-auth/utils/hex');
25
25
  require('@noble/hashes/utils');
26
26
  require('../shared/better-auth.CYeOI8C-.cjs');
27
27
  require('../shared/better-auth.ANpbi45u.cjs');
28
- require('../shared/better-auth.BCerfnoo.cjs');
28
+ require('../shared/better-auth.BNhZazTR.cjs');
29
29
  require('kysely');
30
- require('../shared/better-auth.Bgs2SPcK.cjs');
31
- require('../shared/better-auth.CFtZttAn.cjs');
30
+ require('../shared/better-auth.CMnvkNNK.cjs');
31
+ require('../shared/better-auth.CL4S7WA5.cjs');
32
32
 
33
33
  const createFieldAttribute = (type, config) => {
34
34
  return {
@@ -1,10 +1,10 @@
1
- import { a as Adapter, B as BetterAuthOptions, G as GenericEndpointContext, Q as Where, J as FieldAttribute, a8 as FieldType, K as KyselyDatabaseType } from '../shared/better-auth.CkEkCniR.cjs';
2
- export { ak as BetterAuthDbSchema, ab as FieldAttributeConfig, ah as FieldAttributeToObject, ai as InferAdditionalFieldsFromPluginOptions, x as InferFieldsFromOptions, w as InferFieldsFromPlugins, af as InferFieldsInput, ag as InferFieldsInputClient, ae as InferFieldsOutput, ad as InferValueType, aa as InternalAdapter, aj as PluginFieldAttribute, am as accountSchema, ac as createFieldAttribute, a9 as createInternalAdapter, ar as getAllFields, al as getAuthTables, aA as mergeSchema, ay as parseAccountInput, at as parseAccountOutput, ax as parseAdditionalUserInput, av as parseInputData, aq as parseOutputData, az as parseSessionInput, au as parseSessionOutput, aw as parseUserInput, as as parseUserOutput, ao as sessionSchema, an as userSchema, ap as verificationSchema } from '../shared/better-auth.CkEkCniR.cjs';
1
+ import { a as Adapter, B as BetterAuthOptions, G as GenericEndpointContext, Q as Where, J as FieldAttribute, a8 as FieldType, K as KyselyDatabaseType } from '../shared/better-auth.BWfwO5vl.cjs';
2
+ export { ak as BetterAuthDbSchema, ab as FieldAttributeConfig, ah as FieldAttributeToObject, ai as InferAdditionalFieldsFromPluginOptions, x as InferFieldsFromOptions, w as InferFieldsFromPlugins, af as InferFieldsInput, ag as InferFieldsInputClient, ae as InferFieldsOutput, ad as InferValueType, aa as InternalAdapter, aj as PluginFieldAttribute, am as accountSchema, ac as createFieldAttribute, a9 as createInternalAdapter, ar as getAllFields, al as getAuthTables, aA as mergeSchema, ay as parseAccountInput, at as parseAccountOutput, ax as parseAdditionalUserInput, av as parseInputData, aq as parseOutputData, az as parseSessionInput, au as parseSessionOutput, aw as parseUserInput, as as parseUserOutput, ao as sessionSchema, an as userSchema, ap as verificationSchema } from '../shared/better-auth.BWfwO5vl.cjs';
3
3
  import * as z from 'zod/v4';
4
4
  import 'kysely';
5
5
  import 'better-call';
6
- import '../shared/better-auth.BDR52Rf2.cjs';
7
- import '../shared/better-auth.CkqBZvXM.cjs';
6
+ import '../shared/better-auth.DTtXpZYr.cjs';
7
+ import '../shared/better-auth.Du7MKGKS.cjs';
8
8
  import 'jose';
9
9
  import 'zod/v4/core';
10
10
  import 'zod';
@@ -1,10 +1,10 @@
1
- import { a as Adapter, B as BetterAuthOptions, G as GenericEndpointContext, Q as Where, J as FieldAttribute, a8 as FieldType, K as KyselyDatabaseType } from '../shared/better-auth.BS4wi0R-.mjs';
2
- export { ak as BetterAuthDbSchema, ab as FieldAttributeConfig, ah as FieldAttributeToObject, ai as InferAdditionalFieldsFromPluginOptions, x as InferFieldsFromOptions, w as InferFieldsFromPlugins, af as InferFieldsInput, ag as InferFieldsInputClient, ae as InferFieldsOutput, ad as InferValueType, aa as InternalAdapter, aj as PluginFieldAttribute, am as accountSchema, ac as createFieldAttribute, a9 as createInternalAdapter, ar as getAllFields, al as getAuthTables, aA as mergeSchema, ay as parseAccountInput, at as parseAccountOutput, ax as parseAdditionalUserInput, av as parseInputData, aq as parseOutputData, az as parseSessionInput, au as parseSessionOutput, aw as parseUserInput, as as parseUserOutput, ao as sessionSchema, an as userSchema, ap as verificationSchema } from '../shared/better-auth.BS4wi0R-.mjs';
1
+ import { a as Adapter, B as BetterAuthOptions, G as GenericEndpointContext, Q as Where, J as FieldAttribute, a8 as FieldType, K as KyselyDatabaseType } from '../shared/better-auth.oCjO5qEz.mjs';
2
+ export { ak as BetterAuthDbSchema, ab as FieldAttributeConfig, ah as FieldAttributeToObject, ai as InferAdditionalFieldsFromPluginOptions, x as InferFieldsFromOptions, w as InferFieldsFromPlugins, af as InferFieldsInput, ag as InferFieldsInputClient, ae as InferFieldsOutput, ad as InferValueType, aa as InternalAdapter, aj as PluginFieldAttribute, am as accountSchema, ac as createFieldAttribute, a9 as createInternalAdapter, ar as getAllFields, al as getAuthTables, aA as mergeSchema, ay as parseAccountInput, at as parseAccountOutput, ax as parseAdditionalUserInput, av as parseInputData, aq as parseOutputData, az as parseSessionInput, au as parseSessionOutput, aw as parseUserInput, as as parseUserOutput, ao as sessionSchema, an as userSchema, ap as verificationSchema } from '../shared/better-auth.oCjO5qEz.mjs';
3
3
  import * as z from 'zod/v4';
4
4
  import 'kysely';
5
5
  import 'better-call';
6
- import '../shared/better-auth.BDR52Rf2.mjs';
7
- import '../shared/better-auth.Je5iPAGQ.mjs';
6
+ import '../shared/better-auth.DTtXpZYr.mjs';
7
+ import '../shared/better-auth.F1OUHOUm.mjs';
8
8
  import 'jose';
9
9
  import 'zod/v4/core';
10
10
  import 'zod';
@@ -1,10 +1,10 @@
1
- import { a as Adapter, B as BetterAuthOptions, G as GenericEndpointContext, Q as Where, J as FieldAttribute, a8 as FieldType, K as KyselyDatabaseType } from '../shared/better-auth.0SyTY9U9.js';
2
- export { ak as BetterAuthDbSchema, ab as FieldAttributeConfig, ah as FieldAttributeToObject, ai as InferAdditionalFieldsFromPluginOptions, x as InferFieldsFromOptions, w as InferFieldsFromPlugins, af as InferFieldsInput, ag as InferFieldsInputClient, ae as InferFieldsOutput, ad as InferValueType, aa as InternalAdapter, aj as PluginFieldAttribute, am as accountSchema, ac as createFieldAttribute, a9 as createInternalAdapter, ar as getAllFields, al as getAuthTables, aA as mergeSchema, ay as parseAccountInput, at as parseAccountOutput, ax as parseAdditionalUserInput, av as parseInputData, aq as parseOutputData, az as parseSessionInput, au as parseSessionOutput, aw as parseUserInput, as as parseUserOutput, ao as sessionSchema, an as userSchema, ap as verificationSchema } from '../shared/better-auth.0SyTY9U9.js';
1
+ import { a as Adapter, B as BetterAuthOptions, G as GenericEndpointContext, Q as Where, J as FieldAttribute, a8 as FieldType, K as KyselyDatabaseType } from '../shared/better-auth.Bxn_1Cii.js';
2
+ export { ak as BetterAuthDbSchema, ab as FieldAttributeConfig, ah as FieldAttributeToObject, ai as InferAdditionalFieldsFromPluginOptions, x as InferFieldsFromOptions, w as InferFieldsFromPlugins, af as InferFieldsInput, ag as InferFieldsInputClient, ae as InferFieldsOutput, ad as InferValueType, aa as InternalAdapter, aj as PluginFieldAttribute, am as accountSchema, ac as createFieldAttribute, a9 as createInternalAdapter, ar as getAllFields, al as getAuthTables, aA as mergeSchema, ay as parseAccountInput, at as parseAccountOutput, ax as parseAdditionalUserInput, av as parseInputData, aq as parseOutputData, az as parseSessionInput, au as parseSessionOutput, aw as parseUserInput, as as parseUserOutput, ao as sessionSchema, an as userSchema, ap as verificationSchema } from '../shared/better-auth.Bxn_1Cii.js';
3
3
  import * as z from 'zod/v4';
4
4
  import 'kysely';
5
5
  import 'better-call';
6
- import '../shared/better-auth.BDR52Rf2.js';
7
- import '../shared/better-auth.DnUZno9_.js';
6
+ import '../shared/better-auth.DTtXpZYr.js';
7
+ import '../shared/better-auth.D4yr0Ou1.js';
8
8
  import 'jose';
9
9
  import 'zod/v4/core';
10
10
  import 'zod';
package/dist/db/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
- export { d as convertFromDB, b as convertToDB, c as createInternalAdapter, a as getAdapter, e as getMigrations, f as getSchema, g as getWithHooks, m as matchType } from '../shared/better-auth.MrJBhiF6.mjs';
1
+ export { d as convertFromDB, b as convertToDB, c as createInternalAdapter, a as getAdapter, e as getMigrations, f as getSchema, g as getWithHooks, m as matchType } from '../shared/better-auth.Dqe7GuxR.mjs';
2
2
  export { g as getAuthTables } from '../shared/better-auth.DORkW_Ge.mjs';
3
3
  export { t as toZodSchema } from '../shared/better-auth.DXqcUO8W.mjs';
4
4
  export { a as accountSchema, g as getAllFields, m as mergeSchema, i as parseAccountInput, c as parseAccountOutput, h as parseAdditionalUserInput, e as parseInputData, p as parseOutputData, j as parseSessionInput, d as parseSessionOutput, f as parseUserInput, b as parseUserOutput, s as sessionSchema, u as userSchema, v as verificationSchema } from '../shared/better-auth.n2KFGwjY.mjs';
5
5
  import '../shared/better-auth.CW6D9eSx.mjs';
6
6
  import '../shared/better-auth.O2VtDkDK.mjs';
7
7
  import '../shared/better-auth.CMQ3rA-I.mjs';
8
- import '../shared/better-auth.PgM8qMHr.mjs';
9
- import '../shared/better-auth.DH3YjMQH.mjs';
8
+ import '../shared/better-auth.BZZKN1g7.mjs';
9
+ import '../shared/better-auth.BjBlybv-.mjs';
10
10
  import '../shared/better-auth.BUPPRXfK.mjs';
11
11
  import '@better-auth/utils/random';
12
12
  import 'zod/v4';
@@ -23,10 +23,10 @@ import '@better-auth/utils/hex';
23
23
  import '@noble/hashes/utils';
24
24
  import '../shared/better-auth.B4Qoxdgc.mjs';
25
25
  import '../shared/better-auth.DdzSJf-n.mjs';
26
- import '../shared/better-auth.HYhkNVyD.mjs';
26
+ import '../shared/better-auth.D96SwENp.mjs';
27
27
  import 'kysely';
28
- import '../shared/better-auth.gABN3TsS.mjs';
29
- import '../shared/better-auth.BtemoGGn.mjs';
28
+ import '../shared/better-auth.BSGkasIG.mjs';
29
+ import '../shared/better-auth.B_3Nie7C.mjs';
30
30
 
31
31
  const createFieldAttribute = (type, config) => {
32
32
  return {
package/dist/index.cjs CHANGED
@@ -1,22 +1,23 @@
1
1
  'use strict';
2
2
 
3
- const auth = require('./shared/better-auth.Co0UDY4N.cjs');
3
+ const auth = require('./shared/better-auth.CFZJKUMM.cjs');
4
4
  const index = require('./shared/better-auth.ANpbi45u.cjs');
5
5
  const misc = require('./shared/better-auth.BLDOwz3i.cjs');
6
- const socialProviders_index = require('./shared/better-auth.CRyLLXtn.cjs');
6
+ const socialProviders_index = require('./shared/better-auth.UmJlYEfa.cjs');
7
7
  const id = require('./shared/better-auth.Bg6iw3ig.cjs');
8
- const logger = require('./shared/better-auth.GpOOav9x.cjs');
8
+ const logger = require('./shared/better-auth.B3274wGK.cjs');
9
9
  require('./api/index.cjs');
10
10
  require('better-call');
11
- require('zod/v4');
12
- require('./cookies/index.cjs');
11
+ require('./shared/better-auth.DmBU2Klq.cjs');
13
12
  require('./shared/better-auth.C1hdVENX.cjs');
13
+ require('./shared/better-auth.l2-e84v_.cjs');
14
14
  require('./shared/better-auth.B6fIklBU.cjs');
15
15
  require('@better-auth/utils/base64');
16
16
  require('@better-auth/utils/hmac');
17
- require('./shared/better-auth.DbrEw0kN.cjs');
17
+ require('./shared/better-auth.vPQBmXQL.cjs');
18
18
  require('./shared/better-auth.DRmln2Nr.cjs');
19
19
  require('@better-auth/utils/binary');
20
+ require('zod/v4');
20
21
  require('./shared/better-auth.BIMq4RPW.cjs');
21
22
  require('./shared/better-auth.Cxlqz5AU.cjs');
22
23
  require('defu');
@@ -32,12 +33,12 @@ require('@better-auth/utils/hex');
32
33
  require('@noble/hashes/utils');
33
34
  require('./shared/better-auth.CYeOI8C-.cjs');
34
35
  require('@better-auth/utils/random');
35
- require('./shared/better-auth.DrKKZc3v.cjs');
36
+ require('./shared/better-auth.spuYC23a.cjs');
36
37
  require('./shared/better-auth.BEphVDyL.cjs');
37
- require('./shared/better-auth.BCerfnoo.cjs');
38
+ require('./shared/better-auth.BNhZazTR.cjs');
38
39
  require('kysely');
39
- require('./shared/better-auth.Bgs2SPcK.cjs');
40
- require('./shared/better-auth.CFtZttAn.cjs');
40
+ require('./shared/better-auth.CMnvkNNK.cjs');
41
+ require('./shared/better-auth.CL4S7WA5.cjs');
41
42
  require('./shared/better-auth.CDXNofOe.cjs');
42
43
  require('@better-fetch/fetch');
43
44
  require('jose/errors');