better-auth 1.6.3 → 1.7.0-beta.1
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/api/index.d.mts +4 -0
- package/dist/api/routes/callback.d.mts +2 -0
- package/dist/api/routes/callback.mjs +22 -13
- package/dist/client/path-to-object.d.mts +35 -1
- package/dist/client/plugins/index.d.mts +3 -2
- package/dist/client/plugins/index.mjs +2 -1
- package/dist/oauth2/error-codes.d.mts +20 -0
- package/dist/oauth2/error-codes.mjs +20 -0
- package/dist/package.mjs +1 -1
- package/dist/plugins/admin/admin.mjs +1 -1
- package/dist/plugins/anonymous/index.mjs +1 -1
- package/dist/plugins/generic-oauth/client.d.mts +6 -6
- package/dist/plugins/generic-oauth/client.mjs +6 -0
- package/dist/plugins/generic-oauth/error-codes.d.mts +1 -6
- package/dist/plugins/generic-oauth/error-codes.mjs +2 -7
- package/dist/plugins/generic-oauth/index.d.mts +9 -156
- package/dist/plugins/generic-oauth/index.mjs +133 -73
- package/dist/plugins/generic-oauth/providers/auth0.d.mts +1 -1
- package/dist/plugins/generic-oauth/providers/gumroad.d.mts +1 -1
- package/dist/plugins/generic-oauth/providers/hubspot.d.mts +1 -1
- package/dist/plugins/generic-oauth/providers/keycloak.d.mts +1 -1
- package/dist/plugins/generic-oauth/providers/microsoft-entra-id.d.mts +1 -1
- package/dist/plugins/generic-oauth/providers/okta.d.mts +1 -1
- package/dist/plugins/generic-oauth/providers/patreon.d.mts +1 -1
- package/dist/plugins/generic-oauth/providers/slack.d.mts +1 -1
- package/dist/plugins/generic-oauth/types.d.mts +25 -27
- package/dist/plugins/index.d.mts +3 -3
- package/dist/plugins/index.mjs +2 -2
- package/dist/plugins/jwt/client.d.mts +1 -1
- package/dist/plugins/jwt/index.d.mts +3 -3
- package/dist/plugins/jwt/index.mjs +2 -2
- package/dist/plugins/jwt/sign.d.mts +15 -3
- package/dist/plugins/jwt/sign.mjs +31 -12
- package/dist/plugins/jwt/types.d.mts +13 -1
- package/dist/plugins/jwt/utils.d.mts +1 -1
- package/dist/plugins/last-login-method/index.mjs +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +2 -2
- package/dist/plugins/two-factor/client.d.mts +2 -0
- package/dist/plugins/two-factor/error-code.d.mts +2 -0
- package/dist/plugins/two-factor/error-code.mjs +2 -0
- package/dist/plugins/two-factor/index.d.mts +19 -0
- package/dist/plugins/two-factor/index.mjs +48 -25
- package/dist/test-utils/test-instance.d.mts +12 -0
- package/package.json +8 -8
- package/dist/plugins/generic-oauth/routes.mjs +0 -407
|
@@ -8,7 +8,7 @@ const lastLoginMethod = (userConfig) => {
|
|
|
8
8
|
const defaultResolveMethod = (ctx) => {
|
|
9
9
|
const path = ctx.path;
|
|
10
10
|
if (!path) return null;
|
|
11
|
-
if (path.startsWith("/callback/")
|
|
11
|
+
if (path.startsWith("/callback/")) return ctx.params?.id || path.split("/").pop();
|
|
12
12
|
if (path === "/sign-in/email" || path === "/sign-up/email") return "email";
|
|
13
13
|
if (path.includes("siwe")) return "siwe";
|
|
14
14
|
if (path.includes("/passkey/verify-authentication")) return "passkey";
|
|
@@ -111,7 +111,7 @@ const oAuthProxy = (opts) => {
|
|
|
111
111
|
hooks: {
|
|
112
112
|
before: [{
|
|
113
113
|
matcher(context) {
|
|
114
|
-
return !!
|
|
114
|
+
return !!context.path?.startsWith("/sign-in/social");
|
|
115
115
|
},
|
|
116
116
|
handler: createAuthMiddleware(async (ctx) => {
|
|
117
117
|
if (checkSkipProxy(ctx, opts)) return;
|
|
@@ -237,7 +237,7 @@ const oAuthProxy = (opts) => {
|
|
|
237
237
|
}],
|
|
238
238
|
after: [{
|
|
239
239
|
matcher(context) {
|
|
240
|
-
return !!
|
|
240
|
+
return !!context.path?.startsWith("/sign-in/social");
|
|
241
241
|
},
|
|
242
242
|
handler: createAuthMiddleware(async (ctx) => {
|
|
243
243
|
if (checkSkipProxy(ctx, opts)) return;
|
|
@@ -58,8 +58,10 @@ declare const twoFactorClient: (options?: {
|
|
|
58
58
|
}[];
|
|
59
59
|
$ERROR_CODES: {
|
|
60
60
|
OTP_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"OTP_NOT_ENABLED">;
|
|
61
|
+
OTP_NOT_CONFIGURED: _better_auth_core_utils_error_codes0.RawError<"OTP_NOT_CONFIGURED">;
|
|
61
62
|
OTP_HAS_EXPIRED: _better_auth_core_utils_error_codes0.RawError<"OTP_HAS_EXPIRED">;
|
|
62
63
|
TOTP_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"TOTP_NOT_ENABLED">;
|
|
64
|
+
TOTP_NOT_CONFIGURED: _better_auth_core_utils_error_codes0.RawError<"TOTP_NOT_CONFIGURED">;
|
|
63
65
|
TWO_FACTOR_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
64
66
|
BACKUP_CODES_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
65
67
|
INVALID_BACKUP_CODE: _better_auth_core_utils_error_codes0.RawError<"INVALID_BACKUP_CODE">;
|
|
@@ -3,8 +3,10 @@ import * as _better_auth_core_utils_error_codes0 from "@better-auth/core/utils/e
|
|
|
3
3
|
//#region src/plugins/two-factor/error-code.d.ts
|
|
4
4
|
declare const TWO_FACTOR_ERROR_CODES: {
|
|
5
5
|
OTP_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"OTP_NOT_ENABLED">;
|
|
6
|
+
OTP_NOT_CONFIGURED: _better_auth_core_utils_error_codes0.RawError<"OTP_NOT_CONFIGURED">;
|
|
6
7
|
OTP_HAS_EXPIRED: _better_auth_core_utils_error_codes0.RawError<"OTP_HAS_EXPIRED">;
|
|
7
8
|
TOTP_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"TOTP_NOT_ENABLED">;
|
|
9
|
+
TOTP_NOT_CONFIGURED: _better_auth_core_utils_error_codes0.RawError<"TOTP_NOT_CONFIGURED">;
|
|
8
10
|
TWO_FACTOR_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
9
11
|
BACKUP_CODES_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
10
12
|
INVALID_BACKUP_CODE: _better_auth_core_utils_error_codes0.RawError<"INVALID_BACKUP_CODE">;
|
|
@@ -2,8 +2,10 @@ import { defineErrorCodes } from "@better-auth/core/utils/error-codes";
|
|
|
2
2
|
//#region src/plugins/two-factor/error-code.ts
|
|
3
3
|
const TWO_FACTOR_ERROR_CODES = defineErrorCodes({
|
|
4
4
|
OTP_NOT_ENABLED: "OTP not enabled",
|
|
5
|
+
OTP_NOT_CONFIGURED: "OTP is not available",
|
|
5
6
|
OTP_HAS_EXPIRED: "OTP has expired",
|
|
6
7
|
TOTP_NOT_ENABLED: "TOTP not enabled",
|
|
8
|
+
TOTP_NOT_CONFIGURED: "TOTP is not available",
|
|
7
9
|
TWO_FACTOR_NOT_ENABLED: "Two factor isn't enabled",
|
|
8
10
|
BACKUP_CODES_NOT_ENABLED: "Backup codes aren't enabled",
|
|
9
11
|
INVALID_BACKUP_CODE: "Invalid backup code",
|
|
@@ -40,9 +40,17 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
40
40
|
method: "POST";
|
|
41
41
|
body: z.ZodObject<{
|
|
42
42
|
password: z.ZodOptional<z.ZodString>;
|
|
43
|
+
method: z.ZodDefault<z.ZodEnum<{
|
|
44
|
+
otp: "otp";
|
|
45
|
+
totp: "totp";
|
|
46
|
+
}>>;
|
|
43
47
|
issuer: z.ZodOptional<z.ZodString>;
|
|
44
48
|
}, z.core.$strip> | z.ZodObject<{
|
|
45
49
|
password: z.ZodString;
|
|
50
|
+
method: z.ZodDefault<z.ZodEnum<{
|
|
51
|
+
otp: "otp";
|
|
52
|
+
totp: "totp";
|
|
53
|
+
}>>;
|
|
46
54
|
issuer: z.ZodOptional<z.ZodString>;
|
|
47
55
|
}, z.core.$strip>;
|
|
48
56
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
@@ -80,6 +88,11 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
80
88
|
schema: {
|
|
81
89
|
type: "object";
|
|
82
90
|
properties: {
|
|
91
|
+
method: {
|
|
92
|
+
type: string;
|
|
93
|
+
enum: string[];
|
|
94
|
+
description: string;
|
|
95
|
+
};
|
|
83
96
|
totpURI: {
|
|
84
97
|
type: string;
|
|
85
98
|
description: string;
|
|
@@ -92,6 +105,7 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
92
105
|
description: string;
|
|
93
106
|
};
|
|
94
107
|
};
|
|
108
|
+
required: string[];
|
|
95
109
|
};
|
|
96
110
|
};
|
|
97
111
|
};
|
|
@@ -100,6 +114,9 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
100
114
|
};
|
|
101
115
|
};
|
|
102
116
|
}, {
|
|
117
|
+
method: "otp";
|
|
118
|
+
} | {
|
|
119
|
+
method: "totp";
|
|
103
120
|
totpURI: string;
|
|
104
121
|
backupCodes: string[];
|
|
105
122
|
}>;
|
|
@@ -672,8 +689,10 @@ declare const twoFactor: <O extends TwoFactorOptions>(options?: O) => {
|
|
|
672
689
|
}[];
|
|
673
690
|
$ERROR_CODES: {
|
|
674
691
|
OTP_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"OTP_NOT_ENABLED">;
|
|
692
|
+
OTP_NOT_CONFIGURED: _better_auth_core_utils_error_codes0.RawError<"OTP_NOT_CONFIGURED">;
|
|
675
693
|
OTP_HAS_EXPIRED: _better_auth_core_utils_error_codes0.RawError<"OTP_HAS_EXPIRED">;
|
|
676
694
|
TOTP_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"TOTP_NOT_ENABLED">;
|
|
695
|
+
TOTP_NOT_CONFIGURED: _better_auth_core_utils_error_codes0.RawError<"TOTP_NOT_CONFIGURED">;
|
|
677
696
|
TWO_FACTOR_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"TWO_FACTOR_NOT_ENABLED">;
|
|
678
697
|
BACKUP_CODES_NOT_ENABLED: _better_auth_core_utils_error_codes0.RawError<"BACKUP_CODES_NOT_ENABLED">;
|
|
679
698
|
INVALID_BACKUP_CODE: _better_auth_core_utils_error_codes0.RawError<"INVALID_BACKUP_CODE">;
|
|
@@ -36,12 +36,16 @@ const twoFactor = (options) => {
|
|
|
36
36
|
});
|
|
37
37
|
const otp = otp2fa(options?.otpOptions);
|
|
38
38
|
const passwordSchema = z.string().meta({ description: "User password" });
|
|
39
|
+
const methodField = z.enum(["otp", "totp"]).default("totp").meta({ description: "The 2FA method to enable. 'totp' generates an authenticator app secret (requires verification). 'otp' enables email/SMS-based codes immediately." });
|
|
40
|
+
const issuerField = z.string().meta({ description: "Custom issuer for the TOTP URI" }).optional();
|
|
39
41
|
const enableTwoFactorBodySchema = allowPasswordless ? z.object({
|
|
40
42
|
password: passwordSchema.optional(),
|
|
41
|
-
|
|
43
|
+
method: methodField,
|
|
44
|
+
issuer: issuerField
|
|
42
45
|
}) : z.object({
|
|
43
46
|
password: passwordSchema,
|
|
44
|
-
|
|
47
|
+
method: methodField,
|
|
48
|
+
issuer: issuerField
|
|
45
49
|
});
|
|
46
50
|
const disableTwoFactorBodySchema = allowPasswordless ? z.object({ password: passwordSchema.optional() }) : z.object({ password: passwordSchema });
|
|
47
51
|
return {
|
|
@@ -57,28 +61,34 @@ const twoFactor = (options) => {
|
|
|
57
61
|
use: [sessionMiddleware],
|
|
58
62
|
metadata: { openapi: {
|
|
59
63
|
summary: "Enable two factor authentication",
|
|
60
|
-
description: "
|
|
64
|
+
description: "Enable two factor authentication. Pass method 'totp' (default) to set up an authenticator app (returns TOTP URI and backup codes), or 'otp' to enable email/SMS-based codes immediately.",
|
|
61
65
|
responses: { 200: {
|
|
62
66
|
description: "Successful response",
|
|
63
67
|
content: { "application/json": { schema: {
|
|
64
68
|
type: "object",
|
|
65
69
|
properties: {
|
|
70
|
+
method: {
|
|
71
|
+
type: "string",
|
|
72
|
+
enum: ["otp", "totp"],
|
|
73
|
+
description: "The 2FA method that was enabled."
|
|
74
|
+
},
|
|
66
75
|
totpURI: {
|
|
67
76
|
type: "string",
|
|
68
|
-
description: "TOTP URI"
|
|
77
|
+
description: "TOTP URI for authenticator app setup. Only present when method is 'totp'."
|
|
69
78
|
},
|
|
70
79
|
backupCodes: {
|
|
71
80
|
type: "array",
|
|
72
81
|
items: { type: "string" },
|
|
73
|
-
description: "
|
|
82
|
+
description: "Recovery backup codes. Only present when method is 'totp'."
|
|
74
83
|
}
|
|
75
|
-
}
|
|
84
|
+
},
|
|
85
|
+
required: ["method"]
|
|
76
86
|
} } }
|
|
77
87
|
} }
|
|
78
88
|
} }
|
|
79
89
|
}, async (ctx) => {
|
|
80
90
|
const user = ctx.context.session.user;
|
|
81
|
-
const { password, issuer } = ctx.body;
|
|
91
|
+
const { password, issuer, method } = ctx.body;
|
|
82
92
|
if (await shouldRequirePassword(ctx, user.id, allowPasswordless)) {
|
|
83
93
|
if (!password) throw APIError.from("BAD_REQUEST", BASE_ERROR_CODES.INVALID_PASSWORD);
|
|
84
94
|
if (!await validatePassword(ctx, {
|
|
@@ -86,23 +96,18 @@ const twoFactor = (options) => {
|
|
|
86
96
|
userId: user.id
|
|
87
97
|
})) throw APIError.from("BAD_REQUEST", BASE_ERROR_CODES.INVALID_PASSWORD);
|
|
88
98
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
data: secret
|
|
93
|
-
});
|
|
94
|
-
const backupCodes = await generateBackupCodes(ctx.context.secretConfig, backupCodeOptions);
|
|
95
|
-
if (options?.skipVerificationOnEnable) {
|
|
99
|
+
if (method === "otp" && !options?.otpOptions?.sendOTP) throw APIError.from("BAD_REQUEST", TWO_FACTOR_ERROR_CODES.OTP_NOT_CONFIGURED);
|
|
100
|
+
if (method === "totp" && options?.totpOptions?.disable) throw APIError.from("BAD_REQUEST", TWO_FACTOR_ERROR_CODES.TOTP_NOT_CONFIGURED);
|
|
101
|
+
if (method === "otp") {
|
|
96
102
|
const updatedUser = await ctx.context.internalAdapter.updateUser(user.id, { twoFactorEnabled: true });
|
|
97
|
-
/**
|
|
98
|
-
* Update the session cookie with the new user data
|
|
99
|
-
*/
|
|
100
103
|
await setSessionCookie(ctx, {
|
|
101
104
|
session: await ctx.context.internalAdapter.createSession(updatedUser.id, false, ctx.context.session.session),
|
|
102
105
|
user: updatedUser
|
|
103
106
|
});
|
|
104
107
|
await ctx.context.internalAdapter.deleteSession(ctx.context.session.session.token);
|
|
108
|
+
return ctx.json({ method: "otp" });
|
|
105
109
|
}
|
|
110
|
+
const backupCodes = await generateBackupCodes(ctx.context.secretConfig, backupCodeOptions);
|
|
106
111
|
const existingTwoFactor = await ctx.context.adapter.findOne({
|
|
107
112
|
model: opts.twoFactorTable,
|
|
108
113
|
where: [{
|
|
@@ -110,20 +115,37 @@ const twoFactor = (options) => {
|
|
|
110
115
|
value: user.id
|
|
111
116
|
}]
|
|
112
117
|
});
|
|
113
|
-
|
|
118
|
+
const secret = generateRandomString(32);
|
|
119
|
+
const encryptedSecret = await symmetricEncrypt({
|
|
120
|
+
key: ctx.context.secretConfig,
|
|
121
|
+
data: secret
|
|
122
|
+
});
|
|
123
|
+
if (options?.skipVerificationOnEnable) {
|
|
124
|
+
const updatedUser = await ctx.context.internalAdapter.updateUser(user.id, { twoFactorEnabled: true });
|
|
125
|
+
await setSessionCookie(ctx, {
|
|
126
|
+
session: await ctx.context.internalAdapter.createSession(updatedUser.id, false, ctx.context.session.session),
|
|
127
|
+
user: updatedUser
|
|
128
|
+
});
|
|
129
|
+
await ctx.context.internalAdapter.deleteSession(ctx.context.session.session.token);
|
|
130
|
+
}
|
|
131
|
+
const totpData = {
|
|
132
|
+
secret: encryptedSecret,
|
|
133
|
+
backupCodes: backupCodes.encryptedBackupCodes,
|
|
134
|
+
verified: existingTwoFactor != null && existingTwoFactor.verified === true || !!options?.skipVerificationOnEnable
|
|
135
|
+
};
|
|
136
|
+
if (existingTwoFactor) await ctx.context.adapter.update({
|
|
114
137
|
model: opts.twoFactorTable,
|
|
138
|
+
update: totpData,
|
|
115
139
|
where: [{
|
|
116
|
-
field: "
|
|
117
|
-
value:
|
|
140
|
+
field: "id",
|
|
141
|
+
value: existingTwoFactor.id
|
|
118
142
|
}]
|
|
119
143
|
});
|
|
120
|
-
await ctx.context.adapter.create({
|
|
144
|
+
else await ctx.context.adapter.create({
|
|
121
145
|
model: opts.twoFactorTable,
|
|
122
146
|
data: {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
userId: user.id,
|
|
126
|
-
verified: existingTwoFactor != null && existingTwoFactor.verified !== false || !!options?.skipVerificationOnEnable
|
|
147
|
+
...totpData,
|
|
148
|
+
userId: user.id
|
|
127
149
|
}
|
|
128
150
|
});
|
|
129
151
|
const totpURI = createOTP(secret, {
|
|
@@ -131,6 +153,7 @@ const twoFactor = (options) => {
|
|
|
131
153
|
period: options?.totpOptions?.period
|
|
132
154
|
}).url(issuer || options?.issuer || ctx.context.appName, user.email);
|
|
133
155
|
return ctx.json({
|
|
156
|
+
method: "totp",
|
|
134
157
|
totpURI,
|
|
135
158
|
backupCodes: backupCodes.backupCodes
|
|
136
159
|
});
|
|
@@ -228,6 +228,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
228
228
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
229
229
|
state: zod.ZodOptional<zod.ZodString>;
|
|
230
230
|
user: zod.ZodOptional<zod.ZodString>;
|
|
231
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
231
232
|
}, zod_v4_core0.$strip>>;
|
|
232
233
|
query: zod.ZodOptional<zod.ZodObject<{
|
|
233
234
|
code: zod.ZodOptional<zod.ZodString>;
|
|
@@ -236,6 +237,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
236
237
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
237
238
|
state: zod.ZodOptional<zod.ZodString>;
|
|
238
239
|
user: zod.ZodOptional<zod.ZodString>;
|
|
240
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
239
241
|
}, zod_v4_core0.$strip>>;
|
|
240
242
|
metadata: {
|
|
241
243
|
allowedMediaTypes: string[];
|
|
@@ -2231,6 +2233,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
2231
2233
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
2232
2234
|
state: zod.ZodOptional<zod.ZodString>;
|
|
2233
2235
|
user: zod.ZodOptional<zod.ZodString>;
|
|
2236
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
2234
2237
|
}, zod_v4_core0.$strip>>;
|
|
2235
2238
|
query: zod.ZodOptional<zod.ZodObject<{
|
|
2236
2239
|
code: zod.ZodOptional<zod.ZodString>;
|
|
@@ -2239,6 +2242,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
2239
2242
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
2240
2243
|
state: zod.ZodOptional<zod.ZodString>;
|
|
2241
2244
|
user: zod.ZodOptional<zod.ZodString>;
|
|
2245
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
2242
2246
|
}, zod_v4_core0.$strip>>;
|
|
2243
2247
|
metadata: {
|
|
2244
2248
|
allowedMediaTypes: string[];
|
|
@@ -4237,6 +4241,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
4237
4241
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
4238
4242
|
state: zod.ZodOptional<zod.ZodString>;
|
|
4239
4243
|
user: zod.ZodOptional<zod.ZodString>;
|
|
4244
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
4240
4245
|
}, zod_v4_core0.$strip>>;
|
|
4241
4246
|
query: zod.ZodOptional<zod.ZodObject<{
|
|
4242
4247
|
code: zod.ZodOptional<zod.ZodString>;
|
|
@@ -4245,6 +4250,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
4245
4250
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
4246
4251
|
state: zod.ZodOptional<zod.ZodString>;
|
|
4247
4252
|
user: zod.ZodOptional<zod.ZodString>;
|
|
4253
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
4248
4254
|
}, zod_v4_core0.$strip>>;
|
|
4249
4255
|
metadata: {
|
|
4250
4256
|
allowedMediaTypes: string[];
|
|
@@ -6240,6 +6246,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
6240
6246
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
6241
6247
|
state: zod.ZodOptional<zod.ZodString>;
|
|
6242
6248
|
user: zod.ZodOptional<zod.ZodString>;
|
|
6249
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
6243
6250
|
}, zod_v4_core0.$strip>>;
|
|
6244
6251
|
query: zod.ZodOptional<zod.ZodObject<{
|
|
6245
6252
|
code: zod.ZodOptional<zod.ZodString>;
|
|
@@ -6248,6 +6255,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
6248
6255
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
6249
6256
|
state: zod.ZodOptional<zod.ZodString>;
|
|
6250
6257
|
user: zod.ZodOptional<zod.ZodString>;
|
|
6258
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
6251
6259
|
}, zod_v4_core0.$strip>>;
|
|
6252
6260
|
metadata: {
|
|
6253
6261
|
allowedMediaTypes: string[];
|
|
@@ -8317,6 +8325,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
8317
8325
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
8318
8326
|
state: zod.ZodOptional<zod.ZodString>;
|
|
8319
8327
|
user: zod.ZodOptional<zod.ZodString>;
|
|
8328
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
8320
8329
|
}, zod_v4_core0.$strip>>;
|
|
8321
8330
|
query: zod.ZodOptional<zod.ZodObject<{
|
|
8322
8331
|
code: zod.ZodOptional<zod.ZodString>;
|
|
@@ -8325,6 +8334,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
8325
8334
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
8326
8335
|
state: zod.ZodOptional<zod.ZodString>;
|
|
8327
8336
|
user: zod.ZodOptional<zod.ZodString>;
|
|
8337
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
8328
8338
|
}, zod_v4_core0.$strip>>;
|
|
8329
8339
|
metadata: {
|
|
8330
8340
|
allowedMediaTypes: string[];
|
|
@@ -10320,6 +10330,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
10320
10330
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
10321
10331
|
state: zod.ZodOptional<zod.ZodString>;
|
|
10322
10332
|
user: zod.ZodOptional<zod.ZodString>;
|
|
10333
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
10323
10334
|
}, zod_v4_core0.$strip>>;
|
|
10324
10335
|
query: zod.ZodOptional<zod.ZodObject<{
|
|
10325
10336
|
code: zod.ZodOptional<zod.ZodString>;
|
|
@@ -10328,6 +10339,7 @@ declare function getTestInstance<O extends Partial<BetterAuthOptions>, C extends
|
|
|
10328
10339
|
error_description: zod.ZodOptional<zod.ZodString>;
|
|
10329
10340
|
state: zod.ZodOptional<zod.ZodString>;
|
|
10330
10341
|
user: zod.ZodOptional<zod.ZodString>;
|
|
10342
|
+
iss: zod.ZodOptional<zod.ZodString>;
|
|
10331
10343
|
}, zod_v4_core0.$strip>>;
|
|
10332
10344
|
metadata: {
|
|
10333
10345
|
allowedMediaTypes: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-auth",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0-beta.1",
|
|
4
4
|
"description": "The most comprehensive authentication framework for TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -489,13 +489,13 @@
|
|
|
489
489
|
"kysely": "^0.28.14",
|
|
490
490
|
"nanostores": "^1.1.1",
|
|
491
491
|
"zod": "^4.3.6",
|
|
492
|
-
"@better-auth/core": "1.
|
|
493
|
-
"@better-auth/drizzle-adapter": "1.
|
|
494
|
-
"@better-auth/kysely-adapter": "1.
|
|
495
|
-
"@better-auth/memory-adapter": "1.
|
|
496
|
-
"@better-auth/mongo-adapter": "1.
|
|
497
|
-
"@better-auth/prisma-adapter": "1.
|
|
498
|
-
"@better-auth/telemetry": "1.
|
|
492
|
+
"@better-auth/core": "1.7.0-beta.1",
|
|
493
|
+
"@better-auth/drizzle-adapter": "1.7.0-beta.1",
|
|
494
|
+
"@better-auth/kysely-adapter": "1.7.0-beta.1",
|
|
495
|
+
"@better-auth/memory-adapter": "1.7.0-beta.1",
|
|
496
|
+
"@better-auth/mongo-adapter": "1.7.0-beta.1",
|
|
497
|
+
"@better-auth/prisma-adapter": "1.7.0-beta.1",
|
|
498
|
+
"@better-auth/telemetry": "1.7.0-beta.1"
|
|
499
499
|
},
|
|
500
500
|
"devDependencies": {
|
|
501
501
|
"@lynx-js/react": "^0.116.3",
|