better-auth 1.3.13 → 1.3.15

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 (269) 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.cjs +1 -1
  8. package/dist/adapters/kysely-adapter/index.d.cts +1 -1
  9. package/dist/adapters/kysely-adapter/index.d.mts +1 -1
  10. package/dist/adapters/kysely-adapter/index.d.ts +1 -1
  11. package/dist/adapters/kysely-adapter/index.mjs +1 -1
  12. package/dist/adapters/memory-adapter/index.cjs +1 -1
  13. package/dist/adapters/memory-adapter/index.d.cts +1 -1
  14. package/dist/adapters/memory-adapter/index.d.mts +1 -1
  15. package/dist/adapters/memory-adapter/index.d.ts +1 -1
  16. package/dist/adapters/memory-adapter/index.mjs +1 -1
  17. package/dist/adapters/mongodb-adapter/index.d.cts +1 -1
  18. package/dist/adapters/mongodb-adapter/index.d.mts +1 -1
  19. package/dist/adapters/mongodb-adapter/index.d.ts +1 -1
  20. package/dist/adapters/prisma-adapter/index.d.cts +1 -1
  21. package/dist/adapters/prisma-adapter/index.d.mts +1 -1
  22. package/dist/adapters/prisma-adapter/index.d.ts +1 -1
  23. package/dist/adapters/test.d.cts +1 -1
  24. package/dist/adapters/test.d.mts +1 -1
  25. package/dist/adapters/test.d.ts +1 -1
  26. package/dist/api/index.cjs +3 -3
  27. package/dist/api/index.d.cts +1 -1
  28. package/dist/api/index.d.mts +1 -1
  29. package/dist/api/index.d.ts +1 -1
  30. package/dist/api/index.mjs +5 -5
  31. package/dist/client/index.cjs +3 -3
  32. package/dist/client/index.d.cts +3 -3
  33. package/dist/client/index.d.mts +3 -3
  34. package/dist/client/index.d.ts +3 -3
  35. package/dist/client/index.mjs +3 -3
  36. package/dist/client/plugins/index.d.cts +3 -3
  37. package/dist/client/plugins/index.d.mts +3 -3
  38. package/dist/client/plugins/index.d.ts +3 -3
  39. package/dist/client/react/index.cjs +2 -2
  40. package/dist/client/react/index.d.cts +3 -3
  41. package/dist/client/react/index.d.mts +3 -3
  42. package/dist/client/react/index.d.ts +3 -3
  43. package/dist/client/react/index.mjs +2 -2
  44. package/dist/client/solid/index.cjs +2 -2
  45. package/dist/client/solid/index.d.cts +9 -9
  46. package/dist/client/solid/index.d.mts +9 -9
  47. package/dist/client/solid/index.d.ts +9 -9
  48. package/dist/client/solid/index.mjs +2 -2
  49. package/dist/client/svelte/index.cjs +2 -2
  50. package/dist/client/svelte/index.d.cts +3 -3
  51. package/dist/client/svelte/index.d.mts +3 -3
  52. package/dist/client/svelte/index.d.ts +3 -3
  53. package/dist/client/svelte/index.mjs +2 -2
  54. package/dist/client/vue/index.cjs +2 -2
  55. package/dist/client/vue/index.d.cts +3 -3
  56. package/dist/client/vue/index.d.mts +3 -3
  57. package/dist/client/vue/index.d.ts +3 -3
  58. package/dist/client/vue/index.mjs +2 -2
  59. package/dist/cookies/index.cjs +1 -1
  60. package/dist/cookies/index.d.cts +1 -1
  61. package/dist/cookies/index.d.mts +1 -1
  62. package/dist/cookies/index.d.ts +1 -1
  63. package/dist/cookies/index.mjs +1 -1
  64. package/dist/db/index.cjs +3 -3
  65. package/dist/db/index.d.cts +2 -2
  66. package/dist/db/index.d.mts +2 -2
  67. package/dist/db/index.d.ts +2 -2
  68. package/dist/db/index.mjs +3 -3
  69. package/dist/index.cjs +7 -7
  70. package/dist/index.d.cts +4 -4
  71. package/dist/index.d.mts +4 -4
  72. package/dist/index.d.ts +4 -4
  73. package/dist/index.mjs +7 -7
  74. package/dist/integrations/next-js.cjs +4 -4
  75. package/dist/integrations/next-js.d.cts +1 -1
  76. package/dist/integrations/next-js.d.mts +1 -1
  77. package/dist/integrations/next-js.d.ts +1 -1
  78. package/dist/integrations/next-js.mjs +4 -4
  79. package/dist/integrations/node.d.cts +1 -1
  80. package/dist/integrations/node.d.mts +1 -1
  81. package/dist/integrations/node.d.ts +1 -1
  82. package/dist/integrations/react-start.cjs +4 -4
  83. package/dist/integrations/react-start.d.cts +1 -1
  84. package/dist/integrations/react-start.d.mts +1 -1
  85. package/dist/integrations/react-start.d.ts +1 -1
  86. package/dist/integrations/react-start.mjs +4 -4
  87. package/dist/integrations/svelte-kit.cjs +3 -3
  88. package/dist/integrations/svelte-kit.d.cts +1 -1
  89. package/dist/integrations/svelte-kit.d.mts +1 -1
  90. package/dist/integrations/svelte-kit.d.ts +1 -1
  91. package/dist/integrations/svelte-kit.mjs +3 -3
  92. package/dist/oauth2/index.cjs +3 -3
  93. package/dist/oauth2/index.d.cts +2 -2
  94. package/dist/oauth2/index.d.mts +2 -2
  95. package/dist/oauth2/index.d.ts +2 -2
  96. package/dist/oauth2/index.mjs +3 -3
  97. package/dist/plugins/admin/index.cjs +4 -4
  98. package/dist/plugins/admin/index.d.cts +16 -1
  99. package/dist/plugins/admin/index.d.mts +16 -1
  100. package/dist/plugins/admin/index.d.ts +16 -1
  101. package/dist/plugins/admin/index.mjs +4 -4
  102. package/dist/plugins/anonymous/index.cjs +3 -3
  103. package/dist/plugins/anonymous/index.d.cts +1 -1
  104. package/dist/plugins/anonymous/index.d.mts +1 -1
  105. package/dist/plugins/anonymous/index.d.ts +1 -1
  106. package/dist/plugins/anonymous/index.mjs +3 -3
  107. package/dist/plugins/bearer/index.cjs +3 -3
  108. package/dist/plugins/bearer/index.d.cts +1 -1
  109. package/dist/plugins/bearer/index.d.mts +1 -1
  110. package/dist/plugins/bearer/index.d.ts +1 -1
  111. package/dist/plugins/bearer/index.mjs +3 -3
  112. package/dist/plugins/captcha/index.d.cts +1 -1
  113. package/dist/plugins/captcha/index.d.mts +1 -1
  114. package/dist/plugins/captcha/index.d.ts +1 -1
  115. package/dist/plugins/custom-session/index.cjs +7 -9
  116. package/dist/plugins/custom-session/index.d.cts +1 -1
  117. package/dist/plugins/custom-session/index.d.mts +1 -1
  118. package/dist/plugins/custom-session/index.d.ts +1 -1
  119. package/dist/plugins/custom-session/index.mjs +7 -9
  120. package/dist/plugins/device-authorization/index.cjs +18 -50
  121. package/dist/plugins/device-authorization/index.d.cts +1 -1
  122. package/dist/plugins/device-authorization/index.d.mts +1 -1
  123. package/dist/plugins/device-authorization/index.d.ts +1 -1
  124. package/dist/plugins/device-authorization/index.mjs +18 -50
  125. package/dist/plugins/email-otp/index.cjs +20 -60
  126. package/dist/plugins/email-otp/index.d.cts +1 -1
  127. package/dist/plugins/email-otp/index.d.mts +1 -1
  128. package/dist/plugins/email-otp/index.d.ts +1 -1
  129. package/dist/plugins/email-otp/index.mjs +20 -60
  130. package/dist/plugins/generic-oauth/index.cjs +24 -42
  131. package/dist/plugins/generic-oauth/index.d.cts +1 -1
  132. package/dist/plugins/generic-oauth/index.d.mts +1 -1
  133. package/dist/plugins/generic-oauth/index.d.ts +1 -1
  134. package/dist/plugins/generic-oauth/index.mjs +24 -42
  135. package/dist/plugins/haveibeenpwned/index.cjs +3 -3
  136. package/dist/plugins/haveibeenpwned/index.d.cts +1 -1
  137. package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
  138. package/dist/plugins/haveibeenpwned/index.d.ts +1 -1
  139. package/dist/plugins/haveibeenpwned/index.mjs +3 -3
  140. package/dist/plugins/index.cjs +10 -9
  141. package/dist/plugins/index.d.cts +3 -3
  142. package/dist/plugins/index.d.mts +3 -3
  143. package/dist/plugins/index.d.ts +3 -3
  144. package/dist/plugins/index.mjs +12 -11
  145. package/dist/plugins/jwt/index.cjs +3 -3
  146. package/dist/plugins/jwt/index.d.cts +1 -1
  147. package/dist/plugins/jwt/index.d.mts +1 -1
  148. package/dist/plugins/jwt/index.d.ts +1 -1
  149. package/dist/plugins/jwt/index.mjs +3 -3
  150. package/dist/plugins/magic-link/index.cjs +20 -30
  151. package/dist/plugins/magic-link/index.mjs +20 -30
  152. package/dist/plugins/multi-session/index.cjs +5 -9
  153. package/dist/plugins/multi-session/index.d.cts +1 -1
  154. package/dist/plugins/multi-session/index.d.mts +1 -1
  155. package/dist/plugins/multi-session/index.d.ts +1 -1
  156. package/dist/plugins/multi-session/index.mjs +5 -9
  157. package/dist/plugins/oauth-proxy/index.cjs +8 -10
  158. package/dist/plugins/oauth-proxy/index.d.cts +2 -1
  159. package/dist/plugins/oauth-proxy/index.d.mts +2 -1
  160. package/dist/plugins/oauth-proxy/index.d.ts +2 -1
  161. package/dist/plugins/oauth-proxy/index.mjs +8 -10
  162. package/dist/plugins/oidc-provider/index.cjs +4 -4
  163. package/dist/plugins/oidc-provider/index.d.cts +9 -9
  164. package/dist/plugins/oidc-provider/index.d.mts +9 -9
  165. package/dist/plugins/oidc-provider/index.d.ts +9 -9
  166. package/dist/plugins/oidc-provider/index.mjs +4 -4
  167. package/dist/plugins/one-tap/index.cjs +6 -6
  168. package/dist/plugins/one-tap/index.mjs +6 -6
  169. package/dist/plugins/one-time-token/index.cjs +6 -6
  170. package/dist/plugins/one-time-token/index.d.cts +1 -1
  171. package/dist/plugins/one-time-token/index.d.mts +1 -1
  172. package/dist/plugins/one-time-token/index.d.ts +1 -1
  173. package/dist/plugins/one-time-token/index.mjs +6 -6
  174. package/dist/plugins/open-api/index.cjs +3 -3
  175. package/dist/plugins/open-api/index.d.cts +1 -1
  176. package/dist/plugins/open-api/index.d.mts +1 -1
  177. package/dist/plugins/open-api/index.d.ts +1 -1
  178. package/dist/plugins/open-api/index.mjs +3 -3
  179. package/dist/plugins/organization/access/index.d.cts +25 -25
  180. package/dist/plugins/organization/access/index.d.mts +25 -25
  181. package/dist/plugins/organization/access/index.d.ts +25 -25
  182. package/dist/plugins/organization/index.cjs +6 -6
  183. package/dist/plugins/organization/index.d.cts +77 -13
  184. package/dist/plugins/organization/index.d.mts +77 -13
  185. package/dist/plugins/organization/index.d.ts +77 -13
  186. package/dist/plugins/organization/index.mjs +6 -6
  187. package/dist/plugins/passkey/index.cjs +14 -18
  188. package/dist/plugins/passkey/index.d.cts +2 -2
  189. package/dist/plugins/passkey/index.d.mts +2 -2
  190. package/dist/plugins/passkey/index.d.ts +2 -2
  191. package/dist/plugins/passkey/index.mjs +14 -18
  192. package/dist/plugins/phone-number/index.cjs +23 -39
  193. package/dist/plugins/phone-number/index.d.cts +1 -1
  194. package/dist/plugins/phone-number/index.d.mts +1 -1
  195. package/dist/plugins/phone-number/index.d.ts +1 -1
  196. package/dist/plugins/phone-number/index.mjs +23 -39
  197. package/dist/plugins/siwe/index.cjs +3 -3
  198. package/dist/plugins/siwe/index.d.cts +1 -1
  199. package/dist/plugins/siwe/index.d.mts +1 -1
  200. package/dist/plugins/siwe/index.d.ts +1 -1
  201. package/dist/plugins/siwe/index.mjs +3 -3
  202. package/dist/plugins/sso/index.cjs +61 -87
  203. package/dist/plugins/sso/index.d.cts +3 -3
  204. package/dist/plugins/sso/index.d.mts +3 -3
  205. package/dist/plugins/sso/index.d.ts +3 -3
  206. package/dist/plugins/sso/index.mjs +61 -87
  207. package/dist/plugins/two-factor/index.cjs +18 -48
  208. package/dist/plugins/two-factor/index.d.cts +1 -1
  209. package/dist/plugins/two-factor/index.d.mts +1 -1
  210. package/dist/plugins/two-factor/index.d.ts +1 -1
  211. package/dist/plugins/two-factor/index.mjs +18 -48
  212. package/dist/plugins/username/index.cjs +31 -16
  213. package/dist/plugins/username/index.d.cts +3 -3
  214. package/dist/plugins/username/index.d.mts +3 -3
  215. package/dist/plugins/username/index.d.ts +3 -3
  216. package/dist/plugins/username/index.mjs +31 -16
  217. package/dist/shared/{better-auth.DNMTw_ds.d.ts → better-auth.6RZwqXI-.d.ts} +1 -1
  218. package/dist/shared/{better-auth.Btbv22jM.mjs → better-auth.7DsuGNVf.mjs} +5 -3
  219. package/dist/shared/{better-auth.C1AWk7z7.mjs → better-auth.AYS43XM1.mjs} +1 -1
  220. package/dist/shared/{better-auth.g33XFa_C.mjs → better-auth.B-3-wkBV.mjs} +167 -262
  221. package/dist/shared/{better-auth.BkcRiga0.cjs → better-auth.B-RhOtHf.cjs} +1 -1
  222. package/dist/shared/{better-auth.DTgTiHPJ.d.ts → better-auth.B1CNK_q_.d.ts} +1 -1
  223. package/dist/shared/{better-auth.BnOSz3eR.mjs → better-auth.BBFsjzvB.mjs} +2 -2
  224. package/dist/shared/{better-auth.Bhva6lEh.cjs → better-auth.BBk8MRta.cjs} +1 -1
  225. package/dist/shared/{better-auth.BYskLPvJ.d.ts → better-auth.BCHg51sY.d.ts} +1 -1
  226. package/dist/shared/{better-auth.C1Tqa_El.d.cts → better-auth.BTUgO__s.d.mts} +1 -1
  227. package/dist/shared/{better-auth.B5O-5tFi.cjs → better-auth.BclXpYOz.cjs} +5 -3
  228. package/dist/shared/{better-auth.DHi8l3iG.d.mts → better-auth.BeDYIF5-.d.mts} +1 -1
  229. package/dist/shared/{better-auth.yovXNUaS.d.cts → better-auth.BeOpqAwl.d.cts} +1 -1
  230. package/dist/shared/{better-auth.Brg-UO7k.d.ts → better-auth.BsnsCAjn.d.ts} +7 -7
  231. package/dist/shared/{better-auth.fV_ra52g.mjs → better-auth.C3bLnul-.mjs} +1 -1
  232. package/dist/shared/{better-auth.D6pGomIg.cjs → better-auth.C5s1d_o-.cjs} +75 -150
  233. package/dist/shared/{better-auth.C29_dxUJ.cjs → better-auth.CL5zQvRZ.cjs} +167 -262
  234. package/dist/shared/{better-auth.C0-0BnjK.d.mts → better-auth.CkCyjQ6r.d.mts} +1 -1
  235. package/dist/shared/{better-auth.CBY7cUGy.mjs → better-auth.Co88PbP3.mjs} +6 -10
  236. package/dist/shared/{better-auth.BPua9lvR.mjs → better-auth.D-4EtUes.mjs} +75 -150
  237. package/dist/shared/{better-auth.DXGtScCP.cjs → better-auth.D2444EHu.cjs} +2 -2
  238. package/dist/shared/{better-auth.DTyvXiMc.cjs → better-auth.DCOXb_2e.cjs} +48 -84
  239. package/dist/shared/{better-auth.DRukcsOo.d.mts → better-auth.DDOCnCqi.d.cts} +1 -1
  240. package/dist/shared/{better-auth.B1ufdjSo.mjs → better-auth.DFfA4Mzz.mjs} +5 -5
  241. package/dist/shared/{better-auth.CXM9s0dx.cjs → better-auth.DIfV2UBl.cjs} +1 -1
  242. package/dist/shared/{better-auth.spSlDaxD.cjs → better-auth.DP5SyJ_2.cjs} +68 -117
  243. package/dist/shared/{better-auth.DhsGZ30Q.cjs → better-auth.DUNU0obG.cjs} +1 -1
  244. package/dist/shared/{better-auth.Ddv1-cj-.mjs → better-auth.DUTxy-hg.mjs} +2 -2
  245. package/dist/shared/{better-auth.D07k8aB_.d.cts → better-auth.DY9WffSn.d.cts} +1 -1
  246. package/dist/shared/{better-auth.Bo_XNm3Z.mjs → better-auth.Df_5rmaV.mjs} +24 -48
  247. package/dist/shared/{better-auth.DL8idXrv.mjs → better-auth.DhQzyejE.mjs} +1 -1
  248. package/dist/shared/{better-auth.Gu1qAjVj.d.mts → better-auth.DhRmxPro.d.mts} +7 -7
  249. package/dist/shared/{better-auth.Bb_sp3q4.cjs → better-auth.DnBI2Nus.cjs} +5 -5
  250. package/dist/shared/{better-auth.Dsq5BCiY.mjs → better-auth.DteMRrRX.mjs} +68 -117
  251. package/dist/shared/{better-auth.demy6Fla.cjs → better-auth.DxN8-4Pz.cjs} +24 -48
  252. package/dist/shared/{better-auth.2jEckJ7k.cjs → better-auth.SS_wBML-.cjs} +2 -2
  253. package/dist/shared/{better-auth.3naUdTMW.mjs → better-auth.T3Ux10v9.mjs} +1 -1
  254. package/dist/shared/{better-auth.B1kKIM0o.d.cts → better-auth.U9CXSJA_.d.cts} +7 -7
  255. package/dist/shared/{better-auth.CvVm_hFg.cjs → better-auth.iE8wqp5_.cjs} +1 -1
  256. package/dist/shared/{better-auth.ffWeg50w.mjs → better-auth.msGOU0m9.mjs} +1 -1
  257. package/dist/shared/{better-auth.Cj28z0kQ.mjs → better-auth.vd9ibIsl.mjs} +48 -84
  258. package/dist/shared/{better-auth.CAcHGnwq.cjs → better-auth.wBgaxGEw.cjs} +6 -10
  259. package/dist/social-providers/index.cjs +3 -3
  260. package/dist/social-providers/index.mjs +3 -3
  261. package/dist/test-utils/index.cjs +11 -11
  262. package/dist/test-utils/index.d.cts +12 -12
  263. package/dist/test-utils/index.d.mts +12 -12
  264. package/dist/test-utils/index.d.ts +12 -12
  265. package/dist/test-utils/index.mjs +11 -11
  266. package/dist/types/index.d.cts +2 -2
  267. package/dist/types/index.d.mts +2 -2
  268. package/dist/types/index.d.ts +2 -2
  269. package/package.json +2 -6
