better-auth 1.3.1 → 1.3.2
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 +2 -2
- package/dist/adapters/drizzle-adapter/index.d.mts +2 -2
- package/dist/adapters/drizzle-adapter/index.d.ts +2 -2
- package/dist/adapters/index.d.cts +3 -3
- package/dist/adapters/index.d.mts +3 -3
- package/dist/adapters/index.d.ts +3 -3
- package/dist/adapters/kysely-adapter/index.d.cts +2 -2
- package/dist/adapters/kysely-adapter/index.d.mts +2 -2
- package/dist/adapters/kysely-adapter/index.d.ts +2 -2
- package/dist/adapters/memory-adapter/index.d.cts +2 -2
- package/dist/adapters/memory-adapter/index.d.mts +2 -2
- package/dist/adapters/memory-adapter/index.d.ts +2 -2
- package/dist/adapters/mongodb-adapter/index.d.cts +2 -2
- package/dist/adapters/mongodb-adapter/index.d.mts +2 -2
- package/dist/adapters/mongodb-adapter/index.d.ts +2 -2
- package/dist/adapters/prisma-adapter/index.d.cts +2 -2
- package/dist/adapters/prisma-adapter/index.d.mts +2 -2
- package/dist/adapters/prisma-adapter/index.d.ts +2 -2
- package/dist/adapters/test.d.cts +2 -2
- package/dist/adapters/test.d.mts +2 -2
- package/dist/adapters/test.d.ts +2 -2
- package/dist/api/index.cjs +1 -1
- package/dist/api/index.d.cts +2 -2
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.mjs +2 -2
- package/dist/client/index.d.cts +4 -4
- package/dist/client/index.d.mts +4 -4
- package/dist/client/index.d.ts +4 -4
- package/dist/client/plugins/index.d.cts +4 -4
- package/dist/client/plugins/index.d.mts +4 -4
- package/dist/client/plugins/index.d.ts +4 -4
- package/dist/client/react/index.d.cts +4 -4
- package/dist/client/react/index.d.mts +4 -4
- package/dist/client/react/index.d.ts +4 -4
- package/dist/client/solid/index.d.cts +4 -4
- package/dist/client/solid/index.d.mts +4 -4
- package/dist/client/solid/index.d.ts +4 -4
- package/dist/client/svelte/index.d.cts +4 -4
- package/dist/client/svelte/index.d.mts +4 -4
- package/dist/client/svelte/index.d.ts +4 -4
- package/dist/client/vue/index.d.cts +4 -4
- package/dist/client/vue/index.d.mts +4 -4
- package/dist/client/vue/index.d.ts +4 -4
- package/dist/cookies/index.d.cts +2 -2
- package/dist/cookies/index.d.mts +2 -2
- package/dist/cookies/index.d.ts +2 -2
- package/dist/db/index.d.cts +12 -12
- package/dist/db/index.d.mts +12 -12
- package/dist/db/index.d.ts +12 -12
- package/dist/index.cjs +2 -2
- 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 +2 -2
- package/dist/integrations/next-js.cjs +2 -2
- package/dist/integrations/next-js.d.cts +2 -2
- package/dist/integrations/next-js.d.mts +2 -2
- package/dist/integrations/next-js.d.ts +2 -2
- package/dist/integrations/next-js.mjs +2 -2
- package/dist/integrations/node.d.cts +2 -2
- package/dist/integrations/node.d.mts +2 -2
- package/dist/integrations/node.d.ts +2 -2
- package/dist/integrations/react-start.cjs +2 -2
- package/dist/integrations/react-start.d.cts +2 -2
- package/dist/integrations/react-start.d.mts +2 -2
- package/dist/integrations/react-start.d.ts +2 -2
- package/dist/integrations/react-start.mjs +2 -2
- package/dist/integrations/svelte-kit.cjs +1 -1
- package/dist/integrations/svelte-kit.d.cts +2 -2
- package/dist/integrations/svelte-kit.d.mts +2 -2
- package/dist/integrations/svelte-kit.d.ts +2 -2
- package/dist/integrations/svelte-kit.mjs +1 -1
- package/dist/oauth2/index.cjs +1 -1
- package/dist/oauth2/index.d.cts +4 -4
- package/dist/oauth2/index.d.mts +4 -4
- package/dist/oauth2/index.d.ts +4 -4
- package/dist/oauth2/index.mjs +1 -1
- package/dist/plugins/admin/index.cjs +2 -2
- package/dist/plugins/admin/index.d.cts +67 -67
- package/dist/plugins/admin/index.d.mts +67 -67
- package/dist/plugins/admin/index.d.ts +67 -67
- package/dist/plugins/admin/index.mjs +2 -2
- package/dist/plugins/anonymous/index.cjs +1 -1
- package/dist/plugins/anonymous/index.d.cts +2 -2
- package/dist/plugins/anonymous/index.d.mts +2 -2
- package/dist/plugins/anonymous/index.d.ts +2 -2
- package/dist/plugins/anonymous/index.mjs +1 -1
- package/dist/plugins/bearer/index.cjs +1 -1
- package/dist/plugins/bearer/index.d.cts +2 -2
- package/dist/plugins/bearer/index.d.mts +2 -2
- package/dist/plugins/bearer/index.d.ts +2 -2
- package/dist/plugins/bearer/index.mjs +1 -1
- package/dist/plugins/captcha/index.d.cts +2 -2
- package/dist/plugins/captcha/index.d.mts +2 -2
- package/dist/plugins/captcha/index.d.ts +2 -2
- package/dist/plugins/custom-session/index.cjs +1 -1
- package/dist/plugins/custom-session/index.d.cts +7 -7
- package/dist/plugins/custom-session/index.d.mts +7 -7
- package/dist/plugins/custom-session/index.d.ts +7 -7
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/email-otp/index.cjs +1 -1
- package/dist/plugins/email-otp/index.d.cts +31 -31
- package/dist/plugins/email-otp/index.d.mts +31 -31
- package/dist/plugins/email-otp/index.d.ts +31 -31
- package/dist/plugins/email-otp/index.mjs +1 -1
- package/dist/plugins/generic-oauth/index.cjs +1 -1
- package/dist/plugins/generic-oauth/index.d.cts +24 -24
- package/dist/plugins/generic-oauth/index.d.mts +24 -24
- package/dist/plugins/generic-oauth/index.d.ts +24 -24
- package/dist/plugins/generic-oauth/index.mjs +1 -1
- package/dist/plugins/haveibeenpwned/index.cjs +1 -1
- package/dist/plugins/haveibeenpwned/index.d.cts +2 -2
- package/dist/plugins/haveibeenpwned/index.d.mts +2 -2
- package/dist/plugins/haveibeenpwned/index.d.ts +2 -2
- package/dist/plugins/haveibeenpwned/index.mjs +1 -1
- package/dist/plugins/index.cjs +7 -7
- package/dist/plugins/index.d.cts +26 -26
- package/dist/plugins/index.d.mts +26 -26
- package/dist/plugins/index.d.ts +26 -26
- package/dist/plugins/index.mjs +9 -9
- package/dist/plugins/jwt/index.cjs +2 -2
- package/dist/plugins/jwt/index.d.cts +2 -2
- package/dist/plugins/jwt/index.d.mts +2 -2
- package/dist/plugins/jwt/index.d.ts +2 -2
- package/dist/plugins/jwt/index.mjs +2 -2
- package/dist/plugins/magic-link/index.cjs +1 -1
- package/dist/plugins/magic-link/index.d.cts +14 -14
- package/dist/plugins/magic-link/index.d.mts +14 -14
- package/dist/plugins/magic-link/index.d.ts +14 -14
- package/dist/plugins/magic-link/index.mjs +1 -1
- package/dist/plugins/multi-session/index.cjs +1 -1
- package/dist/plugins/multi-session/index.d.cts +9 -9
- package/dist/plugins/multi-session/index.d.mts +9 -9
- package/dist/plugins/multi-session/index.d.ts +9 -9
- package/dist/plugins/multi-session/index.mjs +1 -1
- package/dist/plugins/oauth-proxy/index.cjs +1 -1
- package/dist/plugins/oauth-proxy/index.d.cts +7 -7
- package/dist/plugins/oauth-proxy/index.d.mts +7 -7
- package/dist/plugins/oauth-proxy/index.d.ts +7 -7
- package/dist/plugins/oauth-proxy/index.mjs +1 -1
- package/dist/plugins/oidc-provider/index.cjs +3 -3
- package/dist/plugins/oidc-provider/index.d.cts +27 -27
- package/dist/plugins/oidc-provider/index.d.mts +27 -27
- package/dist/plugins/oidc-provider/index.d.ts +27 -27
- package/dist/plugins/oidc-provider/index.mjs +3 -3
- package/dist/plugins/one-tap/index.cjs +1 -1
- package/dist/plugins/one-tap/index.d.cts +4 -4
- package/dist/plugins/one-tap/index.d.mts +4 -4
- package/dist/plugins/one-tap/index.d.ts +4 -4
- package/dist/plugins/one-tap/index.mjs +1 -1
- package/dist/plugins/one-time-token/index.cjs +3 -3
- package/dist/plugins/one-time-token/index.d.cts +6 -6
- package/dist/plugins/one-time-token/index.d.mts +6 -6
- package/dist/plugins/one-time-token/index.d.ts +6 -6
- package/dist/plugins/one-time-token/index.mjs +3 -3
- package/dist/plugins/open-api/index.cjs +1 -1
- package/dist/plugins/open-api/index.d.cts +2 -2
- package/dist/plugins/open-api/index.d.mts +2 -2
- package/dist/plugins/open-api/index.d.ts +2 -2
- package/dist/plugins/open-api/index.mjs +1 -1
- package/dist/plugins/organization/index.cjs +3 -3
- package/dist/plugins/organization/index.d.cts +390 -390
- package/dist/plugins/organization/index.d.mts +390 -390
- package/dist/plugins/organization/index.d.ts +390 -390
- package/dist/plugins/organization/index.mjs +3 -3
- package/dist/plugins/passkey/index.cjs +1 -1
- package/dist/plugins/passkey/index.d.cts +23 -23
- package/dist/plugins/passkey/index.d.mts +23 -23
- package/dist/plugins/passkey/index.d.ts +23 -23
- package/dist/plugins/passkey/index.mjs +1 -1
- package/dist/plugins/phone-number/index.cjs +1 -1
- package/dist/plugins/phone-number/index.d.cts +28 -28
- package/dist/plugins/phone-number/index.d.mts +28 -28
- package/dist/plugins/phone-number/index.d.ts +28 -28
- package/dist/plugins/phone-number/index.mjs +1 -1
- package/dist/plugins/siwe/index.cjs +297 -0
- package/dist/plugins/siwe/index.d.cts +195 -0
- package/dist/plugins/siwe/index.d.mts +195 -0
- package/dist/plugins/siwe/index.d.ts +195 -0
- package/dist/plugins/siwe/index.mjs +295 -0
- package/dist/plugins/sso/index.cjs +1 -1
- package/dist/plugins/sso/index.d.cts +45 -45
- package/dist/plugins/sso/index.d.mts +45 -45
- package/dist/plugins/sso/index.d.ts +45 -45
- package/dist/plugins/sso/index.mjs +1 -1
- package/dist/plugins/two-factor/index.cjs +1 -1
- package/dist/plugins/two-factor/index.d.cts +38 -38
- package/dist/plugins/two-factor/index.d.mts +38 -38
- package/dist/plugins/two-factor/index.d.ts +38 -38
- package/dist/plugins/two-factor/index.mjs +1 -1
- package/dist/plugins/username/index.cjs +1 -1
- package/dist/plugins/username/index.d.cts +12 -12
- package/dist/plugins/username/index.d.mts +12 -12
- package/dist/plugins/username/index.d.ts +12 -12
- package/dist/plugins/username/index.mjs +1 -1
- package/dist/shared/{better-auth.C-oNfZPH.d.cts → better-auth.B0e3ZzlM.d.cts} +36 -36
- package/dist/shared/{better-auth.CE16lr3i.d.mts → better-auth.B1VHvePI.d.mts} +36 -36
- package/dist/shared/{better-auth.DoKaQIwy.d.mts → better-auth.BF0l18Af.d.mts} +1 -1
- package/dist/shared/{better-auth.CNTpFj_S.cjs → better-auth.BXW4aAiQ.cjs} +2 -2
- package/dist/shared/{better-auth.DdKZcMVt.d.ts → better-auth.B_G094Aj.d.ts} +1 -1
- package/dist/shared/{better-auth.DQfCK4Nb.mjs → better-auth.Bqt8-7ls.mjs} +2 -2
- package/dist/shared/{better-auth.DevRAmVV.d.ts → better-auth.Bwe61noi.d.ts} +1 -1
- package/dist/shared/{better-auth.B3K6UWYy.d.cts → better-auth.CF-FWRQL.d.cts} +1 -1
- package/dist/shared/{better-auth.D2QnAIyP.d.ts → better-auth.CHvHihjD.d.ts} +36 -36
- package/dist/shared/{better-auth.pnE8EkZO.cjs → better-auth.COsDmM8f.cjs} +1 -1
- package/dist/shared/{better-auth.B8mbk3HM.cjs → better-auth.CSftMZoM.cjs} +1 -1
- package/dist/shared/{better-auth.DG2FJeYI.cjs → better-auth.CU2ZnFFo.cjs} +4 -3
- package/dist/shared/{better-auth.KpzJUkxw.d.mts → better-auth.CePXeKag.d.mts} +515 -515
- package/dist/shared/{better-auth.CnqHgquB.cjs → better-auth.CeY8lCIq.cjs} +33 -11
- package/dist/shared/{better-auth.Cgjn2thr.d.cts → better-auth.CiGummYu.d.cts} +515 -515
- package/dist/shared/{better-auth.BP6KhZxK.mjs → better-auth.D1SaVuxk.mjs} +1 -1
- package/dist/shared/{better-auth.BOumacvv.mjs → better-auth.D4HhkCZJ.mjs} +4 -3
- package/dist/shared/{better-auth.PchrD52N.d.cts → better-auth.DEgvs2nh.d.cts} +1 -1
- package/dist/shared/{better-auth._di0pH6c.mjs → better-auth.DGaVMVAI.mjs} +1 -1
- package/dist/shared/{better-auth.PS9uuCnX.d.ts → better-auth.DPa2nz5L.d.ts} +3 -3
- package/dist/shared/{better-auth.VKKx-2JU.mjs → better-auth.DR6QsC6j.mjs} +33 -11
- package/dist/shared/{better-auth.ByEh_r9h.d.mts → better-auth.DbqVX6sp.d.mts} +1 -1
- package/dist/shared/{better-auth.2lcgvW_O.d.ts → better-auth.Dj2HyOmw.d.ts} +515 -515
- package/dist/shared/{better-auth.Bs90Z5lG.mjs → better-auth.DygEm6OX.mjs} +1 -1
- package/dist/shared/{better-auth.jZedDYFo.mjs → better-auth.HDgvLN7B.mjs} +2 -2
- package/dist/shared/{better-auth.KXK1cTP6.d.mts → better-auth.IegS6fw_.d.mts} +3 -3
- package/dist/shared/{better-auth.B448Gbxg.cjs → better-auth.PIkdXr0U.cjs} +2 -2
- package/dist/shared/{better-auth.DCdVWPIH.cjs → better-auth.TnpcdNJo.cjs} +1 -1
- package/dist/shared/{better-auth.hWM7ExMT.mjs → better-auth.VOBpdwFt.mjs} +1 -1
- package/dist/shared/{better-auth.CtknPsTc.cjs → better-auth.johXc5IC.cjs} +1 -1
- package/dist/shared/{better-auth.DVIqLF8t.d.cts → better-auth.npEvGVS_.d.cts} +3 -3
- package/dist/social-providers/index.cjs +1 -1
- package/dist/social-providers/index.d.cts +1 -1
- package/dist/social-providers/index.d.mts +1 -1
- package/dist/social-providers/index.d.ts +1 -1
- package/dist/social-providers/index.mjs +1 -1
- package/dist/test-utils/index.cjs +3 -3
- package/dist/test-utils/index.d.cts +732 -731
- package/dist/test-utils/index.d.mts +732 -731
- package/dist/test-utils/index.d.ts +732 -731
- package/dist/test-utils/index.mjs +3 -3
- package/dist/types/index.d.cts +3 -3
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/package.json +14 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, p as AuthContext } from './better-auth.
|
|
1
|
+
import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, p as AuthContext } from './better-auth.CePXeKag.mjs';
|
|
2
2
|
import { Statements } from '../plugins/access/index.mjs';
|
|
3
3
|
import * as zod_v4_core from 'zod/v4/core';
|
|
4
|
-
import * as
|
|
4
|
+
import * as z from 'zod/v4';
|
|
5
5
|
import * as better_call from 'better-call';
|
|
6
6
|
|
|
7
7
|
declare const apiKeySchema: ({ timeWindow, rateLimitMax, }: {
|
|
@@ -662,19 +662,19 @@ declare const apiKey: (options?: ApiKeyOptions) => {
|
|
|
662
662
|
}>;
|
|
663
663
|
options: {
|
|
664
664
|
method: "POST";
|
|
665
|
-
body:
|
|
666
|
-
name:
|
|
667
|
-
expiresIn:
|
|
668
|
-
userId:
|
|
669
|
-
prefix:
|
|
670
|
-
remaining:
|
|
671
|
-
metadata:
|
|
672
|
-
refillAmount:
|
|
673
|
-
refillInterval:
|
|
674
|
-
rateLimitTimeWindow:
|
|
675
|
-
rateLimitMax:
|
|
676
|
-
rateLimitEnabled:
|
|
677
|
-
permissions:
|
|
665
|
+
body: z.ZodObject<{
|
|
666
|
+
name: z.ZodOptional<z.ZodString>;
|
|
667
|
+
expiresIn: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
668
|
+
userId: z.ZodOptional<z.ZodCoercedString<unknown>>;
|
|
669
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
670
|
+
remaining: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
671
|
+
metadata: z.ZodOptional<z.ZodAny>;
|
|
672
|
+
refillAmount: z.ZodOptional<z.ZodNumber>;
|
|
673
|
+
refillInterval: z.ZodOptional<z.ZodNumber>;
|
|
674
|
+
rateLimitTimeWindow: z.ZodOptional<z.ZodNumber>;
|
|
675
|
+
rateLimitMax: z.ZodOptional<z.ZodNumber>;
|
|
676
|
+
rateLimitEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
677
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
678
678
|
}, zod_v4_core.$strip>;
|
|
679
679
|
metadata: {
|
|
680
680
|
openapi: {
|
|
@@ -874,9 +874,9 @@ declare const apiKey: (options?: ApiKeyOptions) => {
|
|
|
874
874
|
}>;
|
|
875
875
|
options: {
|
|
876
876
|
method: "POST";
|
|
877
|
-
body:
|
|
878
|
-
key:
|
|
879
|
-
permissions:
|
|
877
|
+
body: z.ZodObject<{
|
|
878
|
+
key: z.ZodString;
|
|
879
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
880
880
|
}, zod_v4_core.$strip>;
|
|
881
881
|
metadata: {
|
|
882
882
|
SERVER_ONLY: true;
|
|
@@ -976,8 +976,8 @@ declare const apiKey: (options?: ApiKeyOptions) => {
|
|
|
976
976
|
}>;
|
|
977
977
|
options: {
|
|
978
978
|
method: "GET";
|
|
979
|
-
query:
|
|
980
|
-
id:
|
|
979
|
+
query: z.ZodObject<{
|
|
980
|
+
id: z.ZodString;
|
|
981
981
|
}, zod_v4_core.$strip>;
|
|
982
982
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
983
983
|
session: {
|
|
@@ -1229,20 +1229,20 @@ declare const apiKey: (options?: ApiKeyOptions) => {
|
|
|
1229
1229
|
}>;
|
|
1230
1230
|
options: {
|
|
1231
1231
|
method: "POST";
|
|
1232
|
-
body:
|
|
1233
|
-
keyId:
|
|
1234
|
-
userId:
|
|
1235
|
-
name:
|
|
1236
|
-
enabled:
|
|
1237
|
-
remaining:
|
|
1238
|
-
refillAmount:
|
|
1239
|
-
refillInterval:
|
|
1240
|
-
metadata:
|
|
1241
|
-
expiresIn:
|
|
1242
|
-
rateLimitEnabled:
|
|
1243
|
-
rateLimitTimeWindow:
|
|
1244
|
-
rateLimitMax:
|
|
1245
|
-
permissions:
|
|
1232
|
+
body: z.ZodObject<{
|
|
1233
|
+
keyId: z.ZodString;
|
|
1234
|
+
userId: z.ZodOptional<z.ZodCoercedString<unknown>>;
|
|
1235
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1236
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1237
|
+
remaining: z.ZodOptional<z.ZodNumber>;
|
|
1238
|
+
refillAmount: z.ZodOptional<z.ZodNumber>;
|
|
1239
|
+
refillInterval: z.ZodOptional<z.ZodNumber>;
|
|
1240
|
+
metadata: z.ZodOptional<z.ZodAny>;
|
|
1241
|
+
expiresIn: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1242
|
+
rateLimitEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
1243
|
+
rateLimitTimeWindow: z.ZodOptional<z.ZodNumber>;
|
|
1244
|
+
rateLimitMax: z.ZodOptional<z.ZodNumber>;
|
|
1245
|
+
permissions: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
|
|
1246
1246
|
}, zod_v4_core.$strip>;
|
|
1247
1247
|
metadata: {
|
|
1248
1248
|
openapi: {
|
|
@@ -1417,8 +1417,8 @@ declare const apiKey: (options?: ApiKeyOptions) => {
|
|
|
1417
1417
|
}>;
|
|
1418
1418
|
options: {
|
|
1419
1419
|
method: "POST";
|
|
1420
|
-
body:
|
|
1421
|
-
keyId:
|
|
1420
|
+
body: z.ZodObject<{
|
|
1421
|
+
keyId: z.ZodString;
|
|
1422
1422
|
}, zod_v4_core.$strip>;
|
|
1423
1423
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
1424
1424
|
session: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const z = require('zod/v4');
|
|
4
4
|
const jose = require('jose');
|
|
5
5
|
const betterCall = require('better-call');
|
|
6
|
-
const socialProviders_index = require('./better-auth.
|
|
6
|
+
const socialProviders_index = require('./better-auth.CU2ZnFFo.cjs');
|
|
7
7
|
require('./better-auth.DiSjtgs9.cjs');
|
|
8
8
|
const base64 = require('@better-auth/utils/base64');
|
|
9
9
|
require('@better-auth/utils/hmac');
|
|
@@ -22,7 +22,7 @@ require('@better-auth/utils');
|
|
|
22
22
|
require('@better-auth/utils/hex');
|
|
23
23
|
require('@noble/hashes/utils');
|
|
24
24
|
const random = require('./better-auth.CYeOI8C-.cjs');
|
|
25
|
-
const plugins_jwt_index = require('./better-auth.
|
|
25
|
+
const plugins_jwt_index = require('./better-auth.johXc5IC.cjs');
|
|
26
26
|
|
|
27
27
|
function _interopNamespaceCompat(e) {
|
|
28
28
|
if (e && typeof e === 'object' && 'default' in e) return e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as BetterAuthPlugin, B as BetterAuthOptions, ad as InferFieldsInputClient, ab as InferFieldsOutput, U as User, S as Session, n as Auth } from './better-auth.
|
|
1
|
+
import { h as BetterAuthPlugin, B as BetterAuthOptions, ad as InferFieldsInputClient, ab as InferFieldsOutput, U as User, S as Session, n as Auth } from './better-auth.Dj2HyOmw.js';
|
|
2
2
|
import { BetterFetchOption, BetterFetchResponse, BetterFetch, BetterFetchPlugin } from '@better-fetch/fetch';
|
|
3
3
|
import { WritableAtom, Atom } from 'nanostores';
|
|
4
4
|
import { U as UnionToIntersection, H as HasRequiredKeys, a as Prettify, L as LiteralString, S as StripEmptyObjects } from './better-auth.ZSfSbnQT.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as z from 'zod/v4';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import { j as createAuthEndpoint, k as getSessionFromCtx, l as sessionMiddleware, i as createAuthMiddleware } from './better-auth.
|
|
3
|
+
import { j as createAuthEndpoint, k as getSessionFromCtx, l as sessionMiddleware, i as createAuthMiddleware } from './better-auth.D4HhkCZJ.mjs';
|
|
4
4
|
import './better-auth.8zoxzg-F.mjs';
|
|
5
5
|
import { base64Url } from '@better-auth/utils/base64';
|
|
6
6
|
import '@better-auth/utils/hmac';
|
|
7
7
|
import '@better-auth/utils/binary';
|
|
8
8
|
import { m as mergeSchema } from './better-auth.n2KFGwjY.mjs';
|
|
9
|
-
import './better-auth.
|
|
9
|
+
import './better-auth.DGaVMVAI.mjs';
|
|
10
10
|
import '../plugins/organization/access/index.mjs';
|
|
11
11
|
import '@better-auth/utils/random';
|
|
12
12
|
import { createHash } from '@better-auth/utils/hash';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as BetterAuthPlugin, B as BetterAuthOptions, ad as InferFieldsInputClient, ab as InferFieldsOutput, U as User, S as Session, n as Auth } from './better-auth.
|
|
1
|
+
import { h as BetterAuthPlugin, B as BetterAuthOptions, ad as InferFieldsInputClient, ab as InferFieldsOutput, U as User, S as Session, n as Auth } from './better-auth.CiGummYu.cjs';
|
|
2
2
|
import { BetterFetchOption, BetterFetchResponse, BetterFetch, BetterFetchPlugin } from '@better-fetch/fetch';
|
|
3
3
|
import { WritableAtom, Atom } from 'nanostores';
|
|
4
4
|
import { U as UnionToIntersection, H as HasRequiredKeys, a as Prettify, L as LiteralString, S as StripEmptyObjects } from './better-auth.ZSfSbnQT.cjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, p as AuthContext } from './better-auth.
|
|
1
|
+
import { G as GenericEndpointContext, I as InferOptionSchema, H as HookEndpointContext, p as AuthContext } from './better-auth.Dj2HyOmw.js';
|
|
2
2
|
import { Statements } from '../plugins/access/index.js';
|
|
3
3
|
import * as zod_v4_core from 'zod/v4/core';
|
|
4
|
-
import * as
|
|
4
|
+
import * as z from 'zod/v4';
|
|
5
5
|
import * as better_call from 'better-call';
|
|
6
6
|
|
|
7
7
|
declare const apiKeySchema: ({ timeWindow, rateLimitMax, }: {
|
|
@@ -662,19 +662,19 @@ declare const apiKey: (options?: ApiKeyOptions) => {
|
|
|
662
662
|
}>;
|
|
663
663
|
options: {
|
|
664
664
|
method: "POST";
|
|
665
|
-
body:
|
|
666
|
-
name:
|
|
667
|
-
expiresIn:
|
|
668
|
-
userId:
|
|
669
|
-
prefix:
|
|
670
|
-
remaining:
|
|
671
|
-
metadata:
|
|
672
|
-
refillAmount:
|
|
673
|
-
refillInterval:
|
|
674
|
-
rateLimitTimeWindow:
|
|
675
|
-
rateLimitMax:
|
|
676
|
-
rateLimitEnabled:
|
|
677
|
-
permissions:
|
|
665
|
+
body: z.ZodObject<{
|
|
666
|
+
name: z.ZodOptional<z.ZodString>;
|
|
667
|
+
expiresIn: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
668
|
+
userId: z.ZodOptional<z.ZodCoercedString<unknown>>;
|
|
669
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
670
|
+
remaining: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
671
|
+
metadata: z.ZodOptional<z.ZodAny>;
|
|
672
|
+
refillAmount: z.ZodOptional<z.ZodNumber>;
|
|
673
|
+
refillInterval: z.ZodOptional<z.ZodNumber>;
|
|
674
|
+
rateLimitTimeWindow: z.ZodOptional<z.ZodNumber>;
|
|
675
|
+
rateLimitMax: z.ZodOptional<z.ZodNumber>;
|
|
676
|
+
rateLimitEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
677
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
678
678
|
}, zod_v4_core.$strip>;
|
|
679
679
|
metadata: {
|
|
680
680
|
openapi: {
|
|
@@ -874,9 +874,9 @@ declare const apiKey: (options?: ApiKeyOptions) => {
|
|
|
874
874
|
}>;
|
|
875
875
|
options: {
|
|
876
876
|
method: "POST";
|
|
877
|
-
body:
|
|
878
|
-
key:
|
|
879
|
-
permissions:
|
|
877
|
+
body: z.ZodObject<{
|
|
878
|
+
key: z.ZodString;
|
|
879
|
+
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
880
880
|
}, zod_v4_core.$strip>;
|
|
881
881
|
metadata: {
|
|
882
882
|
SERVER_ONLY: true;
|
|
@@ -976,8 +976,8 @@ declare const apiKey: (options?: ApiKeyOptions) => {
|
|
|
976
976
|
}>;
|
|
977
977
|
options: {
|
|
978
978
|
method: "GET";
|
|
979
|
-
query:
|
|
980
|
-
id:
|
|
979
|
+
query: z.ZodObject<{
|
|
980
|
+
id: z.ZodString;
|
|
981
981
|
}, zod_v4_core.$strip>;
|
|
982
982
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
983
983
|
session: {
|
|
@@ -1229,20 +1229,20 @@ declare const apiKey: (options?: ApiKeyOptions) => {
|
|
|
1229
1229
|
}>;
|
|
1230
1230
|
options: {
|
|
1231
1231
|
method: "POST";
|
|
1232
|
-
body:
|
|
1233
|
-
keyId:
|
|
1234
|
-
userId:
|
|
1235
|
-
name:
|
|
1236
|
-
enabled:
|
|
1237
|
-
remaining:
|
|
1238
|
-
refillAmount:
|
|
1239
|
-
refillInterval:
|
|
1240
|
-
metadata:
|
|
1241
|
-
expiresIn:
|
|
1242
|
-
rateLimitEnabled:
|
|
1243
|
-
rateLimitTimeWindow:
|
|
1244
|
-
rateLimitMax:
|
|
1245
|
-
permissions:
|
|
1232
|
+
body: z.ZodObject<{
|
|
1233
|
+
keyId: z.ZodString;
|
|
1234
|
+
userId: z.ZodOptional<z.ZodCoercedString<unknown>>;
|
|
1235
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1236
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1237
|
+
remaining: z.ZodOptional<z.ZodNumber>;
|
|
1238
|
+
refillAmount: z.ZodOptional<z.ZodNumber>;
|
|
1239
|
+
refillInterval: z.ZodOptional<z.ZodNumber>;
|
|
1240
|
+
metadata: z.ZodOptional<z.ZodAny>;
|
|
1241
|
+
expiresIn: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1242
|
+
rateLimitEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
1243
|
+
rateLimitTimeWindow: z.ZodOptional<z.ZodNumber>;
|
|
1244
|
+
rateLimitMax: z.ZodOptional<z.ZodNumber>;
|
|
1245
|
+
permissions: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
|
|
1246
1246
|
}, zod_v4_core.$strip>;
|
|
1247
1247
|
metadata: {
|
|
1248
1248
|
openapi: {
|
|
@@ -1417,8 +1417,8 @@ declare const apiKey: (options?: ApiKeyOptions) => {
|
|
|
1417
1417
|
}>;
|
|
1418
1418
|
options: {
|
|
1419
1419
|
method: "POST";
|
|
1420
|
-
body:
|
|
1421
|
-
keyId:
|
|
1420
|
+
body: z.ZodObject<{
|
|
1421
|
+
keyId: z.ZodString;
|
|
1422
1422
|
}, zod_v4_core.$strip>;
|
|
1423
1423
|
use: ((inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{
|
|
1424
1424
|
session: {
|
|
@@ -9,7 +9,7 @@ require('zod/v4');
|
|
|
9
9
|
require('./better-auth.BIMq4RPW.cjs');
|
|
10
10
|
const cookies_index = require('../cookies/index.cjs');
|
|
11
11
|
const logger = require('./better-auth.CXhVNgXP.cjs');
|
|
12
|
-
const socialProviders_index = require('./better-auth.
|
|
12
|
+
const socialProviders_index = require('./better-auth.CU2ZnFFo.cjs');
|
|
13
13
|
require('better-call');
|
|
14
14
|
require('@better-auth/utils/hash');
|
|
15
15
|
require('@noble/ciphers/chacha');
|
|
@@ -1532,12 +1532,13 @@ async function validateAuthorizationCode({
|
|
|
1532
1532
|
options.clientKey && body.set("client_key", options.clientKey);
|
|
1533
1533
|
deviceId && body.set("device_id", deviceId);
|
|
1534
1534
|
body.set("redirect_uri", options.redirectURI || redirectURI);
|
|
1535
|
+
body.set("client_id", options.clientId);
|
|
1535
1536
|
if (authentication === "basic") {
|
|
1536
|
-
|
|
1537
|
+
const encodedCredentials = base64.base64.encode(
|
|
1537
1538
|
`${options.clientId}:${options.clientSecret}`
|
|
1538
1539
|
);
|
|
1540
|
+
requestHeaders["authorization"] = `Basic ${encodedCredentials}`;
|
|
1539
1541
|
} else {
|
|
1540
|
-
body.set("client_id", options.clientId);
|
|
1541
1542
|
body.set("client_secret", options.clientSecret);
|
|
1542
1543
|
}
|
|
1543
1544
|
for (const [key, value] of Object.entries(additionalParams)) {
|
|
@@ -2670,7 +2671,7 @@ const twitter = (options) => {
|
|
|
2670
2671
|
return validateAuthorizationCode({
|
|
2671
2672
|
code,
|
|
2672
2673
|
codeVerifier,
|
|
2673
|
-
authentication: "
|
|
2674
|
+
authentication: "basic",
|
|
2674
2675
|
redirectURI,
|
|
2675
2676
|
options,
|
|
2676
2677
|
tokenEndpoint: "https://api.x.com/2/oauth2/token"
|