better-auth 1.4.0-beta.3 → 1.4.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.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/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/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 +7 -6
- 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 +9 -8
- 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 +9 -9
- package/dist/client/react/index.d.mts +9 -9
- package/dist/client/react/index.d.ts +9 -9
- 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 +3 -3
- 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 +3 -3
- package/dist/cookies/index.cjs +2 -2
- 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 +2 -2
- package/dist/db/index.cjs +1 -1
- 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 +1 -1
- package/dist/index.cjs +7 -6
- package/dist/index.d.cts +9 -9
- package/dist/index.d.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.mjs +7 -6
- package/dist/integrations/next-js.cjs +6 -5
- 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 +6 -5
- 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 +6 -5
- 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 +6 -5
- package/dist/integrations/svelte-kit.cjs +5 -4
- 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 +5 -4
- package/dist/oauth2/index.cjs +5 -4
- 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 +5 -4
- package/dist/plugins/admin/index.cjs +6 -5
- package/dist/plugins/admin/index.d.cts +7 -6
- package/dist/plugins/admin/index.d.mts +7 -6
- package/dist/plugins/admin/index.d.ts +7 -6
- package/dist/plugins/admin/index.mjs +6 -5
- package/dist/plugins/anonymous/index.cjs +5 -4
- 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 +5 -4
- package/dist/plugins/bearer/index.cjs +5 -4
- 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 +5 -4
- package/dist/plugins/captcha/index.cjs +5 -4
- 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/captcha/index.mjs +5 -4
- package/dist/plugins/custom-session/index.cjs +11 -8
- 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 +11 -8
- package/dist/plugins/device-authorization/index.cjs +52 -19
- 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 +52 -19
- package/dist/plugins/email-otp/index.cjs +62 -21
- 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 +62 -21
- package/dist/plugins/generic-oauth/index.cjs +44 -25
- 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 +44 -25
- package/dist/plugins/haveibeenpwned/index.cjs +5 -4
- 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 +5 -4
- package/dist/plugins/index.cjs +11 -10
- package/dist/plugins/index.d.cts +6 -6
- package/dist/plugins/index.d.mts +6 -6
- package/dist/plugins/index.d.ts +6 -6
- package/dist/plugins/index.mjs +13 -12
- package/dist/plugins/jwt/index.cjs +5 -4
- 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 +5 -4
- package/dist/plugins/magic-link/index.cjs +32 -21
- package/dist/plugins/magic-link/index.mjs +32 -21
- package/dist/plugins/multi-session/index.cjs +11 -6
- 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 +11 -6
- package/dist/plugins/oauth-proxy/index.cjs +11 -6
- package/dist/plugins/oauth-proxy/index.d.cts +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.d.ts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +11 -6
- package/dist/plugins/oidc-provider/index.cjs +6 -5
- package/dist/plugins/oidc-provider/index.d.cts +5 -5
- package/dist/plugins/oidc-provider/index.d.mts +5 -5
- package/dist/plugins/oidc-provider/index.d.ts +5 -5
- package/dist/plugins/oidc-provider/index.mjs +6 -5
- package/dist/plugins/one-tap/index.cjs +8 -7
- package/dist/plugins/one-tap/index.mjs +8 -7
- package/dist/plugins/one-time-token/index.cjs +7 -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 +7 -6
- package/dist/plugins/open-api/index.cjs +5 -4
- 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 +5 -4
- package/dist/plugins/organization/index.cjs +7 -6
- package/dist/plugins/organization/index.d.cts +9 -9
- package/dist/plugins/organization/index.d.mts +9 -9
- package/dist/plugins/organization/index.d.ts +9 -9
- package/dist/plugins/organization/index.mjs +7 -6
- package/dist/plugins/passkey/index.cjs +17 -12
- package/dist/plugins/passkey/index.d.cts +1 -1
- package/dist/plugins/passkey/index.d.mts +1 -1
- package/dist/plugins/passkey/index.d.ts +1 -1
- package/dist/plugins/passkey/index.mjs +17 -12
- package/dist/plugins/phone-number/index.cjs +41 -24
- 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 +41 -24
- package/dist/plugins/siwe/index.cjs +5 -4
- 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 +5 -4
- package/dist/plugins/sso/index.cjs +89 -62
- 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 +89 -62
- package/dist/plugins/two-factor/index.cjs +50 -19
- 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 +50 -19
- package/dist/plugins/username/index.cjs +18 -11
- package/dist/plugins/username/index.d.cts +19 -19
- package/dist/plugins/username/index.d.mts +19 -19
- package/dist/plugins/username/index.d.ts +19 -19
- package/dist/plugins/username/index.mjs +18 -11
- package/dist/shared/{better-auth.CuyhlHls.cjs → better-auth.1iHKsGdY.cjs} +2 -2
- package/dist/shared/{better-auth.DyZUF2_t.d.ts → better-auth.3es9ZU_K.d.ts} +36 -37
- package/dist/shared/{better-auth.COdnr6eY.cjs → better-auth.B2Bmtu6f.cjs} +83 -47
- package/dist/shared/{better-auth.T3Ux10v9.mjs → better-auth.BAPVOPl3.mjs} +3 -3
- package/dist/shared/{better-auth.DxV4YGX3.mjs → better-auth.BAQSo96z.mjs} +6 -4
- package/dist/shared/{better-auth.cXemjp2M.mjs → better-auth.BHwIy11H.mjs} +83 -47
- package/dist/shared/{better-auth.B1Za4fb4.d.cts → better-auth.BLDIAFp8.d.cts} +5 -5
- package/dist/shared/{better-auth.DHiuXI9L.d.cts → better-auth.BOKSn3AP.d.cts} +36 -37
- package/dist/shared/{better-auth.ZC_QEMLv.d.cts → better-auth.BW0VS3vZ.d.cts} +1 -1
- package/dist/shared/{better-auth.DXd8qaHd.mjs → better-auth.Bc2H_kPB.mjs} +54 -28
- package/dist/shared/{better-auth.DhQzyejE.mjs → better-auth.BoY6Vo7c.mjs} +1 -1
- package/dist/shared/{better-auth.D1jaLDAW.mjs → better-auth.C-9OPnjJ.mjs} +151 -71
- package/dist/shared/{better-auth.A_lT_4ey.cjs → better-auth.C0WkvM-b.cjs} +151 -71
- package/dist/shared/{better-auth.iE8wqp5_.cjs → better-auth.C2xLgiCv.cjs} +1 -1
- package/dist/shared/{better-auth.Cdkx1UlR.cjs → better-auth.C4gSFtQb.cjs} +54 -28
- package/dist/shared/{better-auth.D3u5pPGf.d.ts → better-auth.CAc8m5ps.d.ts} +1 -1
- package/dist/shared/{better-auth.BUqsHDoX.d.ts → better-auth.CBpfh9gd.d.ts} +1 -1
- package/dist/shared/{better-auth.BUmFH1YH.d.mts → better-auth.CHakYG_s.d.mts} +5 -5
- package/dist/shared/{better-auth.Co88PbP3.mjs → better-auth.CIqzVuC5.mjs} +15 -9
- package/dist/shared/{better-auth.DL28hkwE.mjs → better-auth.CJk6lu9H.mjs} +5 -5
- package/dist/shared/{better-auth.wBgaxGEw.cjs → better-auth.CWoe8tep.cjs} +15 -9
- package/dist/shared/{better-auth.TQtfFmwt.mjs → better-auth.Cs4ObP2J.mjs} +246 -139
- package/dist/shared/{better-auth.BftmE2f4.mjs → better-auth.Cw2Wb5xl.mjs} +2 -2
- package/dist/shared/{better-auth.BTmQo2-r.mjs → better-auth.CyhdLtgz.mjs} +122 -54
- package/dist/shared/{better-auth.Cn3gHKIq.d.ts → better-auth.D1mfnXw8.d.ts} +5 -5
- package/dist/shared/better-auth.D2xndZ2p.mjs +5 -0
- package/dist/shared/{better-auth.LBYUF6qL.d.mts → better-auth.D63GoHoT.d.mts} +1 -1
- package/dist/shared/{better-auth.DrO1u8u7.cjs → better-auth.DVpUemsq.cjs} +49 -10
- package/dist/shared/{better-auth.CYRK2rir.cjs → better-auth.DcLnIy5M.cjs} +122 -54
- package/dist/shared/{better-auth.B-RhOtHf.cjs → better-auth.Df7v65t4.cjs} +3 -3
- package/dist/shared/{better-auth.g25nv4YL.mjs → better-auth.DpE8ZxDZ.mjs} +49 -10
- package/dist/shared/{better-auth.8am3GyvS.d.cts → better-auth.DqouI_5s.d.cts} +1 -1
- package/dist/shared/{better-auth.DRmln2Nr.cjs → better-auth.DxBcELEX.cjs} +6 -4
- package/dist/shared/{better-auth.BSU7i7gN.cjs → better-auth.Fhb5xDFB.cjs} +5 -5
- package/dist/shared/{better-auth.CNhgW39t.cjs → better-auth.W6wY8Xk1.cjs} +246 -139
- package/dist/shared/{better-auth.DIfV2UBl.cjs → better-auth.oHfRlmfe.cjs} +1 -1
- package/dist/shared/{better-auth.C3bLnul-.mjs → better-auth.pyHheoY8.mjs} +1 -1
- package/dist/shared/better-auth.uykCWCYS.cjs +7 -0
- package/dist/shared/{better-auth.DQBMcFsm.d.mts → better-auth.vNMd9aBC.d.mts} +36 -37
- package/dist/shared/{better-auth.BC_XVl81.d.mts → better-auth.x83uJ-Ru.d.mts} +1 -1
- package/dist/social-providers/index.cjs +5 -4
- package/dist/social-providers/index.mjs +5 -4
- package/dist/test-utils/index.cjs +10 -9
- package/dist/test-utils/index.d.cts +59 -57
- package/dist/test-utils/index.d.mts +59 -57
- package/dist/test-utils/index.d.ts +59 -57
- package/dist/test-utils/index.mjs +10 -9
- 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 +3 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import '../../shared/better-auth.
|
|
4
|
-
import { a as createAuthEndpoint, c as createAuthMiddleware } from '../../shared/better-auth.
|
|
5
|
-
import { s as setSessionCookie } from '../../shared/better-auth.
|
|
3
|
+
import '../../shared/better-auth.C-9OPnjJ.mjs';
|
|
4
|
+
import { a as createAuthEndpoint, c as createAuthMiddleware } from '../../shared/better-auth.CIqzVuC5.mjs';
|
|
5
|
+
import { s as setSessionCookie } from '../../shared/better-auth.pyHheoY8.mjs';
|
|
6
6
|
import '../../shared/better-auth.CJ2rnsDV.mjs';
|
|
7
7
|
import '../../shared/better-auth.CiuwFiHM.mjs';
|
|
8
8
|
import '../../shared/better-auth.C4g12FAA.mjs';
|
|
@@ -19,7 +19,7 @@ import '@noble/ciphers/utils.js';
|
|
|
19
19
|
import '@noble/hashes/scrypt.js';
|
|
20
20
|
import '@better-auth/utils/hex';
|
|
21
21
|
import '@noble/hashes/utils.js';
|
|
22
|
-
import '../../shared/better-auth.
|
|
22
|
+
import '../../shared/better-auth.BAQSo96z.mjs';
|
|
23
23
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
24
24
|
import 'jose/errors';
|
|
25
25
|
import '@better-auth/utils/random';
|
|
@@ -28,6 +28,7 @@ import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
|
28
28
|
import '@better-auth/utils/hmac';
|
|
29
29
|
import '@better-auth/utils/binary';
|
|
30
30
|
import 'defu';
|
|
31
|
+
import '../../shared/better-auth.D2xndZ2p.mjs';
|
|
31
32
|
|
|
32
33
|
const defaultKeyHasher = async (otp) => {
|
|
33
34
|
const hash = await createHash("SHA-256").digest(
|
|
@@ -123,8 +124,12 @@ const emailOTP = (options) => {
|
|
|
123
124
|
{
|
|
124
125
|
method: "POST",
|
|
125
126
|
body: z.object({
|
|
126
|
-
email: z.string({}).
|
|
127
|
-
|
|
127
|
+
email: z.string({}).meta({
|
|
128
|
+
description: "Email address to send the OTP"
|
|
129
|
+
}),
|
|
130
|
+
type: z.enum(types).meta({
|
|
131
|
+
description: "Type of the OTP"
|
|
132
|
+
})
|
|
128
133
|
}),
|
|
129
134
|
metadata: {
|
|
130
135
|
openapi: {
|
|
@@ -247,8 +252,13 @@ const emailOTP = (options) => {
|
|
|
247
252
|
{
|
|
248
253
|
method: "POST",
|
|
249
254
|
body: z.object({
|
|
250
|
-
email: z.string({}).
|
|
251
|
-
|
|
255
|
+
email: z.string({}).meta({
|
|
256
|
+
description: "Email address to send the OTP"
|
|
257
|
+
}),
|
|
258
|
+
type: z.enum(types).meta({
|
|
259
|
+
required: true,
|
|
260
|
+
description: "Type of the OTP"
|
|
261
|
+
})
|
|
252
262
|
}),
|
|
253
263
|
metadata: {
|
|
254
264
|
SERVER_ONLY: true,
|
|
@@ -301,8 +311,13 @@ const emailOTP = (options) => {
|
|
|
301
311
|
{
|
|
302
312
|
method: "GET",
|
|
303
313
|
query: z.object({
|
|
304
|
-
email: z.string({}).
|
|
305
|
-
|
|
314
|
+
email: z.string({}).meta({
|
|
315
|
+
description: "Email address the OTP was sent to"
|
|
316
|
+
}),
|
|
317
|
+
type: z.enum(types).meta({
|
|
318
|
+
required: true,
|
|
319
|
+
description: "Type of the OTP"
|
|
320
|
+
})
|
|
306
321
|
}),
|
|
307
322
|
metadata: {
|
|
308
323
|
SERVER_ONLY: true,
|
|
@@ -381,9 +396,17 @@ const emailOTP = (options) => {
|
|
|
381
396
|
{
|
|
382
397
|
method: "POST",
|
|
383
398
|
body: z.object({
|
|
384
|
-
email: z.string().
|
|
385
|
-
|
|
386
|
-
|
|
399
|
+
email: z.string().meta({
|
|
400
|
+
description: "Email address the OTP was sent to"
|
|
401
|
+
}),
|
|
402
|
+
type: z.enum(types).meta({
|
|
403
|
+
required: true,
|
|
404
|
+
description: "Type of the OTP"
|
|
405
|
+
}),
|
|
406
|
+
otp: z.string().meta({
|
|
407
|
+
required: true,
|
|
408
|
+
description: "OTP to verify"
|
|
409
|
+
})
|
|
387
410
|
}),
|
|
388
411
|
metadata: {
|
|
389
412
|
openapi: {
|
|
@@ -486,8 +509,13 @@ const emailOTP = (options) => {
|
|
|
486
509
|
{
|
|
487
510
|
method: "POST",
|
|
488
511
|
body: z.object({
|
|
489
|
-
email: z.string({}).
|
|
490
|
-
|
|
512
|
+
email: z.string({}).meta({
|
|
513
|
+
description: "Email address to verify"
|
|
514
|
+
}),
|
|
515
|
+
otp: z.string().meta({
|
|
516
|
+
required: true,
|
|
517
|
+
description: "OTP to verify"
|
|
518
|
+
})
|
|
491
519
|
}),
|
|
492
520
|
metadata: {
|
|
493
521
|
openapi: {
|
|
@@ -646,8 +674,13 @@ const emailOTP = (options) => {
|
|
|
646
674
|
{
|
|
647
675
|
method: "POST",
|
|
648
676
|
body: z.object({
|
|
649
|
-
email: z.string({}).
|
|
650
|
-
|
|
677
|
+
email: z.string({}).meta({
|
|
678
|
+
description: "Email address to sign in"
|
|
679
|
+
}),
|
|
680
|
+
otp: z.string().meta({
|
|
681
|
+
required: true,
|
|
682
|
+
description: "OTP sent to the email"
|
|
683
|
+
})
|
|
651
684
|
}),
|
|
652
685
|
metadata: {
|
|
653
686
|
openapi: {
|
|
@@ -806,7 +839,9 @@ const emailOTP = (options) => {
|
|
|
806
839
|
{
|
|
807
840
|
method: "POST",
|
|
808
841
|
body: z.object({
|
|
809
|
-
email: z.string().
|
|
842
|
+
email: z.string().meta({
|
|
843
|
+
description: "Email address to send the OTP"
|
|
844
|
+
})
|
|
810
845
|
}),
|
|
811
846
|
metadata: {
|
|
812
847
|
openapi: {
|
|
@@ -883,9 +918,15 @@ const emailOTP = (options) => {
|
|
|
883
918
|
{
|
|
884
919
|
method: "POST",
|
|
885
920
|
body: z.object({
|
|
886
|
-
email: z.string().
|
|
887
|
-
|
|
888
|
-
|
|
921
|
+
email: z.string().meta({
|
|
922
|
+
description: "Email address to reset the password"
|
|
923
|
+
}),
|
|
924
|
+
otp: z.string().meta({
|
|
925
|
+
description: "OTP sent to the email"
|
|
926
|
+
}),
|
|
927
|
+
password: z.string().meta({
|
|
928
|
+
description: "New password"
|
|
929
|
+
})
|
|
889
930
|
}),
|
|
890
931
|
metadata: {
|
|
891
932
|
openapi: {
|
|
@@ -4,9 +4,9 @@ const fetch = require('@better-fetch/fetch');
|
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
5
|
const jose = require('jose');
|
|
6
6
|
const z = require('zod');
|
|
7
|
-
const socialProviders_index = require('../../shared/better-auth.
|
|
8
|
-
const session = require('../../shared/better-auth.
|
|
9
|
-
const cookies_index = require('../../shared/better-auth.
|
|
7
|
+
const socialProviders_index = require('../../shared/better-auth.C0WkvM-b.cjs');
|
|
8
|
+
const session = require('../../shared/better-auth.CWoe8tep.cjs');
|
|
9
|
+
const cookies_index = require('../../shared/better-auth.oHfRlmfe.cjs');
|
|
10
10
|
require('../../shared/better-auth.DcYLM7Us.cjs');
|
|
11
11
|
require('../../shared/better-auth.B6fIklBU.cjs');
|
|
12
12
|
require('../../shared/better-auth.DTvRBuq4.cjs');
|
|
@@ -21,7 +21,7 @@ require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
|
21
21
|
require('../../shared/better-auth.C1hdVENX.cjs');
|
|
22
22
|
require('../../crypto/index.cjs');
|
|
23
23
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
24
|
-
require('../../shared/better-auth.
|
|
24
|
+
require('../../shared/better-auth.DxBcELEX.cjs');
|
|
25
25
|
require('jose/errors');
|
|
26
26
|
require('@better-auth/utils/random');
|
|
27
27
|
require('../../shared/better-auth.DgMx7bVs.cjs');
|
|
@@ -29,6 +29,7 @@ require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
|
29
29
|
require('@better-auth/utils/hmac');
|
|
30
30
|
require('@better-auth/utils/binary');
|
|
31
31
|
require('defu');
|
|
32
|
+
require('../../shared/better-auth.uykCWCYS.cjs');
|
|
32
33
|
|
|
33
34
|
function _interopNamespaceCompat(e) {
|
|
34
35
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
@@ -207,19 +208,27 @@ const genericOAuth = (options) => {
|
|
|
207
208
|
{
|
|
208
209
|
method: "POST",
|
|
209
210
|
body: z__namespace.object({
|
|
210
|
-
providerId: z__namespace.string().
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
"The URL to redirect to after
|
|
215
|
-
).optional(),
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
).
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
).
|
|
211
|
+
providerId: z__namespace.string().meta({
|
|
212
|
+
description: "The provider ID for the OAuth provider"
|
|
213
|
+
}),
|
|
214
|
+
callbackURL: z__namespace.string().meta({
|
|
215
|
+
description: "The URL to redirect to after sign in"
|
|
216
|
+
}).optional(),
|
|
217
|
+
errorCallbackURL: z__namespace.string().meta({
|
|
218
|
+
description: "The URL to redirect to if an error occurs"
|
|
219
|
+
}).optional(),
|
|
220
|
+
newUserCallbackURL: z__namespace.string().meta({
|
|
221
|
+
description: 'The URL to redirect to after login if the user is new. Eg: "/welcome"'
|
|
222
|
+
}).optional(),
|
|
223
|
+
disableRedirect: z__namespace.boolean().meta({
|
|
224
|
+
description: "Disable redirect"
|
|
225
|
+
}).optional(),
|
|
226
|
+
scopes: z__namespace.array(z__namespace.string()).meta({
|
|
227
|
+
description: "Scopes to be passed to the provider authorization request."
|
|
228
|
+
}).optional(),
|
|
229
|
+
requestSignUp: z__namespace.boolean().meta({
|
|
230
|
+
description: "Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider. Eg: false"
|
|
231
|
+
}).optional()
|
|
223
232
|
}),
|
|
224
233
|
metadata: {
|
|
225
234
|
openapi: {
|
|
@@ -333,10 +342,18 @@ const genericOAuth = (options) => {
|
|
|
333
342
|
{
|
|
334
343
|
method: "GET",
|
|
335
344
|
query: z__namespace.object({
|
|
336
|
-
code: z__namespace.string().
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
345
|
+
code: z__namespace.string().meta({
|
|
346
|
+
description: "The OAuth2 code"
|
|
347
|
+
}).optional(),
|
|
348
|
+
error: z__namespace.string().meta({
|
|
349
|
+
description: "The error message, if any"
|
|
350
|
+
}).optional(),
|
|
351
|
+
error_description: z__namespace.string().meta({
|
|
352
|
+
description: "The error description, if any"
|
|
353
|
+
}).optional(),
|
|
354
|
+
state: z__namespace.string().meta({
|
|
355
|
+
description: "The state parameter from the OAuth2 request"
|
|
356
|
+
}).optional()
|
|
340
357
|
}),
|
|
341
358
|
metadata: {
|
|
342
359
|
client: false,
|
|
@@ -580,13 +597,15 @@ const genericOAuth = (options) => {
|
|
|
580
597
|
* This is useful for requesting additional permissions when
|
|
581
598
|
* linking a social account compared to the initial authentication.
|
|
582
599
|
*/
|
|
583
|
-
scopes: z__namespace.array(z__namespace.string()).
|
|
600
|
+
scopes: z__namespace.array(z__namespace.string()).meta({
|
|
601
|
+
description: "Additional scopes to request when linking the account"
|
|
602
|
+
}).optional(),
|
|
584
603
|
/**
|
|
585
604
|
* The URL to redirect to if there is an error during the link process.
|
|
586
605
|
*/
|
|
587
|
-
errorCallbackURL: z__namespace.string().
|
|
588
|
-
"The URL to redirect to if there is an error during the link process"
|
|
589
|
-
).optional()
|
|
606
|
+
errorCallbackURL: z__namespace.string().meta({
|
|
607
|
+
description: "The URL to redirect to if there is an error during the link process"
|
|
608
|
+
}).optional()
|
|
590
609
|
}),
|
|
591
610
|
use: [session.sessionMiddleware],
|
|
592
611
|
metadata: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { O as OAuth2Tokens, a as OAuth2UserInfo, b as OAuthProvider, P as ProviderOptions } from '../../shared/better-auth.v_lf-jeY.cjs';
|
|
3
|
-
import { U as User, d as AuthContext } from '../../shared/better-auth.
|
|
3
|
+
import { U as User, d as AuthContext } from '../../shared/better-auth.BOKSn3AP.cjs';
|
|
4
4
|
import * as z from 'zod';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.cjs';
|
|
6
6
|
import 'kysely';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { O as OAuth2Tokens, a as OAuth2UserInfo, b as OAuthProvider, P as ProviderOptions } from '../../shared/better-auth.XefKa8DI.mjs';
|
|
3
|
-
import { U as User, d as AuthContext } from '../../shared/better-auth.
|
|
3
|
+
import { U as User, d as AuthContext } from '../../shared/better-auth.vNMd9aBC.mjs';
|
|
4
4
|
import * as z from 'zod';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.mjs';
|
|
6
6
|
import 'kysely';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { O as OAuth2Tokens, a as OAuth2UserInfo, b as OAuthProvider, P as ProviderOptions } from '../../shared/better-auth.4SXCyo06.js';
|
|
3
|
-
import { U as User, d as AuthContext } from '../../shared/better-auth.
|
|
3
|
+
import { U as User, d as AuthContext } from '../../shared/better-auth.3es9ZU_K.js';
|
|
4
4
|
import * as z from 'zod';
|
|
5
5
|
import '../../shared/better-auth.DTtXpZYr.js';
|
|
6
6
|
import 'kysely';
|
|
@@ -2,9 +2,9 @@ import { betterFetch } from '@better-fetch/fetch';
|
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
3
|
import { decodeJwt } from 'jose';
|
|
4
4
|
import * as z from 'zod';
|
|
5
|
-
import { g as generateState, c as createAuthorizationURL, p as parseState, v as validateAuthorizationCode, j as handleOAuthUserInfo, r as refreshAccessToken } from '../../shared/better-auth.
|
|
6
|
-
import { a as createAuthEndpoint, s as sessionMiddleware, B as BASE_ERROR_CODES } from '../../shared/better-auth.
|
|
7
|
-
import { s as setSessionCookie } from '../../shared/better-auth.
|
|
5
|
+
import { g as generateState, c as createAuthorizationURL, p as parseState, v as validateAuthorizationCode, j as handleOAuthUserInfo, r as refreshAccessToken } from '../../shared/better-auth.C-9OPnjJ.mjs';
|
|
6
|
+
import { a as createAuthEndpoint, s as sessionMiddleware, B as BASE_ERROR_CODES } from '../../shared/better-auth.CIqzVuC5.mjs';
|
|
7
|
+
import { s as setSessionCookie } from '../../shared/better-auth.pyHheoY8.mjs';
|
|
8
8
|
import '../../shared/better-auth.CJ2rnsDV.mjs';
|
|
9
9
|
import '../../shared/better-auth.CiuwFiHM.mjs';
|
|
10
10
|
import '../../shared/better-auth.C4g12FAA.mjs';
|
|
@@ -19,7 +19,7 @@ import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
|
19
19
|
import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
20
20
|
import '../../crypto/index.mjs';
|
|
21
21
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
22
|
-
import '../../shared/better-auth.
|
|
22
|
+
import '../../shared/better-auth.BAQSo96z.mjs';
|
|
23
23
|
import 'jose/errors';
|
|
24
24
|
import '@better-auth/utils/random';
|
|
25
25
|
import '../../shared/better-auth.CvNZNAOW.mjs';
|
|
@@ -27,6 +27,7 @@ import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
|
27
27
|
import '@better-auth/utils/hmac';
|
|
28
28
|
import '@better-auth/utils/binary';
|
|
29
29
|
import 'defu';
|
|
30
|
+
import '../../shared/better-auth.D2xndZ2p.mjs';
|
|
30
31
|
|
|
31
32
|
async function getUserInfo(tokens, finalUserInfoUrl) {
|
|
32
33
|
if (tokens.idToken) {
|
|
@@ -191,19 +192,27 @@ const genericOAuth = (options) => {
|
|
|
191
192
|
{
|
|
192
193
|
method: "POST",
|
|
193
194
|
body: z.object({
|
|
194
|
-
providerId: z.string().
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
"The URL to redirect to after
|
|
199
|
-
).optional(),
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
).
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
).
|
|
195
|
+
providerId: z.string().meta({
|
|
196
|
+
description: "The provider ID for the OAuth provider"
|
|
197
|
+
}),
|
|
198
|
+
callbackURL: z.string().meta({
|
|
199
|
+
description: "The URL to redirect to after sign in"
|
|
200
|
+
}).optional(),
|
|
201
|
+
errorCallbackURL: z.string().meta({
|
|
202
|
+
description: "The URL to redirect to if an error occurs"
|
|
203
|
+
}).optional(),
|
|
204
|
+
newUserCallbackURL: z.string().meta({
|
|
205
|
+
description: 'The URL to redirect to after login if the user is new. Eg: "/welcome"'
|
|
206
|
+
}).optional(),
|
|
207
|
+
disableRedirect: z.boolean().meta({
|
|
208
|
+
description: "Disable redirect"
|
|
209
|
+
}).optional(),
|
|
210
|
+
scopes: z.array(z.string()).meta({
|
|
211
|
+
description: "Scopes to be passed to the provider authorization request."
|
|
212
|
+
}).optional(),
|
|
213
|
+
requestSignUp: z.boolean().meta({
|
|
214
|
+
description: "Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider. Eg: false"
|
|
215
|
+
}).optional()
|
|
207
216
|
}),
|
|
208
217
|
metadata: {
|
|
209
218
|
openapi: {
|
|
@@ -317,10 +326,18 @@ const genericOAuth = (options) => {
|
|
|
317
326
|
{
|
|
318
327
|
method: "GET",
|
|
319
328
|
query: z.object({
|
|
320
|
-
code: z.string().
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
329
|
+
code: z.string().meta({
|
|
330
|
+
description: "The OAuth2 code"
|
|
331
|
+
}).optional(),
|
|
332
|
+
error: z.string().meta({
|
|
333
|
+
description: "The error message, if any"
|
|
334
|
+
}).optional(),
|
|
335
|
+
error_description: z.string().meta({
|
|
336
|
+
description: "The error description, if any"
|
|
337
|
+
}).optional(),
|
|
338
|
+
state: z.string().meta({
|
|
339
|
+
description: "The state parameter from the OAuth2 request"
|
|
340
|
+
}).optional()
|
|
324
341
|
}),
|
|
325
342
|
metadata: {
|
|
326
343
|
client: false,
|
|
@@ -564,13 +581,15 @@ const genericOAuth = (options) => {
|
|
|
564
581
|
* This is useful for requesting additional permissions when
|
|
565
582
|
* linking a social account compared to the initial authentication.
|
|
566
583
|
*/
|
|
567
|
-
scopes: z.array(z.string()).
|
|
584
|
+
scopes: z.array(z.string()).meta({
|
|
585
|
+
description: "Additional scopes to request when linking the account"
|
|
586
|
+
}).optional(),
|
|
568
587
|
/**
|
|
569
588
|
* The URL to redirect to if there is an error during the link process.
|
|
570
589
|
*/
|
|
571
|
-
errorCallbackURL: z.string().
|
|
572
|
-
"The URL to redirect to if there is an error during the link process"
|
|
573
|
-
).optional()
|
|
590
|
+
errorCallbackURL: z.string().meta({
|
|
591
|
+
description: "The URL to redirect to if there is an error during the link process"
|
|
592
|
+
}).optional()
|
|
574
593
|
}),
|
|
575
594
|
use: [sessionMiddleware],
|
|
576
595
|
metadata: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const betterCall = require('better-call');
|
|
4
|
-
require('../../shared/better-auth.
|
|
5
|
-
require('../../shared/better-auth.
|
|
4
|
+
require('../../shared/better-auth.C0WkvM-b.cjs');
|
|
5
|
+
require('../../shared/better-auth.CWoe8tep.cjs');
|
|
6
6
|
require('zod');
|
|
7
7
|
require('../../shared/better-auth.B6fIklBU.cjs');
|
|
8
8
|
require('@better-auth/utils/base64');
|
|
@@ -23,12 +23,13 @@ require('@noble/hashes/utils.js');
|
|
|
23
23
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
24
24
|
require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
25
25
|
require('@better-auth/utils/random');
|
|
26
|
-
require('../../shared/better-auth.
|
|
27
|
-
require('../../shared/better-auth.
|
|
26
|
+
require('../../shared/better-auth.DxBcELEX.cjs');
|
|
27
|
+
require('../../shared/better-auth.oHfRlmfe.cjs');
|
|
28
28
|
require('../../shared/better-auth.DgMx7bVs.cjs');
|
|
29
29
|
require('jose/errors');
|
|
30
30
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
31
31
|
require('defu');
|
|
32
|
+
require('../../shared/better-auth.uykCWCYS.cjs');
|
|
32
33
|
|
|
33
34
|
const ERROR_CODES = {
|
|
34
35
|
PASSWORD_COMPROMISED: "The password you entered has been compromised. Please choose a different password."
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as AuthContext, g as checkPassword } from '../../shared/better-auth.
|
|
1
|
+
import { d as AuthContext, g as checkPassword } from '../../shared/better-auth.BOKSn3AP.cjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import '../../shared/better-auth.v_lf-jeY.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as AuthContext, g as checkPassword } from '../../shared/better-auth.
|
|
1
|
+
import { d as AuthContext, g as checkPassword } from '../../shared/better-auth.vNMd9aBC.mjs';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import '../../shared/better-auth.XefKa8DI.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as AuthContext, g as checkPassword } from '../../shared/better-auth.
|
|
1
|
+
import { d as AuthContext, g as checkPassword } from '../../shared/better-auth.3es9ZU_K.js';
|
|
2
2
|
import 'kysely';
|
|
3
3
|
import 'better-call';
|
|
4
4
|
import '../../shared/better-auth.4SXCyo06.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIError } from 'better-call';
|
|
2
|
-
import '../../shared/better-auth.
|
|
3
|
-
import '../../shared/better-auth.
|
|
2
|
+
import '../../shared/better-auth.C-9OPnjJ.mjs';
|
|
3
|
+
import '../../shared/better-auth.CIqzVuC5.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../../shared/better-auth.CiuwFiHM.mjs';
|
|
6
6
|
import '@better-auth/utils/base64';
|
|
@@ -21,12 +21,13 @@ import '@noble/hashes/utils.js';
|
|
|
21
21
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
22
22
|
import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
23
23
|
import '@better-auth/utils/random';
|
|
24
|
-
import '../../shared/better-auth.
|
|
25
|
-
import '../../shared/better-auth.
|
|
24
|
+
import '../../shared/better-auth.BAQSo96z.mjs';
|
|
25
|
+
import '../../shared/better-auth.pyHheoY8.mjs';
|
|
26
26
|
import '../../shared/better-auth.CvNZNAOW.mjs';
|
|
27
27
|
import 'jose/errors';
|
|
28
28
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
29
29
|
import 'defu';
|
|
30
|
+
import '../../shared/better-auth.D2xndZ2p.mjs';
|
|
30
31
|
|
|
31
32
|
const ERROR_CODES = {
|
|
32
33
|
PASSWORD_COMPROMISED: "The password you entered has been compromised. Please choose a different password."
|
package/dist/plugins/index.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const organization = require('../shared/better-auth.
|
|
3
|
+
const organization = require('../shared/better-auth.W6wY8Xk1.cjs');
|
|
4
4
|
const plugins_twoFactor_index = require('./two-factor/index.cjs');
|
|
5
5
|
const plugins_username_index = require('./username/index.cjs');
|
|
6
6
|
const plugins_bearer_index = require('./bearer/index.cjs');
|
|
7
|
-
const session = require('../shared/better-auth.
|
|
8
|
-
const socialProviders_index = require('../shared/better-auth.
|
|
7
|
+
const session = require('../shared/better-auth.CWoe8tep.cjs');
|
|
8
|
+
const socialProviders_index = require('../shared/better-auth.C0WkvM-b.cjs');
|
|
9
9
|
const plugins_magicLink_index = require('./magic-link/index.cjs');
|
|
10
10
|
const plugins_phoneNumber_index = require('./phone-number/index.cjs');
|
|
11
11
|
const plugins_anonymous_index = require('./anonymous/index.cjs');
|
|
12
|
-
const admin = require('../shared/better-auth.
|
|
12
|
+
const admin = require('../shared/better-auth.DcLnIy5M.cjs');
|
|
13
13
|
const plugins_genericOauth_index = require('./generic-oauth/index.cjs');
|
|
14
14
|
const plugins_jwt_index = require('./jwt/index.cjs');
|
|
15
15
|
const plugins_multiSession_index = require('./multi-session/index.cjs');
|
|
@@ -18,9 +18,9 @@ const plugins_oneTap_index = require('./one-tap/index.cjs');
|
|
|
18
18
|
const plugins_oauthProxy_index = require('./oauth-proxy/index.cjs');
|
|
19
19
|
const plugins_customSession_index = require('./custom-session/index.cjs');
|
|
20
20
|
const plugins_openApi_index = require('./open-api/index.cjs');
|
|
21
|
-
const plugins_oidcProvider_index = require('../shared/better-auth.
|
|
21
|
+
const plugins_oidcProvider_index = require('../shared/better-auth.C4gSFtQb.cjs');
|
|
22
22
|
const plugins_captcha_index = require('./captcha/index.cjs');
|
|
23
|
-
const plugins_oneTimeToken_index = require('../shared/better-auth.
|
|
23
|
+
const plugins_oneTimeToken_index = require('../shared/better-auth.B2Bmtu6f.cjs');
|
|
24
24
|
const plugins_haveibeenpwned_index = require('./haveibeenpwned/index.cjs');
|
|
25
25
|
const z = require('zod');
|
|
26
26
|
const betterCall = require('better-call');
|
|
@@ -28,11 +28,11 @@ const env = require('../shared/better-auth.B6fIklBU.cjs');
|
|
|
28
28
|
const base64 = require('@better-auth/utils/base64');
|
|
29
29
|
require('@better-auth/utils/hmac');
|
|
30
30
|
const logger = require('../shared/better-auth.DTvRBuq4.cjs');
|
|
31
|
-
const url = require('../shared/better-auth.
|
|
31
|
+
const url = require('../shared/better-auth.DxBcELEX.cjs');
|
|
32
32
|
require('@better-auth/utils/binary');
|
|
33
|
-
const cookies_index = require('../shared/better-auth.
|
|
33
|
+
const cookies_index = require('../shared/better-auth.oHfRlmfe.cjs');
|
|
34
34
|
require('../shared/better-auth.DcYLM7Us.cjs');
|
|
35
|
-
require('../shared/better-auth.
|
|
35
|
+
require('../shared/better-auth.1iHKsGdY.cjs');
|
|
36
36
|
require('./organization/access/index.cjs');
|
|
37
37
|
require('@better-auth/utils/random');
|
|
38
38
|
const hash = require('@better-auth/utils/hash');
|
|
@@ -57,6 +57,7 @@ const client$1 = require('../shared/better-auth.BMgeJg3r.cjs');
|
|
|
57
57
|
require('../shared/better-auth.C1hdVENX.cjs');
|
|
58
58
|
require('../shared/better-auth.ANpbi45u.cjs');
|
|
59
59
|
require('../shared/better-auth.DUNU0obG.cjs');
|
|
60
|
+
require('../shared/better-auth.uykCWCYS.cjs');
|
|
60
61
|
require('../shared/better-auth.CqRypKVa.cjs');
|
|
61
62
|
require('../shared/better-auth.CsC4FSOQ.cjs');
|
|
62
63
|
require('../crypto/index.cjs');
|
|
@@ -427,7 +428,7 @@ const mcp = (options) => {
|
|
|
427
428
|
return c.json(metadata);
|
|
428
429
|
}
|
|
429
430
|
),
|
|
430
|
-
|
|
431
|
+
mcpOAuthAuthorize: session.createAuthEndpoint(
|
|
431
432
|
"/mcp/authorize",
|
|
432
433
|
{
|
|
433
434
|
method: "GET",
|
package/dist/plugins/index.d.cts
CHANGED
|
@@ -3,8 +3,8 @@ export { adminAc, defaultAc, defaultRoles, defaultStatements, memberAc, ownerAc
|
|
|
3
3
|
export { TWO_FACTOR_ERROR_CODES, TwoFactorOptions, TwoFactorProvider, TwoFactorTable, UserWithTwoFactor, twoFactor, twoFactorClient } from './two-factor/index.cjs';
|
|
4
4
|
export { USERNAME_ERROR_CODES, UsernameOptions, username } from './username/index.cjs';
|
|
5
5
|
export { bearer } from './bearer/index.cjs';
|
|
6
|
-
import { G as GenericEndpointContext, B as BetterAuthOptions, d as AuthContext } from '../shared/better-auth.
|
|
7
|
-
export { z as AuthEndpoint, D as AuthMiddleware, v as AuthPluginSchema, n as BetterAuthPlugin, I as InferOptionSchema, p as InferPluginErrorCodes, y as createAuthEndpoint, x as createAuthMiddleware, w as optionsMiddleware } from '../shared/better-auth.
|
|
6
|
+
import { G as GenericEndpointContext, B as BetterAuthOptions, d as AuthContext } from '../shared/better-auth.BOKSn3AP.cjs';
|
|
7
|
+
export { z as AuthEndpoint, D as AuthMiddleware, v as AuthPluginSchema, n as BetterAuthPlugin, I as InferOptionSchema, p as InferPluginErrorCodes, y as createAuthEndpoint, x as createAuthMiddleware, w as optionsMiddleware } from '../shared/better-auth.BOKSn3AP.cjs';
|
|
8
8
|
export { H as HIDE_METADATA } from '../shared/better-auth.DEHJp1rk.cjs';
|
|
9
9
|
export { magicLink } from './magic-link/index.cjs';
|
|
10
10
|
export { PhoneNumberOptions, UserWithPhoneNumber, phoneNumber } from './phone-number/index.cjs';
|
|
@@ -21,7 +21,7 @@ export { OpenAPIOptions, Path, generator, openAPI } from './open-api/index.cjs';
|
|
|
21
21
|
import { OIDCOptions, OIDCMetadata, OAuthAccessToken } from './oidc-provider/index.cjs';
|
|
22
22
|
export { AuthorizationQuery, Client, CodeVerificationValue, TokenBody, getClient, getMetadata, oidcProvider } from './oidc-provider/index.cjs';
|
|
23
23
|
export { captcha } from './captcha/index.cjs';
|
|
24
|
-
export { A as API_KEY_TABLE_NAME, E as ERROR_CODES, a as apiKey, d as defaultKeyHasher } from '../shared/better-auth.
|
|
24
|
+
export { A as API_KEY_TABLE_NAME, E as ERROR_CODES, a as apiKey, d as defaultKeyHasher } from '../shared/better-auth.BLDIAFp8.cjs';
|
|
25
25
|
export { HaveIBeenPwnedOptions, haveIBeenPwned } from './haveibeenpwned/index.cjs';
|
|
26
26
|
export { oneTimeToken } from './one-time-token/index.cjs';
|
|
27
27
|
import * as better_call from 'better-call';
|
|
@@ -146,7 +146,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
146
146
|
};
|
|
147
147
|
path: "/.well-known/oauth-protected-resource";
|
|
148
148
|
};
|
|
149
|
-
|
|
149
|
+
mcpOAuthAuthorize: {
|
|
150
150
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
|
|
151
151
|
body?: undefined;
|
|
152
152
|
} & {
|
|
@@ -266,7 +266,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
266
266
|
redirect_uris: string[];
|
|
267
267
|
token_endpoint_auth_method?: "none" | "client_secret_basic" | "client_secret_post" | undefined;
|
|
268
268
|
grant_types?: ("authorization_code" | "password" | "refresh_token" | "implicit" | "client_credentials" | "urn:ietf:params:oauth:grant-type:jwt-bearer" | "urn:ietf:params:oauth:grant-type:saml2-bearer")[] | undefined;
|
|
269
|
-
response_types?: ("
|
|
269
|
+
response_types?: ("code" | "token")[] | undefined;
|
|
270
270
|
client_name?: string | undefined;
|
|
271
271
|
client_uri?: string | undefined;
|
|
272
272
|
logo_uri?: string | undefined;
|
|
@@ -322,8 +322,8 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
322
322
|
"urn:ietf:params:oauth:grant-type:saml2-bearer": "urn:ietf:params:oauth:grant-type:saml2-bearer";
|
|
323
323
|
}>>>>;
|
|
324
324
|
response_types: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
325
|
-
token: "token";
|
|
326
325
|
code: "code";
|
|
326
|
+
token: "token";
|
|
327
327
|
}>>>>;
|
|
328
328
|
client_name: z.ZodOptional<z.ZodString>;
|
|
329
329
|
client_uri: z.ZodOptional<z.ZodString>;
|