@@ -1,6 +1,6 @@
1
1
  import * as better_call from 'better-call';
2
2
  import * as z from 'zod';
3
- import { U as User, I as InferOptionSchema } from '../../shared/better-auth.Brg-UO7k.js';
3
+ import { U as User, I as InferOptionSchema } from '../../shared/better-auth.BsnsCAjn.js';
4
4
  import 'kysely';
5
5
  import '../../shared/better-auth.DTtXpZYr.js';
6
6
  import '../../shared/better-auth.C6qXK08w.js';
@@ -1,10 +1,10 @@
1
1
  import * as z from 'zod';
2
- import { a as createAuthEndpoint, g as getSessionFromCtx, B as BASE_ERROR_CODES } from '../../shared/better-auth.CBY7cUGy.mjs';
2
+ import { a as createAuthEndpoint, g as getSessionFromCtx, B as BASE_ERROR_CODES } from '../../shared/better-auth.Co88PbP3.mjs';
3
3
  import { APIError } from 'better-call';
4
4
  import { m as mergeSchema } from '../../shared/better-auth.Dlx1jCB2.mjs';
5
5
  import { g as generateRandomString } from '../../shared/better-auth.B4Qoxdgc.mjs';
6
- import '../../shared/better-auth.BPua9lvR.mjs';
7
- import { s as setSessionCookie } from '../../shared/better-auth.fV_ra52g.mjs';
6
+ import '../../shared/better-auth.D-4EtUes.mjs';
7
+ import { s as setSessionCookie } from '../../shared/better-auth.C3bLnul-.mjs';
8
8
  import '../../shared/better-auth.CiuwFiHM.mjs';
