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.
- package/dist/adapters/drizzle-adapter/index.d.cts +1 -1
- package/dist/adapters/drizzle-adapter/index.d.mts +1 -1
- package/dist/adapters/drizzle-adapter/index.d.ts +1 -1
- package/dist/adapters/index.d.cts +2 -2
- package/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/index.d.ts +2 -2
- package/dist/adapters/kysely-adapter/index.cjs +1 -1
- package/dist/adapters/kysely-adapter/index.d.cts +1 -1
- package/dist/adapters/kysely-adapter/index.d.mts +1 -1
- package/dist/adapters/kysely-adapter/index.d.ts +1 -1
- package/dist/adapters/kysely-adapter/index.mjs +1 -1
- package/dist/adapters/memory-adapter/index.cjs +1 -1
- package/dist/adapters/memory-adapter/index.d.cts +1 -1
- package/dist/adapters/memory-adapter/index.d.mts +1 -1
- package/dist/adapters/memory-adapter/index.d.ts +1 -1
- package/dist/adapters/memory-adapter/index.mjs +1 -1
- package/dist/adapters/mongodb-adapter/index.d.cts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.mts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.ts +1 -1
- package/dist/adapters/prisma-adapter/index.d.cts +1 -1
- package/dist/adapters/prisma-adapter/index.d.mts +1 -1
- package/dist/adapters/prisma-adapter/index.d.ts +1 -1
- package/dist/adapters/test.d.cts +1 -1
- package/dist/adapters/test.d.mts +1 -1
- package/dist/adapters/test.d.ts +1 -1
- package/dist/api/index.cjs +3 -3
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.mjs +5 -5
- package/dist/client/index.cjs +3 -3
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.mts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.mjs +3 -3
- package/dist/client/plugins/index.d.cts +3 -3
- package/dist/client/plugins/index.d.mts +3 -3
- package/dist/client/plugins/index.d.ts +3 -3
- package/dist/client/react/index.cjs +2 -2
- package/dist/client/react/index.d.cts +3 -3
- package/dist/client/react/index.d.mts +3 -3
- package/dist/client/react/index.d.ts +3 -3
- package/dist/client/react/index.mjs +2 -2
- package/dist/client/solid/index.cjs +2 -2
- package/dist/client/solid/index.d.cts +9 -9
- package/dist/client/solid/index.d.mts +9 -9
- package/dist/client/solid/index.d.ts +9 -9
- package/dist/client/solid/index.mjs +2 -2
- package/dist/client/svelte/index.cjs +2 -2
- package/dist/client/svelte/index.d.cts +3 -3
- package/dist/client/svelte/index.d.mts +3 -3
- package/dist/client/svelte/index.d.ts +3 -3
- package/dist/client/svelte/index.mjs +2 -2
- package/dist/client/vue/index.cjs +2 -2
- package/dist/client/vue/index.d.cts +3 -3
- package/dist/client/vue/index.d.mts +3 -3
- package/dist/client/vue/index.d.ts +3 -3
- package/dist/client/vue/index.mjs +2 -2
- package/dist/cookies/index.cjs +1 -1
- package/dist/cookies/index.d.cts +1 -1
- package/dist/cookies/index.d.mts +1 -1
- package/dist/cookies/index.d.ts +1 -1
- package/dist/cookies/index.mjs +1 -1
- package/dist/db/index.cjs +3 -3
- package/dist/db/index.d.cts +2 -2
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.mjs +3 -3
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +7 -7
- package/dist/integrations/next-js.cjs +4 -4
- package/dist/integrations/next-js.d.cts +1 -1
- package/dist/integrations/next-js.d.mts +1 -1
- package/dist/integrations/next-js.d.ts +1 -1
- package/dist/integrations/next-js.mjs +4 -4
- package/dist/integrations/node.d.cts +1 -1
- package/dist/integrations/node.d.mts +1 -1
- package/dist/integrations/node.d.ts +1 -1
- package/dist/integrations/react-start.cjs +4 -4
- package/dist/integrations/react-start.d.cts +1 -1
- package/dist/integrations/react-start.d.mts +1 -1
- package/dist/integrations/react-start.d.ts +1 -1
- package/dist/integrations/react-start.mjs +4 -4
- package/dist/integrations/svelte-kit.cjs +3 -3
- package/dist/integrations/svelte-kit.d.cts +1 -1
- package/dist/integrations/svelte-kit.d.mts +1 -1
- package/dist/integrations/svelte-kit.d.ts +1 -1
- package/dist/integrations/svelte-kit.mjs +3 -3
- package/dist/oauth2/index.cjs +3 -3
- package/dist/oauth2/index.d.cts +2 -2
- package/dist/oauth2/index.d.mts +2 -2
- package/dist/oauth2/index.d.ts +2 -2
- package/dist/oauth2/index.mjs +3 -3
- package/dist/plugins/admin/index.cjs +4 -4
- package/dist/plugins/admin/index.d.cts +16 -1
- package/dist/plugins/admin/index.d.mts +16 -1
- package/dist/plugins/admin/index.d.ts +16 -1
- package/dist/plugins/admin/index.mjs +4 -4
- package/dist/plugins/anonymous/index.cjs +3 -3
- package/dist/plugins/anonymous/index.d.cts +1 -1
- package/dist/plugins/anonymous/index.d.mts +1 -1
- package/dist/plugins/anonymous/index.d.ts +1 -1
- package/dist/plugins/anonymous/index.mjs +3 -3
- package/dist/plugins/bearer/index.cjs +3 -3
- package/dist/plugins/bearer/index.d.cts +1 -1
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/bearer/index.d.ts +1 -1
- package/dist/plugins/bearer/index.mjs +3 -3
- package/dist/plugins/captcha/index.d.cts +1 -1
- package/dist/plugins/captcha/index.d.mts +1 -1
- package/dist/plugins/captcha/index.d.ts +1 -1
- package/dist/plugins/custom-session/index.cjs +7 -9
- package/dist/plugins/custom-session/index.d.cts +1 -1
- package/dist/plugins/custom-session/index.d.mts +1 -1
- package/dist/plugins/custom-session/index.d.ts +1 -1
- package/dist/plugins/custom-session/index.mjs +7 -9
- package/dist/plugins/device-authorization/index.cjs +18 -50
- package/dist/plugins/device-authorization/index.d.cts +1 -1
- package/dist/plugins/device-authorization/index.d.mts +1 -1
- package/dist/plugins/device-authorization/index.d.ts +1 -1
- package/dist/plugins/device-authorization/index.mjs +18 -50
- package/dist/plugins/email-otp/index.cjs +20 -60
- package/dist/plugins/email-otp/index.d.cts +1 -1
- package/dist/plugins/email-otp/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.d.ts +1 -1
- package/dist/plugins/email-otp/index.mjs +20 -60
- package/dist/plugins/generic-oauth/index.cjs +24 -42
- package/dist/plugins/generic-oauth/index.d.cts +1 -1
- package/dist/plugins/generic-oauth/index.d.mts +1 -1
- package/dist/plugins/generic-oauth/index.d.ts +1 -1
- package/dist/plugins/generic-oauth/index.mjs +24 -42
- package/dist/plugins/haveibeenpwned/index.cjs +3 -3
- package/dist/plugins/haveibeenpwned/index.d.cts +1 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/haveibeenpwned/index.d.ts +1 -1
- package/dist/plugins/haveibeenpwned/index.mjs +3 -3
- package/dist/plugins/index.cjs +10 -9
- package/dist/plugins/index.d.cts +3 -3
- package/dist/plugins/index.d.mts +3 -3
- package/dist/plugins/index.d.ts +3 -3
- package/dist/plugins/index.mjs +12 -11
- package/dist/plugins/jwt/index.cjs +3 -3
- package/dist/plugins/jwt/index.d.cts +1 -1
- package/dist/plugins/jwt/index.d.mts +1 -1
- package/dist/plugins/jwt/index.d.ts +1 -1
- package/dist/plugins/jwt/index.mjs +3 -3
- package/dist/plugins/magic-link/index.cjs +20 -30
- package/dist/plugins/magic-link/index.mjs +20 -30
- package/dist/plugins/multi-session/index.cjs +5 -9
- package/dist/plugins/multi-session/index.d.cts +1 -1
- package/dist/plugins/multi-session/index.d.mts +1 -1
- package/dist/plugins/multi-session/index.d.ts +1 -1
- package/dist/plugins/multi-session/index.mjs +5 -9
- package/dist/plugins/oauth-proxy/index.cjs +8 -10
- package/dist/plugins/oauth-proxy/index.d.cts +2 -1
- package/dist/plugins/oauth-proxy/index.d.mts +2 -1
- package/dist/plugins/oauth-proxy/index.d.ts +2 -1
- package/dist/plugins/oauth-proxy/index.mjs +8 -10
- package/dist/plugins/oidc-provider/index.cjs +4 -4
- package/dist/plugins/oidc-provider/index.d.cts +9 -9
- package/dist/plugins/oidc-provider/index.d.mts +9 -9
- package/dist/plugins/oidc-provider/index.d.ts +9 -9
- package/dist/plugins/oidc-provider/index.mjs +4 -4
- package/dist/plugins/one-tap/index.cjs +6 -6
- package/dist/plugins/one-tap/index.mjs +6 -6
- package/dist/plugins/one-time-token/index.cjs +6 -6
- package/dist/plugins/one-time-token/index.d.cts +1 -1
- package/dist/plugins/one-time-token/index.d.mts +1 -1
- package/dist/plugins/one-time-token/index.d.ts +1 -1
- package/dist/plugins/one-time-token/index.mjs +6 -6
- package/dist/plugins/open-api/index.cjs +3 -3
- package/dist/plugins/open-api/index.d.cts +1 -1
- package/dist/plugins/open-api/index.d.mts +1 -1
- package/dist/plugins/open-api/index.d.ts +1 -1
- package/dist/plugins/open-api/index.mjs +3 -3
- package/dist/plugins/organization/access/index.d.cts +25 -25
- package/dist/plugins/organization/access/index.d.mts +25 -25
- package/dist/plugins/organization/access/index.d.ts +25 -25
- package/dist/plugins/organization/index.cjs +6 -6
- package/dist/plugins/organization/index.d.cts +77 -13
- package/dist/plugins/organization/index.d.mts +77 -13
- package/dist/plugins/organization/index.d.ts +77 -13
- package/dist/plugins/organization/index.mjs +6 -6
- package/dist/plugins/passkey/index.cjs +14 -18
- package/dist/plugins/passkey/index.d.cts +2 -2
- package/dist/plugins/passkey/index.d.mts +2 -2
- package/dist/plugins/passkey/index.d.ts +2 -2
- package/dist/plugins/passkey/index.mjs +14 -18
- package/dist/plugins/phone-number/index.cjs +23 -39
- package/dist/plugins/phone-number/index.d.cts +1 -1
- package/dist/plugins/phone-number/index.d.mts +1 -1
- package/dist/plugins/phone-number/index.d.ts +1 -1
- package/dist/plugins/phone-number/index.mjs +23 -39
- package/dist/plugins/siwe/index.cjs +3 -3
- package/dist/plugins/siwe/index.d.cts +1 -1
- package/dist/plugins/siwe/index.d.mts +1 -1
- package/dist/plugins/siwe/index.d.ts +1 -1
- package/dist/plugins/siwe/index.mjs +3 -3
- package/dist/plugins/sso/index.cjs +61 -87
- package/dist/plugins/sso/index.d.cts +3 -3
- package/dist/plugins/sso/index.d.mts +3 -3
- package/dist/plugins/sso/index.d.ts +3 -3
- package/dist/plugins/sso/index.mjs +61 -87
- package/dist/plugins/two-factor/index.cjs +18 -48
- package/dist/plugins/two-factor/index.d.cts +1 -1
- package/dist/plugins/two-factor/index.d.mts +1 -1
- package/dist/plugins/two-factor/index.d.ts +1 -1
- package/dist/plugins/two-factor/index.mjs +18 -48
- package/dist/plugins/username/index.cjs +31 -16
- package/dist/plugins/username/index.d.cts +3 -3
- package/dist/plugins/username/index.d.mts +3 -3
- package/dist/plugins/username/index.d.ts +3 -3
- package/dist/plugins/username/index.mjs +31 -16
- package/dist/shared/{better-auth.DNMTw_ds.d.ts → better-auth.6RZwqXI-.d.ts} +1 -1
- package/dist/shared/{better-auth.Btbv22jM.mjs → better-auth.7DsuGNVf.mjs} +5 -3
- package/dist/shared/{better-auth.C1AWk7z7.mjs → better-auth.AYS43XM1.mjs} +1 -1
- package/dist/shared/{better-auth.g33XFa_C.mjs → better-auth.B-3-wkBV.mjs} +167 -262
- package/dist/shared/{better-auth.BkcRiga0.cjs → better-auth.B-RhOtHf.cjs} +1 -1
- package/dist/shared/{better-auth.DTgTiHPJ.d.ts → better-auth.B1CNK_q_.d.ts} +1 -1
- package/dist/shared/{better-auth.BnOSz3eR.mjs → better-auth.BBFsjzvB.mjs} +2 -2
- package/dist/shared/{better-auth.Bhva6lEh.cjs → better-auth.BBk8MRta.cjs} +1 -1
- package/dist/shared/{better-auth.BYskLPvJ.d.ts → better-auth.BCHg51sY.d.ts} +1 -1
- package/dist/shared/{better-auth.C1Tqa_El.d.cts → better-auth.BTUgO__s.d.mts} +1 -1
- package/dist/shared/{better-auth.B5O-5tFi.cjs → better-auth.BclXpYOz.cjs} +5 -3
- package/dist/shared/{better-auth.DHi8l3iG.d.mts → better-auth.BeDYIF5-.d.mts} +1 -1
- package/dist/shared/{better-auth.yovXNUaS.d.cts → better-auth.BeOpqAwl.d.cts} +1 -1
- package/dist/shared/{better-auth.Brg-UO7k.d.ts → better-auth.BsnsCAjn.d.ts} +7 -7
- package/dist/shared/{better-auth.fV_ra52g.mjs → better-auth.C3bLnul-.mjs} +1 -1
- package/dist/shared/{better-auth.D6pGomIg.cjs → better-auth.C5s1d_o-.cjs} +75 -150
- package/dist/shared/{better-auth.C29_dxUJ.cjs → better-auth.CL5zQvRZ.cjs} +167 -262
- package/dist/shared/{better-auth.C0-0BnjK.d.mts → better-auth.CkCyjQ6r.d.mts} +1 -1
- package/dist/shared/{better-auth.CBY7cUGy.mjs → better-auth.Co88PbP3.mjs} +6 -10
- package/dist/shared/{better-auth.BPua9lvR.mjs → better-auth.D-4EtUes.mjs} +75 -150
- package/dist/shared/{better-auth.DXGtScCP.cjs → better-auth.D2444EHu.cjs} +2 -2
- package/dist/shared/{better-auth.DTyvXiMc.cjs → better-auth.DCOXb_2e.cjs} +48 -84
- package/dist/shared/{better-auth.DRukcsOo.d.mts → better-auth.DDOCnCqi.d.cts} +1 -1
- package/dist/shared/{better-auth.B1ufdjSo.mjs → better-auth.DFfA4Mzz.mjs} +5 -5
- package/dist/shared/{better-auth.CXM9s0dx.cjs → better-auth.DIfV2UBl.cjs} +1 -1
- package/dist/shared/{better-auth.spSlDaxD.cjs → better-auth.DP5SyJ_2.cjs} +68 -117
- package/dist/shared/{better-auth.DhsGZ30Q.cjs → better-auth.DUNU0obG.cjs} +1 -1
- package/dist/shared/{better-auth.Ddv1-cj-.mjs → better-auth.DUTxy-hg.mjs} +2 -2
- package/dist/shared/{better-auth.D07k8aB_.d.cts → better-auth.DY9WffSn.d.cts} +1 -1
- package/dist/shared/{better-auth.Bo_XNm3Z.mjs → better-auth.Df_5rmaV.mjs} +24 -48
- package/dist/shared/{better-auth.DL8idXrv.mjs → better-auth.DhQzyejE.mjs} +1 -1
- package/dist/shared/{better-auth.Gu1qAjVj.d.mts → better-auth.DhRmxPro.d.mts} +7 -7
- package/dist/shared/{better-auth.Bb_sp3q4.cjs → better-auth.DnBI2Nus.cjs} +5 -5
- package/dist/shared/{better-auth.Dsq5BCiY.mjs → better-auth.DteMRrRX.mjs} +68 -117
- package/dist/shared/{better-auth.demy6Fla.cjs → better-auth.DxN8-4Pz.cjs} +24 -48
- package/dist/shared/{better-auth.2jEckJ7k.cjs → better-auth.SS_wBML-.cjs} +2 -2
- package/dist/shared/{better-auth.3naUdTMW.mjs → better-auth.T3Ux10v9.mjs} +1 -1
- package/dist/shared/{better-auth.B1kKIM0o.d.cts → better-auth.U9CXSJA_.d.cts} +7 -7
- package/dist/shared/{better-auth.CvVm_hFg.cjs → better-auth.iE8wqp5_.cjs} +1 -1
- package/dist/shared/{better-auth.ffWeg50w.mjs → better-auth.msGOU0m9.mjs} +1 -1
- package/dist/shared/{better-auth.Cj28z0kQ.mjs → better-auth.vd9ibIsl.mjs} +48 -84
- package/dist/shared/{better-auth.CAcHGnwq.cjs → better-auth.wBgaxGEw.cjs} +6 -10
- package/dist/social-providers/index.cjs +3 -3
- package/dist/social-providers/index.mjs +3 -3
- package/dist/test-utils/index.cjs +11 -11
- package/dist/test-utils/index.d.cts +12 -12
- package/dist/test-utils/index.d.mts +12 -12
- package/dist/test-utils/index.d.ts +12 -12
- package/dist/test-utils/index.mjs +11 -11
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- 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.
|
|
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.
|
|
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.
|
|
7
|
-
import { s as setSessionCookie } from '../../shared/better-auth.
|
|
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().
|
|
79
|
-
|
|
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().
|
|
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().
|
|
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().
|
|
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().
|
|
352
|
-
|
|
353
|
-
|
|
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().
|
|
360
|
-
|
|
361
|
-
|
|
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().
|
|
639
|
-
|
|
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().
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
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.
|
|
5
|
-
const session = require('../../shared/better-auth.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
3
|
-
import { a as createAuthEndpoint } from '../../shared/better-auth.
|
|
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.
|
|
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.
|
|
6
|
-
const session = require('../../shared/better-auth.
|
|
7
|
-
const cookies_index = require('../../shared/better-auth.
|
|
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().
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
issuer: z__namespace.string().
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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()).
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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().
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
email: z__namespace.string().
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
emailVerified: z__namespace.string().
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
name: z__namespace.string().
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
image: z__namespace.string().
|
|
122
|
-
|
|
123
|
-
|
|
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().
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
overrideUserInfo: z__namespace.boolean().
|
|
130
|
-
|
|
131
|
-
|
|
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().
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
organizationSlug: z__namespace.string().
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
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.
|
|
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?: "
|
|
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.
|
|
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?: "
|
|
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.
|
|
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?: "
|
|
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.
|
|
4
|
-
import { a as createAuthEndpoint, s as sessionMiddleware } from '../../shared/better-auth.
|
|
5
|
-
import { s as setSessionCookie } from '../../shared/better-auth.
|
|
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().
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
issuer: z.string().
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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()).
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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().
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
email: z.string().
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
emailVerified: z.string().
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
name: z.string().
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
image: z.string().
|
|
106
|
-
|
|
107
|
-
|
|
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().
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
overrideUserInfo: z.boolean().
|
|
114
|
-
|
|
115
|
-
|
|
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().
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
organizationSlug: z.string().
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
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: {
|