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.
Files changed (53) hide show
  1. package/dist/adapters/drizzle.d.cts +1 -1
  2. package/dist/adapters/drizzle.d.ts +1 -1
  3. package/dist/adapters/kysely.d.cts +1 -1
  4. package/dist/adapters/kysely.d.ts +1 -1
  5. package/dist/adapters/mongodb.d.cts +1 -1
  6. package/dist/adapters/mongodb.d.ts +1 -1
  7. package/dist/adapters/prisma.d.cts +1 -1
  8. package/dist/adapters/prisma.d.ts +1 -1
  9. package/dist/api.cjs +5 -5
  10. package/dist/api.d.cts +1 -1
  11. package/dist/api.d.ts +1 -1
  12. package/dist/api.js +5 -5
  13. package/dist/{auth-BkJnc76F.d.cts → auth-B5ozNy5X.d.cts} +1 -1
  14. package/dist/{auth-G61_RA8H.d.ts → auth-BBUjEh9D.d.ts} +1 -1
  15. package/dist/client/plugins.d.cts +4 -4
  16. package/dist/client/plugins.d.ts +4 -4
  17. package/dist/client.d.cts +1 -1
  18. package/dist/client.d.ts +1 -1
  19. package/dist/cookies.d.cts +1 -1
  20. package/dist/cookies.d.ts +1 -1
  21. package/dist/db.d.cts +2 -2
  22. package/dist/db.d.ts +2 -2
  23. package/dist/{index-cKD4sHma.d.ts → index-CQluFeIi.d.ts} +2 -2
  24. package/dist/{index-KdWDL1fo.d.cts → index-DK55nobk.d.cts} +2 -2
  25. package/dist/index.cjs +4 -4
  26. package/dist/index.d.cts +2 -2
  27. package/dist/index.d.ts +2 -2
  28. package/dist/index.js +5 -5
  29. package/dist/node.d.cts +1 -1
  30. package/dist/node.d.ts +1 -1
  31. package/dist/oauth2.d.cts +2 -2
  32. package/dist/oauth2.d.ts +2 -2
  33. package/dist/plugins.cjs +6 -6
  34. package/dist/plugins.d.cts +73 -4
  35. package/dist/plugins.d.ts +73 -4
  36. package/dist/plugins.js +6 -6
  37. package/dist/react.d.cts +1 -1
  38. package/dist/react.d.ts +1 -1
  39. package/dist/solid-start.d.cts +1 -1
  40. package/dist/solid-start.d.ts +1 -1
  41. package/dist/solid.d.cts +1 -1
  42. package/dist/solid.d.ts +1 -1
  43. package/dist/{state-UgidHWa5.d.cts → state-8Gh7gmo8.d.cts} +1 -1
  44. package/dist/{state-CTWPRYsC.d.ts → state-BU1iZb12.d.ts} +1 -1
  45. package/dist/svelte-kit.d.cts +1 -1
  46. package/dist/svelte-kit.d.ts +1 -1
  47. package/dist/svelte.d.cts +1 -1
  48. package/dist/svelte.d.ts +1 -1
  49. package/dist/types.d.cts +2 -2
  50. package/dist/types.d.ts +2 -2
  51. package/dist/vue.d.cts +1 -1
  52. package/dist/vue.d.ts +1 -1
  53. package/package.json +1 -1
@@ -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-KdWDL1fo.cjs';
2
- import { H as HookEndpointContext } from './auth-BkJnc76F.cjs';
3
- export { e as AuthEndpoint, f as AuthMiddleware, b as BetterAuthPlugin, P as PluginSchema, d as createAuthEndpoint, c as createAuthMiddleware, o as optionsMiddleware } from './auth-BkJnc76F.cjs';
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
- export { bearer, oneTap };
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-cKD4sHma.js';
2
- import { H as HookEndpointContext } from './auth-G61_RA8H.js';
3
- export { e as AuthEndpoint, f as AuthMiddleware, b as BetterAuthPlugin, P as PluginSchema, d as createAuthEndpoint, c as createAuthMiddleware, o as optionsMiddleware } from './auth-G61_RA8H.js';
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
- export { bearer, oneTap };
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 };