9
9
  import '../../shared/better-auth.C4g12FAA.mjs';
10
10
  import { g as getDate } from '../../shared/better-auth.CW6D9eSx.mjs';
@@ -75,15 +75,9 @@ const phoneNumber = (options) => {
75
75
  {
76
76
  method: "POST",
77
77
  body: z.object({
78
- phoneNumber: z.string().meta({
79
- description: 'Phone number to sign in. Eg: "+1234567890"'
80
- }),
81
- password: z.string().meta({
82
- description: "Password to use for sign in."
83
- }),
84
- rememberMe: z.boolean().meta({
85
- description: "Remember the session. Eg: true"
86
- }).optional()
78
+ phoneNumber: z.string().describe("Phone number to sign in. Eg: "),
79
+ password: z.string().describe("Password to use for sign in."),
80
+ rememberMe: z.boolean().describe("Remember the session. Eg: true").optional()
87
81
  }),
88
82
  metadata: {
89
83
  openapi: {
@@ -248,9 +242,7 @@ const phoneNumber = (options) => {
248
242
  {
249
243
  method: "POST",
250
244
  body: z.object({
251
- phoneNumber: z.string().meta({
252
- description: 'Phone number to send OTP. Eg: "+1234567890"'
253
- })
245
+ phoneNumber: z.string().describe("Phone number to send OTP. Eg: ")
254
246
  }),
255
247
  metadata: {
256
248
  openapi: {
@@ -335,30 +327,26 @@ const phoneNumber = (options) => {
335
327
  /**
336
328
  * Phone number
337
329
  */
338
- phoneNumber: z.string().meta({
339
- description: 'Phone number to verify. Eg: "+1234567890"'
340
- }),
330
+ phoneNumber: z.string().describe("Phone number to verify. Eg: "),
341
331
  /**
342
332
  * OTP code
343
333
  */
344
- code: z.string().meta({
345
- description: 'OTP code. Eg: "123456"'
346
- }),
334
+ code: z.string().describe("OTP code. Eg: "),
347
335
  /**
348
336
  * Disable session creation after verification
349
337
  * @default false
350
338
  */
351
- disableSession: z.boolean().meta({
352
- description: "Disable session creation after verification. Eg: false"
353
- }).optional(),
339
+ disableSession: z.boolean().describe(
340
+ "Disable session creation after verification. Eg: false"
341
+ ).optional(),
354
342
  /**
355
343
  * This checks if there is a session already
356
344
  * and updates the phone number with the provided
357
345
  * phone number
358
346
  */
359
- updatePhoneNumber: z.boolean().meta({
360
- description: "Check if there is a session and update the phone number. Eg: true"
361
- }).optional()
347
+ updatePhoneNumber: z.boolean().describe(
348
+ "Check if there is a session and update the phone number. Eg: true"
349
+ ).optional()
362
350
  }),
363
351
  metadata: {
364
352
  openapi: {
@@ -635,9 +623,9 @@ const phoneNumber = (options) => {
635
623
  {
636
624
  method: "POST",
637
625
  body: z.object({
638
- phoneNumber: z.string().meta({
639
- description: `The phone number which is associated with the user. Eg: "+1234567890"`
640
- })
626
+ phoneNumber: z.string().describe(
627
+ `The phone number which is associated with the user. Eg: "+1234567890"`
628
+ )
641
629
  }),
642
630
  metadata: {
643
631
  openapi: {
@@ -775,15 +763,11 @@ const phoneNumber = (options) => {
775
763
  {
776
764
  method: "POST",
777
765
  body: z.object({
778
- otp: z.string().meta({
779
- description: 'The one time password to reset the password. Eg: "123456"'
780
- }),
781
- phoneNumber: z.string().meta({
782
- description: 'The phone number to the account which intends to reset the password for. Eg: "+1234567890"'
783
- }),
784
- newPassword: z.string().meta({
785
- description: `The new password. Eg: "new-and-secure-password"`
786
- })
766
+ otp: z.string().describe("The one time password to reset the password. Eg: "),
767
+ phoneNumber: z.string().describe(
768
+ "The phone number to the account which intends to reset the password for. Eg: "
769
+ ),
770
+ newPassword: z.string().describe(`The new password. Eg: "new-and-secure-password"`)
787
771
  }),
788
772
  metadata: {
789
773
  openapi: {
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  const betterCall = require('better-call');
4
- require('../../shared/better-auth.D6pGomIg.cjs');
5
- const session = require('../../shared/better-auth.CAcHGnwq.cjs');
4
+ require('../../shared/better-auth.C5s1d_o-.cjs');
5
+ const session = require('../../shared/better-auth.wBgaxGEw.cjs');
6
6
  const z = require('zod');
7
- const cookies_index = require('../../shared/better-auth.CXM9s0dx.cjs');
7
+ const cookies_index = require('../../shared/better-auth.DIfV2UBl.cjs');
8
8
  const schema$1 = require('../../shared/better-auth.C0qxpMUS.cjs');
9
9
  require('../../shared/better-auth.B6fIklBU.cjs');
10
10
  require('../../shared/better-auth.DTvRBuq4.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.B1kKIM0o.cjs';
3
+ import { I as InferOptionSchema } from '../../shared/better-auth.U9CXSJA_.cjs';
4
4
  import 'kysely';
5
5
  import '../../shared/better-auth.DTtXpZYr.cjs';
6
6
  import '../../shared/better-auth.7zTmTxT4.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.Gu1qAjVj.mjs';
3
+ import { I as InferOptionSchema } from '../../shared/better-auth.DhRmxPro.mjs';
4
4
  import 'kysely';
5
5
  import '../../shared/better-auth.DTtXpZYr.mjs';
6
6
  import '../../shared/better-auth.BHPr8J54.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.Brg-UO7k.js';
3
+ import { I as InferOptionSchema } from '../../shared/better-auth.BsnsCAjn.js';
4
4
  import 'kysely';
5
5
  import '../../shared/better-auth.DTtXpZYr.js';
6
6
  import '../../shared/better-auth.C6qXK08w.js';
@@ -1,8 +1,8 @@
1
1
  import { APIError } from 'better-call';
2
- import '../../shared/better-auth.BPua9lvR.mjs';
3
- import { a as createAuthEndpoint } from '../../shared/better-auth.CBY7cUGy.mjs';
2
+ import '../../shared/better-auth.D-4EtUes.mjs';
3
+ import { a as createAuthEndpoint } from '../../shared/better-auth.Co88PbP3.mjs';
4
4
  import * as z from 'zod';
5
- import { s as setSessionCookie } from '../../shared/better-auth.fV_ra52g.mjs';
5
+ import { s as setSessionCookie } from '../../shared/better-auth.C3bLnul-.mjs';
6
6
  import { m as mergeSchema } from '../../shared/better-auth.Dlx1jCB2.mjs';
7
7
  import '../../shared/better-auth.CiuwFiHM.mjs';
8
8
  import '../../shared/better-auth.C4g12FAA.mjs';
@@ -2,9 +2,9 @@
2
2
 
3
3
  const z = require('zod');
4
4
  const betterCall = require('better-call');
5
- const socialProviders_index = require('../../shared/better-auth.D6pGomIg.cjs');
6
- const session = require('../../shared/better-auth.CAcHGnwq.cjs');
7
- const cookies_index = require('../../shared/better-auth.CXM9s0dx.cjs');
5
+ const socialProviders_index = require('../../shared/better-auth.C5s1d_o-.cjs');
6
+ const session = require('../../shared/better-auth.wBgaxGEw.cjs');
7
+ const cookies_index = require('../../shared/better-auth.DIfV2UBl.cjs');
8
8
  require('../../shared/better-auth.C0qxpMUS.cjs');
9
9
  require('../../shared/better-auth.B6fIklBU.cjs');
10
10
  require('../../shared/better-auth.DTvRBuq4.cjs');
@@ -68,67 +68,51 @@ const sso = (options) => {
68
68
  {
69
69
  method: "POST",
70
70
  body: z__namespace.object({
71
- providerId: z__namespace.string().meta({
72
- description: 'The ID of the provider. This is used to identify the provider during login and callback. Eg: "example-provider"'
73
- }),
74
- issuer: z__namespace.string().meta({
75
- description: 'The issuer url of the provider. Eg: "https://idp.example.com"'
76
- }),
77
- domain: z__namespace.string().meta({
78
- description: 'The domain of the provider. This is used for email matching. Eg: "example.com"'
79
- }),
80
- clientId: z__namespace.string().meta({
81
- description: 'The client ID. Eg: "1234567890"'
82
- }),
83
- clientSecret: z__namespace.string().meta({
84
- description: 'The client secret. Eg: "1234567890"'
85
- }),
86
- authorizationEndpoint: z__namespace.string().meta({
87
- description: 'The authorization endpoint. Eg: "https://idp.example.com/authorize"'
88
- }).optional(),
89
- tokenEndpoint: z__namespace.string().meta({
90
- description: 'The token endpoint. Eg: "https://idp.example.com/token"'
91
- }).optional(),
92
- userInfoEndpoint: z__namespace.string().meta({
93
- description: 'The user info endpoint. Eg: "https://idp.example.com/userinfo"'
94
- }).optional(),
95
- tokenEndpointAuthentication: z__namespace.enum(["client_secret_post", "client_secret_basic"]).meta({
96
- description: `The authentication method for the token endpoint. Defaults to 'client_secret_post'. Eg: "client_secret_post"`
97
- }).optional(),
98
- jwksEndpoint: z__namespace.string().meta({
99
- description: 'The JWKS endpoint. Eg: "https://idp.example.com/.well-known/jwks.json"'
100
- }).optional(),
71
+ providerId: z__namespace.string().describe(
72
+ "The ID of the provider. This is used to identify the provider during login and callback. Eg: "
73
+ ),
74
+ issuer: z__namespace.string().describe("The issuer url of the provider. Eg: "),
75
+ domain: z__namespace.string().describe(
76
+ "The domain of the provider. This is used for email matching. Eg: "
77
+ ),
78
+ clientId: z__namespace.string().describe("The client ID. Eg: "),
79
+ clientSecret: z__namespace.string().describe("The client secret. Eg: "),
80
+ authorizationEndpoint: z__namespace.string().describe("The authorization endpoint. Eg: ").optional(),
81
+ tokenEndpoint: z__namespace.string().describe("The token endpoint. Eg: ").optional(),
82
+ userInfoEndpoint: z__namespace.string().describe("The user info endpoint. Eg: ").optional(),
83
+ tokenEndpointAuthentication: z__namespace.enum(["client_secret_post", "client_secret_basic"]).describe(
84
+ "The authentication method for the token endpoint. Defaults to "
85
+ ).optional(),
86
+ jwksEndpoint: z__namespace.string().describe("The JWKS endpoint. Eg: ").optional(),
101
87
  discoveryEndpoint: z__namespace.string().optional(),
102
- scopes: z__namespace.array(z__namespace.string()).meta({
103
- description: "The scopes to request. Defaults to ['openid', 'email', 'profile', 'offline_access']. Eg: ['openid', 'email', 'profile']"
104
- }).optional(),
105
- pkce: z__namespace.boolean().meta({
106
- description: "Whether to use PKCE for the authorization flow. Eg: true"
107
- }).default(true).optional(),
88
+ scopes: z__namespace.array(z__namespace.string()).describe("The scopes to request. ").optional(),
89
+ pkce: z__namespace.boolean().describe(
90
+ "Whether to use PKCE for the authorization flow. Eg: true"
91
+ ).default(true).optional(),
108
92
  mapping: z__namespace.object({
109
- id: z__namespace.string().meta({
110
- description: `The field in the user info response that contains the id. Defaults to 'sub'. Eg: "sub"`
111
- }),
112
- email: z__namespace.string().meta({
113
- description: `The field in the user info response that contains the email. Defaults to 'email'. Eg: "email"`
114
- }),
115
- emailVerified: z__namespace.string().meta({
116
- description: `The field in the user info response that contains whether the email is verified. defaults to 'email_verified'. Eg: "email_verified"`
117
- }).optional(),
118
- name: z__namespace.string().meta({
119
- description: `The field in the user info response that contains the name. Defaults to 'name'. Eg: "name"`
120
- }),
121
- image: z__namespace.string().meta({
122
- description: `The field in the user info response that contains the image. Defaults to 'picture'. Eg: "picture"`
123
- }).optional(),
93
+ id: z__namespace.string().describe(
94
+ "The field in the user info response that contains the id. Defaults to "
95
+ ),
96
+ email: z__namespace.string().describe(
97
+ "The field in the user info response that contains the email. Defaults to "
98
+ ),
99
+ emailVerified: z__namespace.string().describe(
100
+ "The field in the user info response that contains whether the email is verified. "
101
+ ).optional(),
102
+ name: z__namespace.string().describe(
103
+ "The field in the user info response that contains the name. Defaults to "
104
+ ),
105
+ image: z__namespace.string().describe(
106
+ "The field in the user info response that contains the image. Defaults to "
107
+ ).optional(),
124
108
  extraFields: z__namespace.record(z__namespace.string(), z__namespace.any()).optional()
125
109
  }).optional(),
126
- organizationId: z__namespace.string().meta({
127
- description: 'If organization plugin is enabled, the organization id to link the provider to. Eg: "some-org-id"'
128
- }).optional(),
129
- overrideUserInfo: z__namespace.boolean().meta({
130
- description: "Override user info with the provider info. Defaults to false"
131
- }).default(false).optional()
110
+ organizationId: z__namespace.string().describe(
111
+ "If organization plugin is enabled, the organization id to link the provider to. Eg: "
112
+ ).optional(),
113
+ overrideUserInfo: z__namespace.boolean().describe(
114
+ "Override user info with the provider info. Defaults to false"
115
+ ).default(false).optional()
132
116
  }),
133
117
  use: [session.sessionMiddleware],
134
118
  metadata: {
@@ -356,33 +340,23 @@ const sso = (options) => {
356
340
  {
357
341
  method: "POST",
358
342
  body: z__namespace.object({
359
- email: z__namespace.string().meta({
360
- description: `The email address to sign in with. This is used to identify the issuer to sign in with. It's optional if the issuer is provided. Eg: "john@example.com"`
361
- }).optional(),
362
- organizationSlug: z__namespace.string().meta({
363
- description: 'The slug of the organization to sign in with. Eg: "example-org"'
364
- }).optional(),
365
- providerId: z__namespace.string().meta({
366
- description: 'The ID of the provider to sign in with. This can be provided instead of email or issuer. Eg: "example-provider"'
367
- }).optional(),
368
- domain: z__namespace.string().meta({
369
- description: 'The domain of the provider. Eg: "example.com"'
370
- }).optional(),
371
- callbackURL: z__namespace.string().meta({
372
- description: 'The URL to redirect to after login. Eg: "https://example.com/callback"'
373
- }),
374
- errorCallbackURL: z__namespace.string().meta({
375
- description: 'The URL to redirect to after login. Eg: "https://example.com/callback"'
376
- }).optional(),
377
- newUserCallbackURL: z__namespace.string().meta({
378
- description: 'The URL to redirect to after login if the user is new. Eg: "https://example.com/new-user"'
379
- }).optional(),
380
- scopes: z__namespace.array(z__namespace.string()).meta({
381
- description: "Scopes to request from the provider."
382
- }).optional(),
383
- requestSignUp: z__namespace.boolean().meta({
384
- description: "Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider. Eg: true"
385
- }).optional()
343
+ email: z__namespace.string().describe(
344
+ "The email address to sign in with. This is used to identify the issuer to sign in with"
345
+ ).optional(),
346
+ organizationSlug: z__namespace.string().describe("The slug of the organization to sign in with").optional(),
347
+ providerId: z__namespace.string().describe(
348
+ "The ID of the provider to sign in with. This can be provided instead of email or issuer. Eg: "
349
+ ).optional(),
350
+ domain: z__namespace.string().describe("The domain of the provider. Eg: ").optional(),
351
+ callbackURL: z__namespace.string().describe("The URL to redirect to after login. Eg: "),
352
+ errorCallbackURL: z__namespace.string().describe("The URL to redirect to after login. Eg: ").optional(),
353
+ newUserCallbackURL: z__namespace.string().describe(
354
+ "The URL to redirect to after login if the user is new. Eg: "
355
+ ).optional(),
356
+ scopes: z__namespace.array(z__namespace.string()).describe("Scopes to request from the provider.").optional(),
357
+ requestSignUp: z__namespace.boolean().describe(
358
+ "Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider. Eg: true"
359
+ ).optional()
386
360
  }),
387
361
  metadata: {
388
362
  openapi: {
@@ -1,7 +1,7 @@
1
1
  import * as better_call from 'better-call';
2
2
  import * as z from 'zod';
3
3
  import { O as OAuth2Tokens } from '../../shared/better-auth.7zTmTxT4.cjs';
4
- import { U as User } from '../../shared/better-auth.B1kKIM0o.cjs';
4
+ import { U as User } from '../../shared/better-auth.U9CXSJA_.cjs';
5
5
  import '../../shared/better-auth.DTtXpZYr.cjs';
6
6
  import 'kysely';
7
7
  import 'zod/v4/core';
@@ -96,7 +96,7 @@ declare const sso: (options?: SSOOptions) => {
96
96
  authorizationEndpoint?: string | undefined;
97
97
  tokenEndpoint?: string | undefined;
98
98
  userInfoEndpoint?: string | undefined;
99
- tokenEndpointAuthentication?: "client_secret_basic" | "client_secret_post" | undefined;
99
+ tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
100
100
  jwksEndpoint?: string | undefined;
101
101
  discoveryEndpoint?: string | undefined;
102
102
  scopes?: string[] | undefined;
@@ -152,8 +152,8 @@ declare const sso: (options?: SSOOptions) => {
152
152
  tokenEndpoint: z.ZodOptional<z.ZodString>;
153
153
  userInfoEndpoint: z.ZodOptional<z.ZodString>;
154
154
  tokenEndpointAuthentication: z.ZodOptional<z.ZodEnum<{
155
- client_secret_basic: "client_secret_basic";
156
155
  client_secret_post: "client_secret_post";
156
+ client_secret_basic: "client_secret_basic";
157
157
  }>>;
158
158
  jwksEndpoint: z.ZodOptional<z.ZodString>;
159
159
  discoveryEndpoint: z.ZodOptional<z.ZodString>;
@@ -1,7 +1,7 @@
1
1
  import * as better_call from 'better-call';
2
2
  import * as z from 'zod';
3
3
  import { O as OAuth2Tokens } from '../../shared/better-auth.BHPr8J54.mjs';
4
- import { U as User } from '../../shared/better-auth.Gu1qAjVj.mjs';
4
+ import { U as User } from '../../shared/better-auth.DhRmxPro.mjs';
5
5
  import '../../shared/better-auth.DTtXpZYr.mjs';
6
6
  import 'kysely';
7
7
  import 'zod/v4/core';
@@ -96,7 +96,7 @@ declare const sso: (options?: SSOOptions) => {
96
96
  authorizationEndpoint?: string | undefined;
97
97
  tokenEndpoint?: string | undefined;
98
98
  userInfoEndpoint?: string | undefined;
99
- tokenEndpointAuthentication?: "client_secret_basic" | "client_secret_post" | undefined;
99
+ tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
100
100
  jwksEndpoint?: string | undefined;
101
101
  discoveryEndpoint?: string | undefined;
102
102
  scopes?: string[] | undefined;
@@ -152,8 +152,8 @@ declare const sso: (options?: SSOOptions) => {
152
152
  tokenEndpoint: z.ZodOptional<z.ZodString>;
153
153
  userInfoEndpoint: z.ZodOptional<z.ZodString>;
154
154
  tokenEndpointAuthentication: z.ZodOptional<z.ZodEnum<{
155
- client_secret_basic: "client_secret_basic";
156
155
  client_secret_post: "client_secret_post";
156
+ client_secret_basic: "client_secret_basic";
157
157
  }>>;
158
158
  jwksEndpoint: z.ZodOptional<z.ZodString>;
159
159
  discoveryEndpoint: z.ZodOptional<z.ZodString>;
@@ -1,7 +1,7 @@
1
1
  import * as better_call from 'better-call';
2
2
  import * as z from 'zod';
3
3
  import { O as OAuth2Tokens } from '../../shared/better-auth.C6qXK08w.js';
4
- import { U as User } from '../../shared/better-auth.Brg-UO7k.js';
4
+ import { U as User } from '../../shared/better-auth.BsnsCAjn.js';
5
5
  import '../../shared/better-auth.DTtXpZYr.js';
6
6
  import 'kysely';
7
7
  import 'zod/v4/core';
@@ -96,7 +96,7 @@ declare const sso: (options?: SSOOptions) => {
96
96
  authorizationEndpoint?: string | undefined;
97
97
  tokenEndpoint?: string | undefined;
98
98
  userInfoEndpoint?: string | undefined;
99
- tokenEndpointAuthentication?: "client_secret_basic" | "client_secret_post" | undefined;
99
+ tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
100
100
  jwksEndpoint?: string | undefined;
101
101
  discoveryEndpoint?: string | undefined;
102
102
  scopes?: string[] | undefined;
@@ -152,8 +152,8 @@ declare const sso: (options?: SSOOptions) => {
152
152
  tokenEndpoint: z.ZodOptional<z.ZodString>;
153
153
  userInfoEndpoint: z.ZodOptional<z.ZodString>;
154
154
  tokenEndpointAuthentication: z.ZodOptional<z.ZodEnum<{
155
- client_secret_basic: "client_secret_basic";
156
155
  client_secret_post: "client_secret_post";
156
+ client_secret_basic: "client_secret_basic";
157
157
  }>>;
158
158
  jwksEndpoint: z.ZodOptional<z.ZodString>;
159
159
  discoveryEndpoint: z.ZodOptional<z.ZodString>;
@@ -1,8 +1,8 @@
1
1
  import * as z from 'zod';
2
2
  import { APIError } from 'better-call';
3
- import { p as parseState, v as validateAuthorizationCode, b as validateToken, j as handleOAuthUserInfo, s as setTokenUtil, g as generateState, c as createAuthorizationURL } from '../../shared/better-auth.BPua9lvR.mjs';
4
- import { a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.CBY7cUGy.mjs';
5
- import { s as setSessionCookie } from '../../shared/better-auth.fV_ra52g.mjs';
3
+ import { p as parseState, v as validateAuthorizationCode, b as validateToken, j as handleOAuthUserInfo, s as setTokenUtil, g as generateState, c as createAuthorizationURL } from '../../shared/better-auth.D-4EtUes.mjs';
4
+ import { a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.Co88PbP3.mjs';
5
+ import { s as setSessionCookie } from '../../shared/better-auth.C3bLnul-.mjs';
6
6
  import '../../shared/better-auth.Dlx1jCB2.mjs';
7
7
  import '../../shared/better-auth.CiuwFiHM.mjs';
8
8
  import '../../shared/better-auth.C4g12FAA.mjs';
@@ -52,67 +52,51 @@ const sso = (options) => {
52
52
  {
53
53
  method: "POST",
54
54
  body: z.object({
55
- providerId: z.string().meta({
56
- description: 'The ID of the provider. This is used to identify the provider during login and callback. Eg: "example-provider"'
57
- }),
58
- issuer: z.string().meta({
59
- description: 'The issuer url of the provider. Eg: "https://idp.example.com"'
60
- }),
61
- domain: z.string().meta({
62
- description: 'The domain of the provider. This is used for email matching. Eg: "example.com"'
63
- }),
64
- clientId: z.string().meta({
65
- description: 'The client ID. Eg: "1234567890"'
66
- }),
67
- clientSecret: z.string().meta({
68
- description: 'The client secret. Eg: "1234567890"'
69
- }),
70
- authorizationEndpoint: z.string().meta({
71
- description: 'The authorization endpoint. Eg: "https://idp.example.com/authorize"'
72
- }).optional(),
73
- tokenEndpoint: z.string().meta({
74
- description: 'The token endpoint. Eg: "https://idp.example.com/token"'
75
- }).optional(),
76
- userInfoEndpoint: z.string().meta({
77
- description: 'The user info endpoint. Eg: "https://idp.example.com/userinfo"'
78
- }).optional(),
79
- tokenEndpointAuthentication: z.enum(["client_secret_post", "client_secret_basic"]).meta({
80
- description: `The authentication method for the token endpoint. Defaults to 'client_secret_post'. Eg: "client_secret_post"`
81
- }).optional(),
82
- jwksEndpoint: z.string().meta({
83
- description: 'The JWKS endpoint. Eg: "https://idp.example.com/.well-known/jwks.json"'
84
- }).optional(),
55
+ providerId: z.string().describe(
56
+ "The ID of the provider. This is used to identify the provider during login and callback. Eg: "
57
+ ),
58
+ issuer: z.string().describe("The issuer url of the provider. Eg: "),
59
+ domain: z.string().describe(
60
+ "The domain of the provider. This is used for email matching. Eg: "
61
+ ),
62
+ clientId: z.string().describe("The client ID. Eg: "),
63
+ clientSecret: z.string().describe("The client secret. Eg: "),
64
+ authorizationEndpoint: z.string().describe("The authorization endpoint. Eg: ").optional(),
65
+ tokenEndpoint: z.string().describe("The token endpoint. Eg: ").optional(),
66
+ userInfoEndpoint: z.string().describe("The user info endpoint. Eg: ").optional(),
67
+ tokenEndpointAuthentication: z.enum(["client_secret_post", "client_secret_basic"]).describe(
68
+ "The authentication method for the token endpoint. Defaults to "
69
+ ).optional(),
70
+ jwksEndpoint: z.string().describe("The JWKS endpoint. Eg: ").optional(),
85
71
  discoveryEndpoint: z.string().optional(),
86
- scopes: z.array(z.string()).meta({
87
- description: "The scopes to request. Defaults to ['openid', 'email', 'profile', 'offline_access']. Eg: ['openid', 'email', 'profile']"
88
- }).optional(),
89
- pkce: z.boolean().meta({
90
- description: "Whether to use PKCE for the authorization flow. Eg: true"
91
- }).default(true).optional(),
72
+ scopes: z.array(z.string()).describe("The scopes to request. ").optional(),
73
+ pkce: z.boolean().describe(
74
+ "Whether to use PKCE for the authorization flow. Eg: true"
75
+ ).default(true).optional(),
92
76
  mapping: z.object({
93
- id: z.string().meta({
94
- description: `The field in the user info response that contains the id. Defaults to 'sub'. Eg: "sub"`
95
- }),
96
- email: z.string().meta({
97
- description: `The field in the user info response that contains the email. Defaults to 'email'. Eg: "email"`
98
- }),
99
- emailVerified: z.string().meta({
100
- description: `The field in the user info response that contains whether the email is verified. defaults to 'email_verified'. Eg: "email_verified"`
101
- }).optional(),
102
- name: z.string().meta({
103
- description: `The field in the user info response that contains the name. Defaults to 'name'. Eg: "name"`
104
- }),
105
- image: z.string().meta({
106
- description: `The field in the user info response that contains the image. Defaults to 'picture'. Eg: "picture"`
107
- }).optional(),
77
+ id: z.string().describe(
78
+ "The field in the user info response that contains the id. Defaults to "
79
+ ),
80
+ email: z.string().describe(
81
+ "The field in the user info response that contains the email. Defaults to "
82
+ ),
83
+ emailVerified: z.string().describe(
84
+ "The field in the user info response that contains whether the email is verified. "
85
+ ).optional(),
86
+ name: z.string().describe(
87
+ "The field in the user info response that contains the name. Defaults to "
88
+ ),
89
+ image: z.string().describe(
90
+ "The field in the user info response that contains the image. Defaults to "
91
+ ).optional(),
108
92
  extraFields: z.record(z.string(), z.any()).optional()
109
93
  }).optional(),
110
- organizationId: z.string().meta({
111
- description: 'If organization plugin is enabled, the organization id to link the provider to. Eg: "some-org-id"'
112
- }).optional(),
113
- overrideUserInfo: z.boolean().meta({
114
- description: "Override user info with the provider info. Defaults to false"
115
- }).default(false).optional()
94
+ organizationId: z.string().describe(
95
+ "If organization plugin is enabled, the organization id to link the provider to. Eg: "
96
+ ).optional(),
97
+ overrideUserInfo: z.boolean().describe(
98
+ "Override user info with the provider info. Defaults to false"
99
+ ).default(false).optional()
116
100
  }),
117
101
  use: [sessionMiddleware],
118
102
  metadata: {
@@ -340,33 +324,23 @@ const sso = (options) => {
340
324
  {
341
325
  method: "POST",
342
326
  body: z.object({
343
- email: z.string().meta({
344
- description: `The email address to sign in with. This is used to identify the issuer to sign in with. It's optional if the issuer is provided. Eg: "john@example.com"`
345
- }).optional(),
346
- organizationSlug: z.string().meta({
347
- description: 'The slug of the organization to sign in with. Eg: "example-org"'
348
- }).optional(),
349
- providerId: z.string().meta({
350
- description: 'The ID of the provider to sign in with. This can be provided instead of email or issuer. Eg: "example-provider"'
351
- }).optional(),
352
- domain: z.string().meta({
353
- description: 'The domain of the provider. Eg: "example.com"'
354
- }).optional(),
355
- callbackURL: z.string().meta({
356
- description: 'The URL to redirect to after login. Eg: "https://example.com/callback"'
357
- }),
358
- errorCallbackURL: z.string().meta({
359
- description: 'The URL to redirect to after login. Eg: "https://example.com/callback"'
360
- }).optional(),
361
- newUserCallbackURL: z.string().meta({
362
- description: 'The URL to redirect to after login if the user is new. Eg: "https://example.com/new-user"'
363
- }).optional(),
364
- scopes: z.array(z.string()).meta({
365
- description: "Scopes to request from the provider."
366
- }).optional(),
367
- requestSignUp: z.boolean().meta({
368
- description: "Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider. Eg: true"
369
- }).optional()
327
+ email: z.string().describe(
328
+ "The email address to sign in with. This is used to identify the issuer to sign in with"
329
+ ).optional(),
330
+ organizationSlug: z.string().describe("The slug of the organization to sign in with").optional(),
331
+ providerId: z.string().describe(
332
+ "The ID of the provider to sign in with. This can be provided instead of email or issuer. Eg: "
333
+ ).optional(),
334
+ domain: z.string().describe("The domain of the provider. Eg: ").optional(),
335
+ callbackURL: z.string().describe("The URL to redirect to after login. Eg: "),
336
+ errorCallbackURL: z.string().describe("The URL to redirect to after login. Eg: ").optional(),
337
+ newUserCallbackURL: z.string().describe(
338
+ "The URL to redirect to after login if the user is new. Eg: "
339
+ ).optional(),
340
+ scopes: z.array(z.string()).describe("Scopes to request from the provider.").optional(),
341
+ requestSignUp: z.boolean().describe(
342
+ "Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider. Eg: true"
343
+ ).optional()
370
344
  }),
371
345
  metadata: {
372
346
  openapi: {