better-auth 1.4.21 → 1.4.22
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 +407 -407
- package/dist/api/middlewares/origin-check.d.mts +4 -4
- package/dist/api/routes/account.d.mts +11 -11
- package/dist/api/routes/callback.d.mts +2 -2
- package/dist/api/routes/email-verification.d.mts +4 -4
- package/dist/api/routes/error.d.mts +2 -2
- package/dist/api/routes/ok.d.mts +2 -2
- package/dist/api/routes/password.d.mts +7 -7
- package/dist/api/routes/sign-in.d.mts +4 -4
- package/dist/api/routes/sign-out.d.mts +2 -2
- package/dist/api/routes/sign-up.d.mts +3 -3
- package/dist/api/routes/update-user.d.mts +13 -13
- package/dist/client/lynx/index.d.mts +15 -15
- package/dist/client/react/index.d.mts +15 -15
- package/dist/client/solid/index.d.mts +13 -13
- package/dist/client/svelte/index.d.mts +13 -13
- package/dist/client/vanilla.d.mts +15 -15
- package/dist/client/vue/index.d.mts +15 -15
- package/dist/db/field.d.mts +6 -6
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/svelte-kit.d.mts +2 -2
- package/dist/integrations/tanstack-start-solid.d.mts +4 -4
- package/dist/integrations/tanstack-start.d.mts +4 -4
- package/dist/plugins/admin/admin.d.mts +114 -114
- package/dist/plugins/anonymous/index.d.mts +5 -5
- package/dist/plugins/api-key/index.d.mts +79 -79
- package/dist/plugins/bearer/index.d.mts +6 -6
- package/dist/plugins/captcha/index.d.mts +2 -2
- package/dist/plugins/custom-session/index.d.mts +5 -5
- package/dist/plugins/device-authorization/index.d.mts +6 -6
- package/dist/plugins/email-otp/index.d.mts +52 -52
- package/dist/plugins/generic-oauth/index.d.mts +32 -32
- package/dist/plugins/haveibeenpwned/index.d.mts +3 -3
- package/dist/plugins/jwt/client.d.mts +2 -2
- package/dist/plugins/jwt/index.d.mts +7 -7
- package/dist/plugins/last-login-method/index.d.mts +4 -4
- package/dist/plugins/magic-link/index.d.mts +4 -4
- package/dist/plugins/mcp/index.d.mts +10 -10
- package/dist/plugins/multi-session/index.d.mts +9 -9
- package/dist/plugins/oauth-proxy/index.d.mts +8 -8
- package/dist/plugins/oidc-provider/index.d.mts +13 -13
- package/dist/plugins/one-tap/client.d.mts +4 -4
- package/dist/plugins/one-tap/index.d.mts +2 -2
- package/dist/plugins/one-time-token/index.d.mts +5 -5
- package/dist/plugins/open-api/index.d.mts +3 -3
- package/dist/plugins/organization/adapter.d.mts +24 -24
- package/dist/plugins/organization/client.d.mts +8 -8
- package/dist/plugins/organization/organization.d.mts +7 -7
- package/dist/plugins/organization/routes/crud-access-control.d.mts +22 -22
- package/dist/plugins/organization/routes/crud-invites.d.mts +69 -69
- package/dist/plugins/organization/routes/crud-members.d.mts +67 -67
- package/dist/plugins/organization/routes/crud-org.d.mts +59 -59
- package/dist/plugins/organization/routes/crud-team.d.mts +79 -79
- package/dist/plugins/phone-number/index.d.mts +33 -33
- package/dist/plugins/siwe/index.d.mts +3 -3
- package/dist/plugins/two-factor/backup-codes/index.d.mts +5 -5
- package/dist/plugins/two-factor/index.d.mts +16 -16
- package/dist/plugins/two-factor/otp/index.d.mts +3 -3
- package/dist/plugins/two-factor/totp/index.d.mts +5 -5
- package/dist/plugins/username/index.d.mts +9 -9
- package/dist/plugins/username/schema.d.mts +3 -3
- package/dist/test-utils/test-instance.d.mts +1225 -1225
- package/package.json +3 -3
|
@@ -10,11 +10,11 @@ import { PatreonOptions, patreon } from "./providers/patreon.mjs";
|
|
|
10
10
|
import { SlackOptions, slack } from "./providers/slack.mjs";
|
|
11
11
|
import "./providers/index.mjs";
|
|
12
12
|
import { AuthContext } from "@better-auth/core";
|
|
13
|
-
import * as
|
|
13
|
+
import * as _better_auth_core_oauth20 from "@better-auth/core/oauth2";
|
|
14
14
|
import { OAuthProvider } from "@better-auth/core/oauth2";
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
15
|
+
import * as better_call37 from "better-call";
|
|
16
|
+
import * as zod26 from "zod";
|
|
17
|
+
import * as zod_v4_core8 from "zod/v4/core";
|
|
18
18
|
|
|
19
19
|
//#region src/plugins/generic-oauth/index.d.ts
|
|
20
20
|
/**
|
|
@@ -32,22 +32,22 @@ declare const genericOAuth: (options: GenericOAuthOptions) => {
|
|
|
32
32
|
id: "generic-oauth";
|
|
33
33
|
init: (ctx: AuthContext) => {
|
|
34
34
|
context: {
|
|
35
|
-
socialProviders: OAuthProvider<Record<string, any>, Partial<
|
|
35
|
+
socialProviders: OAuthProvider<Record<string, any>, Partial<_better_auth_core_oauth20.ProviderOptions<any>>>[];
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
endpoints: {
|
|
39
|
-
signInWithOAuth2:
|
|
39
|
+
signInWithOAuth2: better_call37.StrictEndpoint<"/sign-in/oauth2", {
|
|
40
40
|
method: "POST";
|
|
41
|
-
body:
|
|
42
|
-
providerId:
|
|
43
|
-
callbackURL:
|
|
44
|
-
errorCallbackURL:
|
|
45
|
-
newUserCallbackURL:
|
|
46
|
-
disableRedirect:
|
|
47
|
-
scopes:
|
|
48
|
-
requestSignUp:
|
|
49
|
-
additionalData:
|
|
50
|
-
},
|
|
41
|
+
body: zod26.ZodObject<{
|
|
42
|
+
providerId: zod26.ZodString;
|
|
43
|
+
callbackURL: zod26.ZodOptional<zod26.ZodString>;
|
|
44
|
+
errorCallbackURL: zod26.ZodOptional<zod26.ZodString>;
|
|
45
|
+
newUserCallbackURL: zod26.ZodOptional<zod26.ZodString>;
|
|
46
|
+
disableRedirect: zod26.ZodOptional<zod26.ZodBoolean>;
|
|
47
|
+
scopes: zod26.ZodOptional<zod26.ZodArray<zod26.ZodString>>;
|
|
48
|
+
requestSignUp: zod26.ZodOptional<zod26.ZodBoolean>;
|
|
49
|
+
additionalData: zod26.ZodOptional<zod26.ZodRecord<zod26.ZodString, zod26.ZodAny>>;
|
|
50
|
+
}, zod_v4_core8.$strip>;
|
|
51
51
|
metadata: {
|
|
52
52
|
openapi: {
|
|
53
53
|
description: string;
|
|
@@ -77,15 +77,15 @@ declare const genericOAuth: (options: GenericOAuthOptions) => {
|
|
|
77
77
|
url: string;
|
|
78
78
|
redirect: boolean;
|
|
79
79
|
}>;
|
|
80
|
-
oAuth2Callback:
|
|
80
|
+
oAuth2Callback: better_call37.StrictEndpoint<"/oauth2/callback/:providerId", {
|
|
81
81
|
method: "GET";
|
|
82
|
-
query:
|
|
83
|
-
code:
|
|
84
|
-
error:
|
|
85
|
-
error_description:
|
|
86
|
-
state:
|
|
87
|
-
iss:
|
|
88
|
-
},
|
|
82
|
+
query: zod26.ZodObject<{
|
|
83
|
+
code: zod26.ZodOptional<zod26.ZodString>;
|
|
84
|
+
error: zod26.ZodOptional<zod26.ZodString>;
|
|
85
|
+
error_description: zod26.ZodOptional<zod26.ZodString>;
|
|
86
|
+
state: zod26.ZodOptional<zod26.ZodString>;
|
|
87
|
+
iss: zod26.ZodOptional<zod26.ZodString>;
|
|
88
|
+
}, zod_v4_core8.$strip>;
|
|
89
89
|
metadata: {
|
|
90
90
|
allowedMediaTypes: string[];
|
|
91
91
|
openapi: {
|
|
@@ -111,15 +111,15 @@ declare const genericOAuth: (options: GenericOAuthOptions) => {
|
|
|
111
111
|
scope: "server";
|
|
112
112
|
};
|
|
113
113
|
}, void>;
|
|
114
|
-
oAuth2LinkAccount:
|
|
114
|
+
oAuth2LinkAccount: better_call37.StrictEndpoint<"/oauth2/link", {
|
|
115
115
|
method: "POST";
|
|
116
|
-
body:
|
|
117
|
-
providerId:
|
|
118
|
-
callbackURL:
|
|
119
|
-
scopes:
|
|
120
|
-
errorCallbackURL:
|
|
121
|
-
},
|
|
122
|
-
use: ((inputContext:
|
|
116
|
+
body: zod26.ZodObject<{
|
|
117
|
+
providerId: zod26.ZodString;
|
|
118
|
+
callbackURL: zod26.ZodString;
|
|
119
|
+
scopes: zod26.ZodOptional<zod26.ZodArray<zod26.ZodString>>;
|
|
120
|
+
errorCallbackURL: zod26.ZodOptional<zod26.ZodString>;
|
|
121
|
+
}, zod_v4_core8.$strip>;
|
|
122
|
+
use: ((inputContext: better_call37.MiddlewareInputContext<better_call37.MiddlewareOptions>) => Promise<{
|
|
123
123
|
session: {
|
|
124
124
|
session: Record<string, any> & {
|
|
125
125
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _better_auth_core16 from "@better-auth/core";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/haveibeenpwned/index.d.ts
|
|
4
4
|
interface HaveIBeenPwnedOptions {
|
|
@@ -12,7 +12,7 @@ interface HaveIBeenPwnedOptions {
|
|
|
12
12
|
}
|
|
13
13
|
declare const haveIBeenPwned: (options?: HaveIBeenPwnedOptions | undefined) => {
|
|
14
14
|
id: "haveIBeenPwned";
|
|
15
|
-
init(ctx:
|
|
15
|
+
init(ctx: _better_auth_core16.AuthContext): {
|
|
16
16
|
context: {
|
|
17
17
|
password: {
|
|
18
18
|
hash(password: string): Promise<string>;
|
|
@@ -24,7 +24,7 @@ declare const haveIBeenPwned: (options?: HaveIBeenPwnedOptions | undefined) => {
|
|
|
24
24
|
minPasswordLength: number;
|
|
25
25
|
maxPasswordLength: number;
|
|
26
26
|
};
|
|
27
|
-
checkPassword: (userId: string, ctx:
|
|
27
|
+
checkPassword: (userId: string, ctx: _better_auth_core16.GenericEndpointContext<_better_auth_core16.BetterAuthOptions>) => Promise<boolean>;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JWKOptions, JWSAlgorithms, Jwk, JwtOptions } from "./types.mjs";
|
|
2
2
|
import { jwt } from "./index.mjs";
|
|
3
3
|
import { JSONWebKeySet } from "jose";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _better_fetch_fetch111 from "@better-fetch/fetch";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/jwt/client.d.ts
|
|
7
7
|
interface JwtClientOptions {
|
|
@@ -21,7 +21,7 @@ declare const jwtClient: (options?: JwtClientOptions) => {
|
|
|
21
21
|
pathMethods: {
|
|
22
22
|
[x: string]: "GET";
|
|
23
23
|
};
|
|
24
|
-
getActions: ($fetch:
|
|
24
|
+
getActions: ($fetch: _better_fetch_fetch111.BetterFetch) => {
|
|
25
25
|
jwks: (fetchOptions?: any) => Promise<{
|
|
26
26
|
data: null;
|
|
27
27
|
error: {
|
|
@@ -3,7 +3,7 @@ import { getJwtToken, signJWT } from "./sign.mjs";
|
|
|
3
3
|
import { createJwk, generateExportedKeyPair, toExpJWT } from "./utils.mjs";
|
|
4
4
|
import { verifyJWT } from "./verify.mjs";
|
|
5
5
|
import * as _better_auth_core8 from "@better-auth/core";
|
|
6
|
-
import * as
|
|
6
|
+
import * as better_call42 from "better-call";
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
import { JSONWebKeySet, JWTPayload } from "jose";
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ declare const jwt: <O extends JwtOptions>(options?: O) => {
|
|
|
12
12
|
id: "jwt";
|
|
13
13
|
options: NoInfer<O>;
|
|
14
14
|
endpoints: {
|
|
15
|
-
getJwks:
|
|
15
|
+
getJwks: better_call42.StrictEndpoint<string, {
|
|
16
16
|
method: "GET";
|
|
17
17
|
metadata: {
|
|
18
18
|
openapi: {
|
|
@@ -89,10 +89,10 @@ declare const jwt: <O extends JwtOptions>(options?: O) => {
|
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
}, JSONWebKeySet>;
|
|
92
|
-
getToken:
|
|
92
|
+
getToken: better_call42.StrictEndpoint<"/token", {
|
|
93
93
|
method: "GET";
|
|
94
94
|
requireHeaders: true;
|
|
95
|
-
use: ((inputContext:
|
|
95
|
+
use: ((inputContext: better_call42.MiddlewareInputContext<better_call42.MiddlewareOptions>) => Promise<{
|
|
96
96
|
session: {
|
|
97
97
|
session: Record<string, any> & {
|
|
98
98
|
id: string;
|
|
@@ -141,7 +141,7 @@ declare const jwt: <O extends JwtOptions>(options?: O) => {
|
|
|
141
141
|
}, {
|
|
142
142
|
token: string;
|
|
143
143
|
}>;
|
|
144
|
-
signJWT:
|
|
144
|
+
signJWT: better_call42.StrictEndpoint<string, {
|
|
145
145
|
method: "POST";
|
|
146
146
|
metadata: {
|
|
147
147
|
$Infer: {
|
|
@@ -158,7 +158,7 @@ declare const jwt: <O extends JwtOptions>(options?: O) => {
|
|
|
158
158
|
}, {
|
|
159
159
|
token: string;
|
|
160
160
|
}>;
|
|
161
|
-
verifyJWT:
|
|
161
|
+
verifyJWT: better_call42.StrictEndpoint<string, {
|
|
162
162
|
method: "POST";
|
|
163
163
|
metadata: {
|
|
164
164
|
$Infer: {
|
|
@@ -186,7 +186,7 @@ declare const jwt: <O extends JwtOptions>(options?: O) => {
|
|
|
186
186
|
hooks: {
|
|
187
187
|
after: {
|
|
188
188
|
matcher(context: _better_auth_core8.HookEndpointContext): boolean;
|
|
189
|
-
handler: (inputContext:
|
|
189
|
+
handler: (inputContext: better_call42.MiddlewareInputContext<better_call42.MiddlewareOptions>) => Promise<void>;
|
|
190
190
|
}[];
|
|
191
191
|
};
|
|
192
192
|
schema: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _better_auth_core37 from "@better-auth/core";
|
|
2
2
|
import { GenericEndpointContext } from "@better-auth/core";
|
|
3
|
-
import * as
|
|
3
|
+
import * as better_call688 from "better-call";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/last-login-method/index.d.ts
|
|
6
6
|
/**
|
|
@@ -43,7 +43,7 @@ interface LastLoginMethodOptions {
|
|
|
43
43
|
*/
|
|
44
44
|
declare const lastLoginMethod: <O extends LastLoginMethodOptions>(userConfig?: O | undefined) => {
|
|
45
45
|
id: "last-login-method";
|
|
46
|
-
init(ctx:
|
|
46
|
+
init(ctx: _better_auth_core37.AuthContext): {
|
|
47
47
|
options: {
|
|
48
48
|
databaseHooks: {
|
|
49
49
|
user: {
|
|
@@ -90,7 +90,7 @@ declare const lastLoginMethod: <O extends LastLoginMethodOptions>(userConfig?: O
|
|
|
90
90
|
hooks: {
|
|
91
91
|
after: {
|
|
92
92
|
matcher(): true;
|
|
93
|
-
handler: (inputContext:
|
|
93
|
+
handler: (inputContext: better_call688.MiddlewareInputContext<better_call688.MiddlewareOptions>) => Promise<void>;
|
|
94
94
|
}[];
|
|
95
95
|
};
|
|
96
96
|
schema: O["storeInDatabase"] extends true ? {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Awaitable, GenericEndpointContext } from "@better-auth/core";
|
|
2
|
-
import * as
|
|
2
|
+
import * as better_call75 from "better-call";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/magic-link/index.d.ts
|
|
@@ -68,7 +68,7 @@ declare const magicLink: (options: MagicLinkOptions) => {
|
|
|
68
68
|
*
|
|
69
69
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/sign-in#api-method-sign-in-magic-link)
|
|
70
70
|
*/
|
|
71
|
-
signInMagicLink:
|
|
71
|
+
signInMagicLink: better_call75.StrictEndpoint<"/sign-in/magic-link", {
|
|
72
72
|
method: "POST";
|
|
73
73
|
requireHeaders: true;
|
|
74
74
|
body: z.ZodObject<{
|
|
@@ -119,7 +119,7 @@ declare const magicLink: (options: MagicLinkOptions) => {
|
|
|
119
119
|
*
|
|
120
120
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/magic-link#api-method-magic-link-verify)
|
|
121
121
|
*/
|
|
122
|
-
magicLinkVerify:
|
|
122
|
+
magicLinkVerify: better_call75.StrictEndpoint<"/magic-link/verify", {
|
|
123
123
|
method: "GET";
|
|
124
124
|
query: z.ZodObject<{
|
|
125
125
|
token: z.ZodString;
|
|
@@ -127,7 +127,7 @@ declare const magicLink: (options: MagicLinkOptions) => {
|
|
|
127
127
|
errorCallbackURL: z.ZodOptional<z.ZodString>;
|
|
128
128
|
newUserCallbackURL: z.ZodOptional<z.ZodString>;
|
|
129
129
|
}, z.core.$strip>;
|
|
130
|
-
use: ((inputContext:
|
|
130
|
+
use: ((inputContext: better_call75.MiddlewareInputContext<better_call75.MiddlewareOptions>) => Promise<void>)[];
|
|
131
131
|
requireHeaders: true;
|
|
132
132
|
metadata: {
|
|
133
133
|
openapi: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OAuthAccessToken, OIDCMetadata, OIDCOptions } from "../oidc-provider/types.mjs";
|
|
2
2
|
import "../oidc-provider/index.mjs";
|
|
3
3
|
import { BetterAuthOptions, GenericEndpointContext } from "@better-auth/core";
|
|
4
|
-
import * as
|
|
4
|
+
import * as better_call690 from "better-call";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/mcp/index.d.ts
|
|
@@ -24,18 +24,18 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
24
24
|
hooks: {
|
|
25
25
|
after: {
|
|
26
26
|
matcher(): true;
|
|
27
|
-
handler: (inputContext:
|
|
27
|
+
handler: (inputContext: better_call690.MiddlewareInputContext<better_call690.MiddlewareOptions>) => Promise<void>;
|
|
28
28
|
}[];
|
|
29
29
|
};
|
|
30
30
|
endpoints: {
|
|
31
|
-
oAuthConsent:
|
|
31
|
+
oAuthConsent: better_call690.StrictEndpoint<"/oauth2/consent", {
|
|
32
32
|
method: "POST";
|
|
33
33
|
operationId: string;
|
|
34
34
|
body: z.ZodObject<{
|
|
35
35
|
accept: z.ZodBoolean;
|
|
36
36
|
consent_code: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
37
37
|
}, z.core.$strip>;
|
|
38
|
-
use: ((inputContext:
|
|
38
|
+
use: ((inputContext: better_call690.MiddlewareInputContext<better_call690.MiddlewareOptions>) => Promise<{
|
|
39
39
|
session: {
|
|
40
40
|
session: Record<string, any> & {
|
|
41
41
|
id: string;
|
|
@@ -107,13 +107,13 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
107
107
|
}, {
|
|
108
108
|
redirectURI: string;
|
|
109
109
|
}>;
|
|
110
|
-
getMcpOAuthConfig:
|
|
110
|
+
getMcpOAuthConfig: better_call690.StrictEndpoint<"/.well-known/oauth-authorization-server", {
|
|
111
111
|
method: "GET";
|
|
112
112
|
metadata: {
|
|
113
113
|
readonly scope: "server";
|
|
114
114
|
};
|
|
115
115
|
}, OIDCMetadata | null>;
|
|
116
|
-
getMCPProtectedResource:
|
|
116
|
+
getMCPProtectedResource: better_call690.StrictEndpoint<"/.well-known/oauth-protected-resource", {
|
|
117
117
|
method: "GET";
|
|
118
118
|
metadata: {
|
|
119
119
|
readonly scope: "server";
|
|
@@ -126,7 +126,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
126
126
|
bearer_methods_supported: string[];
|
|
127
127
|
resource_signing_alg_values_supported: string[];
|
|
128
128
|
}>;
|
|
129
|
-
mcpOAuthAuthorize:
|
|
129
|
+
mcpOAuthAuthorize: better_call690.StrictEndpoint<"/mcp/authorize", {
|
|
130
130
|
method: "GET";
|
|
131
131
|
query: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
132
132
|
metadata: {
|
|
@@ -149,7 +149,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
149
149
|
};
|
|
150
150
|
};
|
|
151
151
|
}, void>;
|
|
152
|
-
mcpOAuthToken:
|
|
152
|
+
mcpOAuthToken: better_call690.StrictEndpoint<"/mcp/token", {
|
|
153
153
|
method: "POST";
|
|
154
154
|
body: z.ZodRecord<z.ZodAny, z.ZodAny>;
|
|
155
155
|
metadata: {
|
|
@@ -170,7 +170,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
170
170
|
scope: string;
|
|
171
171
|
id_token: string | undefined;
|
|
172
172
|
}>;
|
|
173
|
-
registerMcpClient:
|
|
173
|
+
registerMcpClient: better_call690.StrictEndpoint<"/mcp/register", {
|
|
174
174
|
method: "POST";
|
|
175
175
|
body: z.ZodObject<{
|
|
176
176
|
redirect_uris: z.ZodArray<z.ZodString>;
|
|
@@ -288,7 +288,7 @@ declare const mcp: (options: MCPOptions) => {
|
|
|
288
288
|
};
|
|
289
289
|
};
|
|
290
290
|
}, Response>;
|
|
291
|
-
getMcpSession:
|
|
291
|
+
getMcpSession: better_call690.StrictEndpoint<"/mcp/get-session", {
|
|
292
292
|
method: "GET";
|
|
293
293
|
requireHeaders: true;
|
|
294
294
|
}, OAuthAccessToken | null>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _better_auth_core9 from "@better-auth/core";
|
|
2
|
+
import * as better_call66 from "better-call";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/multi-session/index.d.ts
|
|
@@ -29,7 +29,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
29
29
|
*
|
|
30
30
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/multi-session#api-method-multi-session-list-device-sessions)
|
|
31
31
|
*/
|
|
32
|
-
listDeviceSessions:
|
|
32
|
+
listDeviceSessions: better_call66.StrictEndpoint<"/multi-session/list-device-sessions", {
|
|
33
33
|
method: "GET";
|
|
34
34
|
requireHeaders: true;
|
|
35
35
|
}, {
|
|
@@ -68,13 +68,13 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
68
68
|
*
|
|
69
69
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/multi-session#api-method-multi-session-set-active)
|
|
70
70
|
*/
|
|
71
|
-
setActiveSession:
|
|
71
|
+
setActiveSession: better_call66.StrictEndpoint<"/multi-session/set-active", {
|
|
72
72
|
method: "POST";
|
|
73
73
|
body: z.ZodObject<{
|
|
74
74
|
sessionToken: z.ZodString;
|
|
75
75
|
}, z.core.$strip>;
|
|
76
76
|
requireHeaders: true;
|
|
77
|
-
use: ((inputContext:
|
|
77
|
+
use: ((inputContext: better_call66.MiddlewareInputContext<better_call66.MiddlewareOptions>) => Promise<{
|
|
78
78
|
session: {
|
|
79
79
|
session: Record<string, any> & {
|
|
80
80
|
id: string;
|
|
@@ -155,13 +155,13 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
155
155
|
*
|
|
156
156
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/multi-session#api-method-multi-session-revoke)
|
|
157
157
|
*/
|
|
158
|
-
revokeDeviceSession:
|
|
158
|
+
revokeDeviceSession: better_call66.StrictEndpoint<"/multi-session/revoke", {
|
|
159
159
|
method: "POST";
|
|
160
160
|
body: z.ZodObject<{
|
|
161
161
|
sessionToken: z.ZodString;
|
|
162
162
|
}, z.core.$strip>;
|
|
163
163
|
requireHeaders: true;
|
|
164
|
-
use: ((inputContext:
|
|
164
|
+
use: ((inputContext: better_call66.MiddlewareInputContext<better_call66.MiddlewareOptions>) => Promise<{
|
|
165
165
|
session: {
|
|
166
166
|
session: Record<string, any> & {
|
|
167
167
|
id: string;
|
|
@@ -212,8 +212,8 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
212
212
|
};
|
|
213
213
|
hooks: {
|
|
214
214
|
after: {
|
|
215
|
-
matcher: (context:
|
|
216
|
-
handler: (inputContext:
|
|
215
|
+
matcher: (context: _better_auth_core9.HookEndpointContext) => boolean;
|
|
216
|
+
handler: (inputContext: better_call66.MiddlewareInputContext<better_call66.MiddlewareOptions>) => Promise<void>;
|
|
217
217
|
}[];
|
|
218
218
|
};
|
|
219
219
|
options: MultiSessionConfig | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _better_auth_core2 from "@better-auth/core";
|
|
2
|
+
import * as better_call15 from "better-call";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/oauth-proxy/index.d.ts
|
|
@@ -34,14 +34,14 @@ declare const oAuthProxy: <O extends OAuthProxyOptions>(opts?: O) => {
|
|
|
34
34
|
id: "oauth-proxy";
|
|
35
35
|
options: NoInfer<O>;
|
|
36
36
|
endpoints: {
|
|
37
|
-
oAuthProxy:
|
|
37
|
+
oAuthProxy: better_call15.StrictEndpoint<"/oauth-proxy-callback", {
|
|
38
38
|
method: "GET";
|
|
39
39
|
operationId: string;
|
|
40
40
|
query: z.ZodObject<{
|
|
41
41
|
callbackURL: z.ZodString;
|
|
42
42
|
cookies: z.ZodString;
|
|
43
43
|
}, z.core.$strip>;
|
|
44
|
-
use: ((inputContext:
|
|
44
|
+
use: ((inputContext: better_call15.MiddlewareInputContext<better_call15.MiddlewareOptions>) => Promise<void>)[];
|
|
45
45
|
metadata: {
|
|
46
46
|
openapi: {
|
|
47
47
|
operationId: string;
|
|
@@ -71,12 +71,12 @@ declare const oAuthProxy: <O extends OAuthProxyOptions>(opts?: O) => {
|
|
|
71
71
|
};
|
|
72
72
|
hooks: {
|
|
73
73
|
before: {
|
|
74
|
-
matcher(context:
|
|
75
|
-
handler: (inputContext:
|
|
74
|
+
matcher(context: _better_auth_core2.HookEndpointContext): boolean;
|
|
75
|
+
handler: (inputContext: better_call15.MiddlewareInputContext<better_call15.MiddlewareOptions>) => Promise<void>;
|
|
76
76
|
}[];
|
|
77
77
|
after: {
|
|
78
|
-
matcher(context:
|
|
79
|
-
handler: (inputContext:
|
|
78
|
+
matcher(context: _better_auth_core2.HookEndpointContext): boolean;
|
|
79
|
+
handler: (inputContext: better_call15.MiddlewareInputContext<better_call15.MiddlewareOptions>) => Promise<void>;
|
|
80
80
|
}[];
|
|
81
81
|
};
|
|
82
82
|
};
|
|
@@ -4,7 +4,7 @@ import { AuthorizationQuery, Client, CodeVerificationValue, OAuthAccessToken, OI
|
|
|
4
4
|
import "../index.mjs";
|
|
5
5
|
import { GenericEndpointContext } from "@better-auth/core";
|
|
6
6
|
import * as _better_auth_core_db0 from "@better-auth/core/db";
|
|
7
|
-
import * as
|
|
7
|
+
import * as better_call51 from "better-call";
|
|
8
8
|
import { OpenAPIParameter } from "better-call";
|
|
9
9
|
import * as z from "zod";
|
|
10
10
|
|
|
@@ -31,21 +31,21 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
31
31
|
hooks: {
|
|
32
32
|
after: {
|
|
33
33
|
matcher(): true;
|
|
34
|
-
handler: (inputContext:
|
|
34
|
+
handler: (inputContext: better_call51.MiddlewareInputContext<better_call51.MiddlewareOptions>) => Promise<Response | {
|
|
35
35
|
redirect: boolean;
|
|
36
36
|
url: string;
|
|
37
37
|
} | undefined>;
|
|
38
38
|
}[];
|
|
39
39
|
};
|
|
40
40
|
endpoints: {
|
|
41
|
-
getOpenIdConfig:
|
|
41
|
+
getOpenIdConfig: better_call51.StrictEndpoint<"/.well-known/openid-configuration", {
|
|
42
42
|
method: "GET";
|
|
43
43
|
operationId: string;
|
|
44
44
|
metadata: {
|
|
45
45
|
readonly scope: "server";
|
|
46
46
|
};
|
|
47
47
|
}, OIDCMetadata>;
|
|
48
|
-
oAuth2authorize:
|
|
48
|
+
oAuth2authorize: better_call51.StrictEndpoint<"/oauth2/authorize", {
|
|
49
49
|
method: "GET";
|
|
50
50
|
operationId: string;
|
|
51
51
|
query: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
@@ -72,14 +72,14 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
72
72
|
redirect: boolean;
|
|
73
73
|
url: string;
|
|
74
74
|
}>;
|
|
75
|
-
oAuthConsent:
|
|
75
|
+
oAuthConsent: better_call51.StrictEndpoint<"/oauth2/consent", {
|
|
76
76
|
method: "POST";
|
|
77
77
|
operationId: string;
|
|
78
78
|
body: z.ZodObject<{
|
|
79
79
|
accept: z.ZodBoolean;
|
|
80
80
|
consent_code: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
81
81
|
}, z.core.$strip>;
|
|
82
|
-
use: ((inputContext:
|
|
82
|
+
use: ((inputContext: better_call51.MiddlewareInputContext<better_call51.MiddlewareOptions>) => Promise<{
|
|
83
83
|
session: {
|
|
84
84
|
session: Record<string, any> & {
|
|
85
85
|
id: string;
|
|
@@ -151,7 +151,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
151
151
|
}, {
|
|
152
152
|
redirectURI: string;
|
|
153
153
|
}>;
|
|
154
|
-
oAuth2token:
|
|
154
|
+
oAuth2token: better_call51.StrictEndpoint<"/oauth2/token", {
|
|
155
155
|
method: "POST";
|
|
156
156
|
operationId: string;
|
|
157
157
|
body: z.ZodRecord<z.ZodAny, z.ZodAny>;
|
|
@@ -173,7 +173,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
173
173
|
scope: string;
|
|
174
174
|
id_token: string | undefined;
|
|
175
175
|
}>;
|
|
176
|
-
oAuth2userInfo:
|
|
176
|
+
oAuth2userInfo: better_call51.StrictEndpoint<"/oauth2/userinfo", {
|
|
177
177
|
method: "GET";
|
|
178
178
|
operationId: string;
|
|
179
179
|
metadata: {
|
|
@@ -265,7 +265,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
265
265
|
*
|
|
266
266
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/oidc-provider#api-method-oauth2-register)
|
|
267
267
|
*/
|
|
268
|
-
registerOAuthApplication:
|
|
268
|
+
registerOAuthApplication: better_call51.StrictEndpoint<"/oauth2/register", {
|
|
269
269
|
method: "POST";
|
|
270
270
|
body: z.ZodObject<{
|
|
271
271
|
redirect_uris: z.ZodArray<z.ZodString>;
|
|
@@ -405,9 +405,9 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
405
405
|
client_secret?: string | undefined;
|
|
406
406
|
client_id: string;
|
|
407
407
|
}>;
|
|
408
|
-
getOAuthClient:
|
|
408
|
+
getOAuthClient: better_call51.StrictEndpoint<"/oauth2/client/:id", {
|
|
409
409
|
method: "GET";
|
|
410
|
-
use: ((inputContext:
|
|
410
|
+
use: ((inputContext: better_call51.MiddlewareInputContext<better_call51.MiddlewareOptions>) => Promise<{
|
|
411
411
|
session: {
|
|
412
412
|
session: Record<string, any> & {
|
|
413
413
|
id: string;
|
|
@@ -478,7 +478,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
478
478
|
*
|
|
479
479
|
* @see [OpenID Connect RP-Initiated Logout Spec](https://openid.net/specs/openid-connect-rpinitiated-1_0.html)
|
|
480
480
|
*/
|
|
481
|
-
endSession:
|
|
481
|
+
endSession: better_call51.StrictEndpoint<"/oauth2/endsession", {
|
|
482
482
|
method: ("GET" | "POST")[];
|
|
483
483
|
query: z.ZodOptional<z.ZodObject<{
|
|
484
484
|
id_token_hint: z.ZodOptional<z.ZodString>;
|
|
@@ -504,7 +504,7 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
504
504
|
scope: "server";
|
|
505
505
|
};
|
|
506
506
|
}, {
|
|
507
|
-
status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") |
|
|
507
|
+
status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_call51.Status;
|
|
508
508
|
body: ({
|
|
509
509
|
message?: string;
|
|
510
510
|
code?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _better_auth_core42 from "@better-auth/core";
|
|
2
2
|
import { ClientFetchOption } from "@better-auth/core";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _better_fetch_fetch112 from "@better-fetch/fetch";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/one-tap/client.d.ts
|
|
6
6
|
declare global {
|
|
@@ -161,13 +161,13 @@ declare const oneTapClient: (options: GoogleOneTapOptions) => {
|
|
|
161
161
|
id: string;
|
|
162
162
|
name: string;
|
|
163
163
|
hooks: {
|
|
164
|
-
onResponse(ctx:
|
|
164
|
+
onResponse(ctx: _better_fetch_fetch112.ResponseContext): Promise<void>;
|
|
165
165
|
};
|
|
166
166
|
}[];
|
|
167
|
-
getActions: ($fetch:
|
|
167
|
+
getActions: ($fetch: _better_fetch_fetch112.BetterFetch, _: _better_auth_core42.ClientStore) => {
|
|
168
168
|
oneTap: (opts?: GoogleOneTapActionOptions | undefined, fetchOptions?: ClientFetchOption | undefined) => Promise<void>;
|
|
169
169
|
};
|
|
170
|
-
getAtoms($fetch:
|
|
170
|
+
getAtoms($fetch: _better_fetch_fetch112.BetterFetch): {};
|
|
171
171
|
};
|
|
172
172
|
//#endregion
|
|
173
173
|
export { GoogleOneTapActionOptions, GoogleOneTapOptions, GsiButtonConfiguration, oneTapClient };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as better_call50 from "better-call";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/one-tap/index.d.ts
|
|
@@ -20,7 +20,7 @@ interface OneTapOptions {
|
|
|
20
20
|
declare const oneTap: (options?: OneTapOptions | undefined) => {
|
|
21
21
|
id: "one-tap";
|
|
22
22
|
endpoints: {
|
|
23
|
-
oneTapCallback:
|
|
23
|
+
oneTapCallback: better_call50.StrictEndpoint<"/one-tap/callback", {
|
|
24
24
|
method: "POST";
|
|
25
25
|
body: z.ZodObject<{
|
|
26
26
|
idToken: z.ZodString;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Session, User } from "../../types/models.mjs";
|
|
2
2
|
import "../../types/index.mjs";
|
|
3
3
|
import { GenericEndpointContext } from "@better-auth/core";
|
|
4
|
-
import * as
|
|
4
|
+
import * as better_call110 from "better-call";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/one-time-token/index.d.ts
|
|
@@ -60,9 +60,9 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
|
|
|
60
60
|
*
|
|
61
61
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/one-time-token#api-method-one-time-token-generate)
|
|
62
62
|
*/
|
|
63
|
-
generateOneTimeToken:
|
|
63
|
+
generateOneTimeToken: better_call110.StrictEndpoint<"/one-time-token/generate", {
|
|
64
64
|
method: "GET";
|
|
65
|
-
use: ((inputContext:
|
|
65
|
+
use: ((inputContext: better_call110.MiddlewareInputContext<better_call110.MiddlewareOptions>) => Promise<{
|
|
66
66
|
session: {
|
|
67
67
|
session: Record<string, any> & {
|
|
68
68
|
id: string;
|
|
@@ -103,7 +103,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
|
|
|
103
103
|
*
|
|
104
104
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/one-time-token#api-method-one-time-token-verify)
|
|
105
105
|
*/
|
|
106
|
-
verifyOneTimeToken:
|
|
106
|
+
verifyOneTimeToken: better_call110.StrictEndpoint<"/one-time-token/verify", {
|
|
107
107
|
method: "POST";
|
|
108
108
|
body: z.ZodObject<{
|
|
109
109
|
token: z.ZodString;
|
|
@@ -116,7 +116,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
|
|
|
116
116
|
hooks: {
|
|
117
117
|
after: {
|
|
118
118
|
matcher: () => true;
|
|
119
|
-
handler: (inputContext:
|
|
119
|
+
handler: (inputContext: better_call110.MiddlewareInputContext<better_call110.MiddlewareOptions>) => Promise<void>;
|
|
120
120
|
}[];
|
|
121
121
|
};
|
|
122
122
|
options: OneTimeTokenOptions | undefined;
|