better-auth 0.7.3 → 0.7.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.d.cts +1 -1
- package/dist/adapters/drizzle.d.ts +1 -1
- package/dist/adapters/kysely.d.cts +1 -1
- package/dist/adapters/kysely.d.ts +1 -1
- package/dist/adapters/mongodb.d.cts +1 -1
- package/dist/adapters/mongodb.d.ts +1 -1
- package/dist/adapters/prisma.d.cts +1 -1
- package/dist/adapters/prisma.d.ts +1 -1
- package/dist/api.cjs +5 -5
- package/dist/api.d.cts +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +5 -5
- package/dist/{auth-BkJnc76F.d.cts → auth-B5ozNy5X.d.cts} +1 -1
- package/dist/{auth-G61_RA8H.d.ts → auth-BBUjEh9D.d.ts} +1 -1
- package/dist/client/plugins.d.cts +4 -4
- package/dist/client/plugins.d.ts +4 -4
- package/dist/client.d.cts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/cookies.d.cts +1 -1
- package/dist/cookies.d.ts +1 -1
- package/dist/db.d.cts +2 -2
- package/dist/db.d.ts +2 -2
- package/dist/{index-cKD4sHma.d.ts → index-CQluFeIi.d.ts} +2 -2
- package/dist/{index-KdWDL1fo.d.cts → index-DK55nobk.d.cts} +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/oauth2.d.cts +2 -2
- package/dist/oauth2.d.ts +2 -2
- package/dist/plugins.cjs +6 -6
- package/dist/plugins.d.cts +73 -4
- package/dist/plugins.d.ts +73 -4
- package/dist/plugins.js +6 -6
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/solid-start.d.cts +1 -1
- package/dist/solid-start.d.ts +1 -1
- package/dist/solid.d.cts +1 -1
- package/dist/solid.d.ts +1 -1
- package/dist/{state-UgidHWa5.d.cts → state-8Gh7gmo8.d.cts} +1 -1
- package/dist/{state-CTWPRYsC.d.ts → state-BU1iZb12.d.ts} +1 -1
- package/dist/svelte-kit.d.cts +1 -1
- package/dist/svelte-kit.d.ts +1 -1
- package/dist/svelte.d.cts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/types.d.cts +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/vue.d.cts +1 -1
- package/dist/vue.d.ts +1 -1
- package/package.json +1 -1
package/dist/plugins.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AnonymousOptions, J as JwtOptions, O as OrganizationOptions, b as Passkey, P as PasskeyOptions, U as UserWithPhoneNumber, f as UserWithRole, i as admin, h as adminMiddleware, e as anonymous, n as emailOTP, j as genericOAuth, g as getPasskeyActions, k as jwt, m as magicLink, l as multiSession, o as organization, p as passkey, c as passkeyClient, d as phoneNumber, t as twoFactor, a as twoFactorClient, u as username } from './index-
|
|
2
|
-
import { H as HookEndpointContext } from './auth-
|
|
3
|
-
export {
|
|
1
|
+
export { A as AnonymousOptions, J as JwtOptions, O as OrganizationOptions, b as Passkey, P as PasskeyOptions, U as UserWithPhoneNumber, f as UserWithRole, i as admin, h as adminMiddleware, e as anonymous, n as emailOTP, j as genericOAuth, g as getPasskeyActions, k as jwt, m as magicLink, l as multiSession, o as organization, p as passkey, c as passkeyClient, d as phoneNumber, t as twoFactor, a as twoFactorClient, u as username } from './index-DK55nobk.cjs';
|
|
2
|
+
import { H as HookEndpointContext } from './auth-B5ozNy5X.cjs';
|
|
3
|
+
export { x as AuthEndpoint, y as AuthMiddleware, k as BetterAuthPlugin, P as PluginSchema, w as createAuthEndpoint, v as createAuthMiddleware, u as optionsMiddleware } from './auth-B5ozNy5X.cjs';
|
|
4
4
|
export { H as HIDE_METADATA } from './hide-metadata-DEHJp1rk.cjs';
|
|
5
5
|
import * as better_call from 'better-call';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -112,4 +112,73 @@ declare const oneTap: (options?: OneTapOptions) => {
|
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
interface OAuthProxyOptions {
|
|
116
|
+
/**
|
|
117
|
+
* The current URL of the application.
|
|
118
|
+
* The plugin will attempt to infer the current URL from your environment
|
|
119
|
+
* by checking the base URL from popular hosting providers,
|
|
120
|
+
* from the request URL if invoked by a client,
|
|
121
|
+
* or as a fallback, from the `baseURL` in your auth config.
|
|
122
|
+
* If the URL is not inferred correctly, you can provide a value here."
|
|
123
|
+
*/
|
|
124
|
+
currentURL?: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* A proxy plugin, that allows you to proxy OAuth requests.
|
|
128
|
+
* Useful for development and preview deployments where
|
|
129
|
+
* the redirect URL can't be known in advance to add to the OAuth provider.
|
|
130
|
+
*/
|
|
131
|
+
declare const oAuthProxy: (opts?: OAuthProxyOptions) => {
|
|
132
|
+
id: "oauth-proxy";
|
|
133
|
+
endpoints: {
|
|
134
|
+
oAuthProxy: {
|
|
135
|
+
<C extends [better_call.Context<"/oauth-proxy-callback", {
|
|
136
|
+
method: "GET";
|
|
137
|
+
query: z.ZodObject<{
|
|
138
|
+
callbackURL: z.ZodString;
|
|
139
|
+
cookies: z.ZodString;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
callbackURL: string;
|
|
142
|
+
cookies: string;
|
|
143
|
+
}, {
|
|
144
|
+
callbackURL: string;
|
|
145
|
+
cookies: string;
|
|
146
|
+
}>;
|
|
147
|
+
}>]>(...ctx: C): Promise<C extends [{
|
|
148
|
+
asResponse: true;
|
|
149
|
+
}] ? Response : never>;
|
|
150
|
+
path: "/oauth-proxy-callback";
|
|
151
|
+
options: {
|
|
152
|
+
method: "GET";
|
|
153
|
+
query: z.ZodObject<{
|
|
154
|
+
callbackURL: z.ZodString;
|
|
155
|
+
cookies: z.ZodString;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
callbackURL: string;
|
|
158
|
+
cookies: string;
|
|
159
|
+
}, {
|
|
160
|
+
callbackURL: string;
|
|
161
|
+
cookies: string;
|
|
162
|
+
}>;
|
|
163
|
+
};
|
|
164
|
+
method: better_call.Method | better_call.Method[];
|
|
165
|
+
headers: Headers;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
hooks: {
|
|
169
|
+
after: {
|
|
170
|
+
matcher(context: HookEndpointContext): boolean;
|
|
171
|
+
handler: better_call.Endpoint<better_call.Handler<string, better_call.EndpointOptions, {
|
|
172
|
+
response: Response;
|
|
173
|
+
} | undefined>, better_call.EndpointOptions>;
|
|
174
|
+
}[];
|
|
175
|
+
before: {
|
|
176
|
+
matcher(context: HookEndpointContext): boolean;
|
|
177
|
+
handler(ctx: HookEndpointContext): Promise<{
|
|
178
|
+
context: HookEndpointContext;
|
|
179
|
+
}>;
|
|
180
|
+
}[];
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export { bearer, oAuthProxy, oneTap };
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AnonymousOptions, J as JwtOptions, O as OrganizationOptions, b as Passkey, P as PasskeyOptions, U as UserWithPhoneNumber, f as UserWithRole, i as admin, h as adminMiddleware, e as anonymous, n as emailOTP, j as genericOAuth, g as getPasskeyActions, k as jwt, m as magicLink, l as multiSession, o as organization, p as passkey, c as passkeyClient, d as phoneNumber, t as twoFactor, a as twoFactorClient, u as username } from './index-
|
|
2
|
-
import { H as HookEndpointContext } from './auth-
|
|
3
|
-
export {
|
|
1
|
+
export { A as AnonymousOptions, J as JwtOptions, O as OrganizationOptions, b as Passkey, P as PasskeyOptions, U as UserWithPhoneNumber, f as UserWithRole, i as admin, h as adminMiddleware, e as anonymous, n as emailOTP, j as genericOAuth, g as getPasskeyActions, k as jwt, m as magicLink, l as multiSession, o as organization, p as passkey, c as passkeyClient, d as phoneNumber, t as twoFactor, a as twoFactorClient, u as username } from './index-CQluFeIi.js';
|
|
2
|
+
import { H as HookEndpointContext } from './auth-BBUjEh9D.js';
|
|
3
|
+
export { x as AuthEndpoint, y as AuthMiddleware, k as BetterAuthPlugin, P as PluginSchema, w as createAuthEndpoint, v as createAuthMiddleware, u as optionsMiddleware } from './auth-BBUjEh9D.js';
|
|
4
4
|
export { H as HIDE_METADATA } from './hide-metadata-DEHJp1rk.js';
|
|
5
5
|
import * as better_call from 'better-call';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -112,4 +112,73 @@ declare const oneTap: (options?: OneTapOptions) => {
|
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
interface OAuthProxyOptions {
|
|
116
|
+
/**
|
|
117
|
+
* The current URL of the application.
|
|
118
|
+
* The plugin will attempt to infer the current URL from your environment
|
|
119
|
+
* by checking the base URL from popular hosting providers,
|
|
120
|
+
* from the request URL if invoked by a client,
|
|
121
|
+
* or as a fallback, from the `baseURL` in your auth config.
|
|
122
|
+
* If the URL is not inferred correctly, you can provide a value here."
|
|
123
|
+
*/
|
|
124
|
+
currentURL?: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* A proxy plugin, that allows you to proxy OAuth requests.
|
|
128
|
+
* Useful for development and preview deployments where
|
|
129
|
+
* the redirect URL can't be known in advance to add to the OAuth provider.
|
|
130
|
+
*/
|
|
131
|
+
declare const oAuthProxy: (opts?: OAuthProxyOptions) => {
|
|
132
|
+
id: "oauth-proxy";
|
|
133
|
+
endpoints: {
|
|
134
|
+
oAuthProxy: {
|
|
135
|
+
<C extends [better_call.Context<"/oauth-proxy-callback", {
|
|
136
|
+
method: "GET";
|
|
137
|
+
query: z.ZodObject<{
|
|
138
|
+
callbackURL: z.ZodString;
|
|
139
|
+
cookies: z.ZodString;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
callbackURL: string;
|
|
142
|
+
cookies: string;
|
|
143
|
+
}, {
|
|
144
|
+
callbackURL: string;
|
|
145
|
+
cookies: string;
|
|
146
|
+
}>;
|
|
147
|
+
}>]>(...ctx: C): Promise<C extends [{
|
|
148
|
+
asResponse: true;
|
|
149
|
+
}] ? Response : never>;
|
|
150
|
+
path: "/oauth-proxy-callback";
|
|
151
|
+
options: {
|
|
152
|
+
method: "GET";
|
|
153
|
+
query: z.ZodObject<{
|
|
154
|
+
callbackURL: z.ZodString;
|
|
155
|
+
cookies: z.ZodString;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
callbackURL: string;
|
|
158
|
+
cookies: string;
|
|
159
|
+
}, {
|
|
160
|
+
callbackURL: string;
|
|
161
|
+
cookies: string;
|
|
162
|
+
}>;
|
|
163
|
+
};
|
|
164
|
+
method: better_call.Method | better_call.Method[];
|
|
165
|
+
headers: Headers;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
hooks: {
|
|
169
|
+
after: {
|
|
170
|
+
matcher(context: HookEndpointContext): boolean;
|
|
171
|
+
handler: better_call.Endpoint<better_call.Handler<string, better_call.EndpointOptions, {
|
|
172
|
+
response: Response;
|
|
173
|
+
} | undefined>, better_call.EndpointOptions>;
|
|
174
|
+
}[];
|
|
175
|
+
before: {
|
|
176
|
+
matcher(context: HookEndpointContext): boolean;
|
|
177
|
+
handler(ctx: HookEndpointContext): Promise<{
|
|
178
|
+
context: HookEndpointContext;
|
|
179
|
+
}>;
|
|
180
|
+
}[];
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export { bearer, oAuthProxy, oneTap };
|