better-auth 0.2.6-beta.3 → 0.2.6-beta.5

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/access.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AccessControl, a as AuthortizeResponse, P as ParsingError, R as Role, S as StatementsPrimitive, b as SubArray, c as Subset, d as adminAc, e as createAccessControl, f as defaultAc, g as defaultRoles, h as defaultStatements, m as memberAc, o as ownerAc } from './statement-CU-fdHXK.js';
2
- export { p as permissionFromString } from './index-D6NOkCRo.js';
3
- import './helper-C1ihmerM.js';
1
+ export { A as AccessControl, a as AuthortizeResponse, P as ParsingError, R as Role, S as StatementsPrimitive, b as SubArray, c as Subset, d as adminAc, e as createAccessControl, f as defaultAc, g as defaultRoles, h as defaultStatements, m as memberAc, o as ownerAc } from './statement-BYDTZ_xW.js';
2
+ export { p as permissionFromString } from './index-D1yWsqP4.js';
3
+ import './helper-D-PIAORk.js';
4
4
  import 'zod';
@@ -1,9 +1,9 @@
1
- import { A as Adapter } from '../index-CG6kutYo.js';
1
+ import { A as Adapter } from '../index-D9F_2jw7.js';
2
2
  import 'kysely';
3
- import '../index-C-ootLvf.js';
3
+ import '../index-37csVPVw.js';
4
4
  import 'arctic';
5
5
  import 'zod';
6
- import '../helper-C1ihmerM.js';
6
+ import '../helper-D-PIAORk.js';
7
7
  import 'better-call';
8
8
 
9
9
  interface DrizzleAdapterOptions {
@@ -169,6 +169,11 @@ var BetterAuthError = class extends Error {
169
169
 
170
170
  // src/adapters/drizzle-adapter/index.ts
171
171
  function getSchema(modelName, schema) {
172
+ if (!schema) {
173
+ throw new BetterAuthError(
174
+ "Drizzle adapter failed to initialize. Schema not found. Please provide a schema object in the adapter options object."
175
+ );
176
+ }
172
177
  const key = Object.keys(schema).find((key2) => {
173
178
  const modelName2 = schema[key2].name;
174
179
  return modelName2 === modelName2;
@@ -206,11 +211,6 @@ function whereConvertor(where, schemaModel) {
206
211
  }
207
212
  var drizzleAdapter = (db, options) => {
208
213
  const schema = options?.schema || db._.schema;
209
- if (!schema) {
210
- throw new BetterAuthError(
211
- "Drizzle adapter failed to initialize. Schema not found. Please provide a schema object in the adapter options object."
212
- );
213
- }
214
214
  const databaseType = options?.provider;
215
215
  return {
216
216
  id: "drizzle",
@@ -1,9 +1,9 @@
1
- import { W as Where } from '../index-CG6kutYo.js';
1
+ import { W as Where } from '../index-D9F_2jw7.js';
2
2
  import 'kysely';
3
- import '../index-C-ootLvf.js';
3
+ import '../index-37csVPVw.js';
4
4
  import 'arctic';
5
5
  import 'zod';
6
- import '../helper-C1ihmerM.js';
6
+ import '../helper-D-PIAORk.js';
7
7
  import 'better-call';
8
8
 
9
9
  declare const mongodbAdapter: (mongo: any) => {
@@ -1,9 +1,9 @@
1
- import { A as Adapter } from '../index-CG6kutYo.js';
1
+ import { A as Adapter } from '../index-D9F_2jw7.js';
2
2
  import 'kysely';
3
- import '../index-C-ootLvf.js';
3
+ import '../index-37csVPVw.js';
4
4
  import 'arctic';
5
5
  import 'zod';
6
- import '../helper-C1ihmerM.js';
6
+ import '../helper-D-PIAORk.js';
7
7
  import 'better-call';
8
8
 
9
9
  declare const prismaAdapter: (prisma: any, { provider, }: {
package/dist/api.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { b as AuthEndpoint, d as AuthMiddleware, y as callbackOAuth, X as changePassword, a as createAuthEndpoint, c as createAuthMiddleware, Q as createEmailVerificationToken, a1 as csrfMiddleware, _ as error, M as forgetPassword, N as forgetPasswordCallback, Z as getCSRFToken, u as getEndpoints, z as getSession, C as getSessionFromCtx, E as listSessions, $ as ok, o as optionsMiddleware, O as resetPassword, J as revokeSession, K as revokeSessions, v as router, T as sendVerificationEmail, D as sessionMiddleware, Y as setPassword, x as signInEmail, w as signInOAuth, L as signOut, a0 as signUpEmail, V as updateUser, U as verifyEmail } from './index-CG6kutYo.js';
1
+ export { b as AuthEndpoint, d as AuthMiddleware, y as callbackOAuth, X as changePassword, a as createAuthEndpoint, c as createAuthMiddleware, Q as createEmailVerificationToken, a1 as csrfMiddleware, _ as error, M as forgetPassword, N as forgetPasswordCallback, Z as getCSRFToken, u as getEndpoints, z as getSession, C as getSessionFromCtx, E as listSessions, $ as ok, o as optionsMiddleware, O as resetPassword, J as revokeSession, K as revokeSessions, v as router, T as sendVerificationEmail, D as sessionMiddleware, Y as setPassword, x as signInEmail, w as signInOAuth, L as signOut, a0 as signUpEmail, V as updateUser, U as verifyEmail } from './index-D9F_2jw7.js';
2
2
  import 'zod';
3
- import './helper-C1ihmerM.js';
3
+ import './helper-D-PIAORk.js';
4
4
  import 'better-call';
5
5
  import 'kysely';
6
- import './index-C-ootLvf.js';
6
+ import './index-37csVPVw.js';
7
7
  import 'arctic';
package/dist/cli.js CHANGED
@@ -115,12 +115,14 @@ async function getConfig({
115
115
  break;
116
116
  }
117
117
  } catch (e) {
118
+ logger.error("[#better-auth]: Couldn't read your auth config.", e);
118
119
  process.exit(1);
119
120
  }
120
121
  }
121
122
  }
122
123
  return configFile;
123
124
  } catch (e) {
125
+ logger.error("Couldn't read your auth config.");
124
126
  process.exit(1);
125
127
  }
126
128
  }
@@ -931,6 +933,7 @@ var generate = new Command2("generate").option(
931
933
  config: z3.string().optional(),
932
934
  output: z3.string().optional()
933
935
  }).parse(opts);
936
+ const spinner = ora4("preparing schema...").start();
934
937
  const cwd = path3.resolve(options.cwd);
935
938
  if (!existsSync2(cwd)) {
936
939
  logger.error(`The directory "${cwd}" does not exist.`);
@@ -954,7 +957,7 @@ var generate = new Command2("generate").option(
954
957
  logger.error("The adapter does not support schema generation.");
955
958
  process.exit(1);
956
959
  }
957
- const spinner = ora4("preparing schema...").start();
960
+ spinner.text = "generating schema...";
958
961
  const { code, fileName, append } = await adapter.createSchema(
959
962
  config,
960
963
  options.output
@@ -1,15 +1,15 @@
1
1
  import * as nanostores from 'nanostores';
2
- import { A as AccessControl, S as StatementsPrimitive, R as Role } from '../statement-CU-fdHXK.js';
2
+ import { A as AccessControl, S as StatementsPrimitive, R as Role } from '../statement-BYDTZ_xW.js';
3
3
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
4
  import { BetterFetchOption } from '@better-fetch/fetch';
5
- import { o as organization, d as Organization, M as Member, I as Invitation, u as username, m as magicLink } from '../index-BwbWN7rP.js';
6
- export { g as getPasskeyActions, c as passkeyClient, a as twoFactorClient } from '../index-BwbWN7rP.js';
7
- import { P as Prettify } from '../helper-C1ihmerM.js';
8
- import '../index-C-ootLvf.js';
5
+ import { o as organization, d as Organization, M as Member, I as Invitation, u as username, m as magicLink } from '../index-D5OAgPY4.js';
6
+ export { g as getPasskeyActions, c as passkeyClient, a as twoFactorClient } from '../index-D5OAgPY4.js';
7
+ import { P as Prettify } from '../helper-D-PIAORk.js';
8
+ import '../index-37csVPVw.js';
9
9
  import 'arctic';
10
10
  import 'zod';
11
11
  import 'better-call';
12
- import '../index-CG6kutYo.js';
12
+ import '../index-D9F_2jw7.js';
13
13
  import 'kysely';
14
14
  import '@simplewebauthn/types';
15
15
 
package/dist/client.d.ts CHANGED
@@ -3,12 +3,12 @@ import * as nanostores from 'nanostores';
3
3
  import { PreinitializedWritableAtom } from 'nanostores';
4
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
5
5
  import { BetterFetch, BetterFetchError, BetterFetchOption } from '@better-fetch/fetch';
6
- import { B as BetterAuthPlugin, F as FieldAttribute, I as InferFieldOutput } from './index-CG6kutYo.js';
7
- import { U as UnionToIntersection, P as Prettify } from './helper-C1ihmerM.js';
8
- import { ClientOptions, InferClientAPI, InferActions, BetterAuthClientPlugin, InferSessionFromClient, InferUserFromClient, IsSignal } from './types.js';
6
+ import { U as UnionToIntersection, P as Prettify, S as StripEmptyObjects } from './helper-D-PIAORk.js';
7
+ import { ClientOptions, InferClientAPI, InferActions, InferAdditionalFromClient, InferSessionFromClient, InferUserFromClient, BetterAuthClientPlugin, IsSignal } from './types.js';
9
8
  export { AtomListener, InferPluginsFromClient } from './types.js';
9
+ import './index-D9F_2jw7.js';
10
10
  import 'kysely';
11
- import './index-C-ootLvf.js';
11
+ import './index-37csVPVw.js';
12
12
  import 'arctic';
13
13
  import 'better-call';
14
14
 
@@ -18,7 +18,7 @@ type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<in
18
18
  declare function createAuthClient<Option extends ClientOptions>(options?: Option): UnionToIntersection<InferResolvedHooks<Option>> & InferClientAPI<Option> & InferActions<Option> & {
19
19
  useSession: nanostores.PreinitializedWritableAtom<{
20
20
  data: {
21
- user: Prettify<UnionToIntersection<{
21
+ user: Prettify<StripEmptyObjects<{
22
22
  id: string;
23
23
  email: string;
24
24
  emailVerified: boolean;
@@ -26,26 +26,14 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
26
26
  createdAt: Date;
27
27
  updatedAt: Date;
28
28
  image?: string | undefined;
29
- } & ((Option["plugins"] extends BetterAuthClientPlugin[] ? (Option["plugins"][number] extends infer T ? T extends BetterAuthClientPlugin ? T["$InferServerPlugin"] extends infer U ? U extends BetterAuthPlugin ? U : never : never : never : never)[] : never) extends (infer T_1)[] ? T_1 extends {
30
- schema: {
31
- user: {
32
- fields: infer Field;
33
- };
34
- };
35
- } ? Field extends Record<infer Key extends string | number | symbol, FieldAttribute> ? Prettify<{ [key in Key as Field[key]["required"] extends false ? never : Field[key]["defaultValue"] extends string | number | boolean | Function | Date ? key : never]: InferFieldOutput<Field[key]>; } & { [key_1 in Key as Field[key_1]["returned"] extends false ? never : key_1]?: InferFieldOutput<Field[key_1]> | undefined; }> : {} : {} : {})>>;
36
- session: Prettify<UnionToIntersection<{
29
+ } & UnionToIntersection<InferAdditionalFromClient<Option, "user">>>>;
30
+ session: Prettify<StripEmptyObjects<{
37
31
  id: string;
38
32
  userId: string;
39
33
  expiresAt: Date;
40
34
  ipAddress?: string | undefined;
41
35
  userAgent?: string | undefined;
42
- } & ((Option["plugins"] extends BetterAuthClientPlugin[] ? (Option["plugins"][number] extends infer T ? T extends BetterAuthClientPlugin ? T["$InferServerPlugin"] extends infer U ? U extends BetterAuthPlugin ? U : never : never : never : never)[] : never) extends (infer T_2)[] ? T_2 extends {
43
- schema: {
44
- session: {
45
- fields: infer Field_1;
46
- };
47
- };
48
- } ? Field_1 extends Record<string, FieldAttribute> ? { [key_2 in keyof Field_1]: InferFieldOutput<Field_1[key_2]>; } : {} : {} : {})>>;
36
+ } & UnionToIntersection<InferAdditionalFromClient<Option, "session">>>>;
49
37
  } | null;
50
38
  error: null | _better_fetch_fetch.BetterFetchError;
51
39
  isPending: boolean;
@@ -61,7 +49,7 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
61
49
  id: string;
62
50
  name: string;
63
51
  hooks: {
64
- onRequest<T_3 extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T_3>): _better_fetch_fetch.RequestContext<T_3>;
52
+ onRequest<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>): _better_fetch_fetch.RequestContext<T>;
65
53
  };
66
54
  } | {
67
55
  id: string;
@@ -84,7 +72,7 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
84
72
  referrerPolicy?: ReferrerPolicy | undefined;
85
73
  signal?: (AbortSignal | null) | undefined;
86
74
  window?: null | undefined;
87
- onRequest?: (<T_3 extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T_3>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
75
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
88
76
  onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
89
77
  onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
90
78
  onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
@@ -113,7 +101,7 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
113
101
  query?: any;
114
102
  params?: any;
115
103
  duplex?: ("full" | "half") | undefined;
116
- jsonParser?: (<T_3>(text: string) => Promise<T_3 | undefined>) | undefined;
104
+ jsonParser?: (<T>(text: string) => Promise<T | undefined>) | undefined;
117
105
  retry?: (number | {
118
106
  type: "linear";
119
107
  attempts: number;
@@ -150,7 +138,7 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
150
138
  referrerPolicy?: ReferrerPolicy | undefined;
151
139
  signal?: (AbortSignal | null) | undefined;
152
140
  window?: null | undefined;
153
- onRequest?: (<T_3 extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T_3>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
141
+ onRequest?: (<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void) | undefined;
154
142
  onResponse?: ((context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void) | undefined;
155
143
  onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
156
144
  onError?: ((context: _better_fetch_fetch.ErrorContext) => Promise<void> | void) | undefined;
@@ -179,7 +167,7 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
179
167
  query?: any;
180
168
  params?: any;
181
169
  duplex?: ("full" | "half") | undefined;
182
- jsonParser?: (<T_3>(text: string) => Promise<T_3 | undefined>) | undefined;
170
+ jsonParser?: (<T>(text: string) => Promise<T | undefined>) | undefined;
183
171
  retry?: (number | {
184
172
  type: "linear";
185
173
  attempts: number;
@@ -216,7 +204,7 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
216
204
  referrerPolicy?: ReferrerPolicy;
217
205
  signal?: AbortSignal | null;
218
206
  window?: null;
219
- onRequest?: <T_3 extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T_3>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void;
207
+ onRequest?: <T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>) => Promise<_better_fetch_fetch.RequestContext | void> | _better_fetch_fetch.RequestContext | void;
220
208
  onResponse?: (context: _better_fetch_fetch.ResponseContext) => Promise<Response | void | _better_fetch_fetch.ResponseContext> | Response | _better_fetch_fetch.ResponseContext | void;
221
209
  onSuccess?: ((context: _better_fetch_fetch.SuccessContext<any>) => Promise<void> | void) | undefined;
222
210
  onError?: (context: _better_fetch_fetch.ErrorContext) => Promise<void> | void;
@@ -244,7 +232,7 @@ declare function createAuthClient<Option extends ClientOptions>(options?: Option
244
232
  query?: any;
245
233
  params?: any;
246
234
  duplex?: "full" | "half";
247
- jsonParser?: <T_3>(text: string) => Promise<T_3 | undefined>;
235
+ jsonParser?: <T>(text: string) => Promise<T | undefined>;
248
236
  retry?: number | {
249
237
  type: "linear";
250
238
  attempts: number;
@@ -280,4 +268,4 @@ declare const useAuthQuery: <T>(initializedAtom: PreinitializedWritableAtom<any>
280
268
  isPending: boolean;
281
269
  }>;
282
270
 
283
- export { BetterAuthClientPlugin, ClientOptions, InferActions, InferClientAPI, InferSessionFromClient, InferUserFromClient, IsSignal, createAuthClient, useAuthQuery };
271
+ export { BetterAuthClientPlugin, ClientOptions, InferActions, InferAdditionalFromClient, InferClientAPI, InferSessionFromClient, InferUserFromClient, IsSignal, createAuthClient, useAuthQuery };
@@ -9,5 +9,10 @@ type RequiredKeysOf<BaseType extends object> = Exclude<{
9
9
  }[keyof BaseType], undefined>;
10
10
  type HasRequiredKeys<BaseType extends object> = RequiredKeysOf<BaseType> extends never ? false : true;
11
11
  type WithoutEmpty<T> = T extends T ? ({} extends T ? never : T) : never;
12
+ type StripEmptyObjects<T> = T extends {
13
+ [K in keyof T]: never;
14
+ } ? never : T extends object ? {
15
+ [K in keyof T as T[K] extends never ? never : K]: T[K];
16
+ } : T;
12
17
 
13
- export type { HasRequiredKeys as H, LiteralString as L, Prettify as P, RequiredKeysOf as R, UnionToIntersection as U, WithoutEmpty as W, LiteralUnion as a };
18
+ export type { HasRequiredKeys as H, LiteralString as L, Prettify as P, RequiredKeysOf as R, StripEmptyObjects as S, UnionToIntersection as U, WithoutEmpty as W, LiteralUnion as a };
@@ -1,7 +1,7 @@
1
1
  import * as arctic from 'arctic';
2
2
  import { OAuth2Tokens } from 'arctic';
3
3
  import { z } from 'zod';
4
- import { L as LiteralString, P as Prettify } from './helper-C1ihmerM.js';
4
+ import { L as LiteralString, P as Prettify } from './helper-D-PIAORk.js';
5
5
 
6
6
  declare const accountSchema: z.ZodObject<{
7
7
  id: z.ZodString;
@@ -1,4 +1,4 @@
1
- import { R as Role, S as StatementsPrimitive, A as AccessControl, a as AuthortizeResponse, P as ParsingError, b as SubArray, c as Subset, d as adminAc, e as createAccessControl, f as defaultAc, g as defaultRoles, h as defaultStatements, m as memberAc, o as ownerAc } from './statement-CU-fdHXK.js';
1
+ import { R as Role, S as StatementsPrimitive, A as AccessControl, a as AuthortizeResponse, P as ParsingError, b as SubArray, c as Subset, d as adminAc, e as createAccessControl, f as defaultAc, g as defaultRoles, h as defaultStatements, m as memberAc, o as ownerAc } from './statement-BYDTZ_xW.js';
2
2
 
3
3
  declare const permissionFromString: (permission?: string) => Role<StatementsPrimitive>;
4
4
 
@@ -1,11 +1,11 @@
1
- import { U as User, S as Session } from './index-C-ootLvf.js';
1
+ import { U as User, S as Session } from './index-37csVPVw.js';
2
2
  import * as better_call from 'better-call';
3
3
  import { z, ZodObject, ZodOptional, ZodArray, ZodLiteral } from 'zod';
4
- import { P as Prettify } from './helper-C1ihmerM.js';
5
- import { A as AccessControl, R as Role, S as StatementsPrimitive, g as defaultRoles } from './statement-CU-fdHXK.js';
4
+ import { P as Prettify } from './helper-D-PIAORk.js';
5
+ import { A as AccessControl, R as Role, S as StatementsPrimitive, g as defaultRoles } from './statement-BYDTZ_xW.js';
6
6
  import * as _better_fetch_fetch from '@better-fetch/fetch';
7
7
  import { BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
8
- import { H as HookEndpointContext } from './index-CG6kutYo.js';
8
+ import { H as HookEndpointContext } from './index-D9F_2jw7.js';
9
9
  import * as nanostores from 'nanostores';
10
10
  import { atom } from 'nanostores';
11
11
  import * as _simplewebauthn_types from '@simplewebauthn/types';
@@ -1,11 +1,11 @@
1
1
  import * as kysely from 'kysely';
2
2
  import { Kysely, Migration, Dialect } from 'kysely';
3
- import { S as Session, U as User, A as Account, O as OAuthProvider, a as AppleProfile, D as DiscordProfile, F as FacebookProfile, G as GithubProfile, b as GoogleProfile, c as SpotifyProfile, T as TwitchProfile, d as TwitterProfile, e as SocialProviders, f as OAuthProviderList } from './index-C-ootLvf.js';
3
+ import { S as Session, U as User, A as Account, O as OAuthProvider, a as AppleProfile, D as DiscordProfile, F as FacebookProfile, G as GithubProfile, b as GoogleProfile, c as SpotifyProfile, T as TwitchProfile, d as TwitterProfile, e as SocialProviders, f as OAuthProviderList } from './index-37csVPVw.js';
4
4
  import * as better_call from 'better-call';
5
5
  import { ContextTools, CookieOptions, Endpoint, EndpointResponse, Context, Prettify as Prettify$1 } from 'better-call';
6
6
  import * as zod from 'zod';
7
7
  import { ZodSchema, z } from 'zod';
8
- import { L as LiteralString, U as UnionToIntersection, P as Prettify } from './helper-C1ihmerM.js';
8
+ import { L as LiteralString, U as UnionToIntersection, S as StripEmptyObjects, P as Prettify } from './helper-D-PIAORk.js';
9
9
  import * as arctic from 'arctic';
10
10
 
11
11
  /**
@@ -913,12 +913,12 @@ type AdditionalUserFields<Options extends BetterAuthOptions> = Options["plugins"
913
913
  fields: infer Field;
914
914
  };
915
915
  };
916
- } ? Field extends Record<infer Key, FieldAttribute> ? Prettify<{
916
+ } ? Field extends Record<infer Key, FieldAttribute> ? {
917
917
  [key in Key as Field[key]["required"] extends false ? never : Field[key]["defaultValue"] extends boolean | string | number | Date | Function ? key : never]: InferFieldOutput<Field[key]>;
918
918
  } & {
919
919
  [key in Key as Field[key]["returned"] extends false ? never : key]?: InferFieldOutput<Field[key]>;
920
- }> : {} : {} : {};
921
- type InferUser<O extends BetterAuthOptions | Auth> = UnionToIntersection<User & (O extends BetterAuthOptions ? AdditionalUserFields<O> : O extends Auth ? AdditionalUserFields<O["options"]> : {})>;
920
+ } : {} : {} : {};
921
+ type InferUser<O extends BetterAuthOptions | Auth> = UnionToIntersection<StripEmptyObjects<User & (O extends BetterAuthOptions ? AdditionalUserFields<O> : O extends Auth ? AdditionalUserFields<O["options"]> : {})>>;
922
922
  type InferSession<O extends BetterAuthOptions | Auth> = UnionToIntersection<Session & (O extends BetterAuthOptions ? AdditionalSessionFields<O> : O extends Auth ? AdditionalSessionFields<O["options"]> : {})>;
923
923
  type InferPluginTypes<O extends BetterAuthOptions> = O["plugins"] extends Array<infer P> ? UnionToIntersection<P extends BetterAuthPlugin ? P["$Infer"] extends Record<string, any> ? P["$Infer"] : {} : {}> : {};
924
924
  interface RateLimit {
@@ -1292,17 +1292,17 @@ declare const signInOAuth: {
1292
1292
  /**
1293
1293
  * OAuth2 provider to use`
1294
1294
  */
1295
- provider: z.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
1295
+ provider: z.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
1296
1296
  /**
1297
1297
  * If this is true the session will only be valid for the current browser session
1298
1298
  */
1299
1299
  dontRememberMe: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1300
1300
  }, "strip", z.ZodTypeAny, {
1301
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
1301
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
1302
1302
  callbackURL?: string | undefined;
1303
1303
  dontRememberMe?: boolean | undefined;
1304
1304
  }, {
1305
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
1305
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
1306
1306
  callbackURL?: string | undefined;
1307
1307
  dontRememberMe?: boolean | undefined;
1308
1308
  }>;
@@ -1335,17 +1335,17 @@ declare const signInOAuth: {
1335
1335
  /**
1336
1336
  * OAuth2 provider to use`
1337
1337
  */
1338
- provider: z.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
1338
+ provider: z.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
1339
1339
  /**
1340
1340
  * If this is true the session will only be valid for the current browser session
1341
1341
  */
1342
1342
  dontRememberMe: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1343
1343
  }, "strip", z.ZodTypeAny, {
1344
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
1344
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
1345
1345
  callbackURL?: string | undefined;
1346
1346
  dontRememberMe?: boolean | undefined;
1347
1347
  }, {
1348
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
1348
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
1349
1349
  callbackURL?: string | undefined;
1350
1350
  dontRememberMe?: boolean | undefined;
1351
1351
  }>;
@@ -2429,14 +2429,14 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
2429
2429
  }>>;
2430
2430
  body: zod.ZodObject<{
2431
2431
  callbackURL: zod.ZodOptional<zod.ZodString>;
2432
- provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
2432
+ provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
2433
2433
  dontRememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
2434
2434
  }, "strip", zod.ZodTypeAny, {
2435
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
2435
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
2436
2436
  callbackURL?: string | undefined;
2437
2437
  dontRememberMe?: boolean | undefined;
2438
2438
  }, {
2439
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
2439
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
2440
2440
  callbackURL?: string | undefined;
2441
2441
  dontRememberMe?: boolean | undefined;
2442
2442
  }>;
@@ -2459,14 +2459,14 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
2459
2459
  }>>;
2460
2460
  body: zod.ZodObject<{
2461
2461
  callbackURL: zod.ZodOptional<zod.ZodString>;
2462
- provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
2462
+ provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
2463
2463
  dontRememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
2464
2464
  }, "strip", zod.ZodTypeAny, {
2465
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
2465
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
2466
2466
  callbackURL?: string | undefined;
2467
2467
  dontRememberMe?: boolean | undefined;
2468
2468
  }, {
2469
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
2469
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
2470
2470
  callbackURL?: string | undefined;
2471
2471
  dontRememberMe?: boolean | undefined;
2472
2472
  }>;
@@ -2560,7 +2560,7 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
2560
2560
  };
2561
2561
  };
2562
2562
  } ? Field extends Record<string, FieldAttribute> ? { [key in keyof Field]: InferFieldOutput<Field[key]>; } : {} : {} : {} : {})>>;
2563
- user: Prettify<UnionToIntersection<{
2563
+ user: Prettify<UnionToIntersection<StripEmptyObjects<{
2564
2564
  id: string;
2565
2565
  email: string;
2566
2566
  emailVerified: boolean;
@@ -2574,13 +2574,13 @@ declare function getEndpoints<C extends AuthContext, Option extends BetterAuthOp
2574
2574
  fields: infer Field_1;
2575
2575
  };
2576
2576
  };
2577
- } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? Prettify<{ [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; }> : {} : {} : {} : Option extends Auth ? Option["options"]["plugins"] extends (infer T_1)[] ? T_1 extends {
2577
+ } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? { [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; } : {} : {} : {} : Option extends Auth ? Option["options"]["plugins"] extends (infer T_1)[] ? T_1 extends {
2578
2578
  schema: {
2579
2579
  user: {
2580
2580
  fields: infer Field_1;
2581
2581
  };
2582
2582
  };
2583
- } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? Prettify<{ [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; }> : {} : {} : {} : {})>>;
2583
+ } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? { [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; } : {} : {} : {} : {})>>>;
2584
2584
  } | null>;
2585
2585
  path: "/session";
2586
2586
  options: {
@@ -3426,14 +3426,14 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
3426
3426
  }>>;
3427
3427
  body: zod.ZodObject<{
3428
3428
  callbackURL: zod.ZodOptional<zod.ZodString>;
3429
- provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
3429
+ provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
3430
3430
  dontRememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
3431
3431
  }, "strip", zod.ZodTypeAny, {
3432
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
3432
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
3433
3433
  callbackURL?: string | undefined;
3434
3434
  dontRememberMe?: boolean | undefined;
3435
3435
  }, {
3436
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
3436
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
3437
3437
  callbackURL?: string | undefined;
3438
3438
  dontRememberMe?: boolean | undefined;
3439
3439
  }>;
@@ -3456,14 +3456,14 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
3456
3456
  }>>;
3457
3457
  body: zod.ZodObject<{
3458
3458
  callbackURL: zod.ZodOptional<zod.ZodString>;
3459
- provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
3459
+ provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
3460
3460
  dontRememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
3461
3461
  }, "strip", zod.ZodTypeAny, {
3462
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
3462
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
3463
3463
  callbackURL?: string | undefined;
3464
3464
  dontRememberMe?: boolean | undefined;
3465
3465
  }, {
3466
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
3466
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
3467
3467
  callbackURL?: string | undefined;
3468
3468
  dontRememberMe?: boolean | undefined;
3469
3469
  }>;
@@ -3557,7 +3557,7 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
3557
3557
  };
3558
3558
  };
3559
3559
  } ? Field extends Record<string, FieldAttribute> ? { [key in keyof Field]: InferFieldOutput<Field[key]>; } : {} : {} : {} : {})>>;
3560
- user: Prettify<UnionToIntersection<{
3560
+ user: Prettify<UnionToIntersection<StripEmptyObjects<{
3561
3561
  id: string;
3562
3562
  email: string;
3563
3563
  emailVerified: boolean;
@@ -3571,13 +3571,13 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
3571
3571
  fields: infer Field_1;
3572
3572
  };
3573
3573
  };
3574
- } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? Prettify<{ [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; }> : {} : {} : {} : Option extends Auth ? Option["options"]["plugins"] extends (infer T_1)[] ? T_1 extends {
3574
+ } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? { [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; } : {} : {} : {} : Option extends Auth ? Option["options"]["plugins"] extends (infer T_1)[] ? T_1 extends {
3575
3575
  schema: {
3576
3576
  user: {
3577
3577
  fields: infer Field_1;
3578
3578
  };
3579
3579
  };
3580
- } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? Prettify<{ [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; }> : {} : {} : {} : {})>>;
3580
+ } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? { [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; } : {} : {} : {} : {})>>>;
3581
3581
  } | null>;
3582
3582
  path: "/session";
3583
3583
  options: {
@@ -4425,14 +4425,14 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
4425
4425
  }>>;
4426
4426
  body: zod.ZodObject<{
4427
4427
  callbackURL: zod.ZodOptional<zod.ZodString>;
4428
- provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
4428
+ provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
4429
4429
  dontRememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
4430
4430
  }, "strip", zod.ZodTypeAny, {
4431
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
4431
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
4432
4432
  callbackURL?: string | undefined;
4433
4433
  dontRememberMe?: boolean | undefined;
4434
4434
  }, {
4435
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
4435
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
4436
4436
  callbackURL?: string | undefined;
4437
4437
  dontRememberMe?: boolean | undefined;
4438
4438
  }>;
@@ -4455,14 +4455,14 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
4455
4455
  }>>;
4456
4456
  body: zod.ZodObject<{
4457
4457
  callbackURL: zod.ZodOptional<zod.ZodString>;
4458
- provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
4458
+ provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
4459
4459
  dontRememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
4460
4460
  }, "strip", zod.ZodTypeAny, {
4461
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
4461
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
4462
4462
  callbackURL?: string | undefined;
4463
4463
  dontRememberMe?: boolean | undefined;
4464
4464
  }, {
4465
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
4465
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
4466
4466
  callbackURL?: string | undefined;
4467
4467
  dontRememberMe?: boolean | undefined;
4468
4468
  }>;
@@ -4556,7 +4556,7 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
4556
4556
  };
4557
4557
  };
4558
4558
  } ? Field extends Record<string, FieldAttribute> ? { [key in keyof Field]: InferFieldOutput<Field[key]>; } : {} : {} : {} : {})>>;
4559
- user: Prettify<UnionToIntersection<{
4559
+ user: Prettify<UnionToIntersection<StripEmptyObjects<{
4560
4560
  id: string;
4561
4561
  email: string;
4562
4562
  emailVerified: boolean;
@@ -4570,13 +4570,13 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
4570
4570
  fields: infer Field_1;
4571
4571
  };
4572
4572
  };
4573
- } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? Prettify<{ [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; }> : {} : {} : {} : O extends Auth ? O["options"]["plugins"] extends (infer T_1)[] ? T_1 extends {
4573
+ } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? { [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; } : {} : {} : {} : O extends Auth ? O["options"]["plugins"] extends (infer T_1)[] ? T_1 extends {
4574
4574
  schema: {
4575
4575
  user: {
4576
4576
  fields: infer Field_1;
4577
4577
  };
4578
4578
  };
4579
- } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? Prettify<{ [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; }> : {} : {} : {} : {})>>;
4579
+ } ? Field_1 extends Record<infer Key extends string | number | symbol, FieldAttribute> ? { [key_1 in Key as Field_1[key_1]["required"] extends false ? never : Field_1[key_1]["defaultValue"] extends string | number | boolean | Function | Date ? key_1 : never]: InferFieldOutput<Field_1[key_1]>; } & { [key_2 in Key as Field_1[key_2]["returned"] extends false ? never : key_2]?: InferFieldOutput<Field_1[key_2]> | undefined; } : {} : {} : {} : {})>>>;
4580
4580
  } | null>;
4581
4581
  path: "/session";
4582
4582
  options: {
@@ -5379,4 +5379,4 @@ type Auth = {
5379
5379
  options: BetterAuthOptions;
5380
5380
  };
5381
5381
 
5382
- export { ok as $, type Adapter as A, type BetterAuthPlugin as B, getSessionFromCtx as C, sessionMiddleware as D, listSessions as E, type FieldAttribute as F, type GenericEndpointContext as G, type HookEndpointContext as H, type InferFieldOutput as I, revokeSession as J, revokeSessions as K, signOut as L, forgetPassword as M, forgetPasswordCallback as N, resetPassword as O, type PluginSchema as P, createEmailVerificationToken as Q, type RateLimit as R, type SessionAdapter as S, sendVerificationEmail as T, verifyEmail as U, updateUser as V, type Where as W, changePassword as X, setPassword as Y, getCSRFToken as Z, error as _, createAuthEndpoint as a, signUpEmail as a0, csrfMiddleware as a1, betterAuth as a2, type AuthEndpoint as b, createAuthMiddleware as c, type AuthMiddleware as d, type Auth as e, type BetterAuthOptions as f, type AuthContext as g, getCookies as h, createCookieGetter as i, type BetterAuthCookies as j, deleteSessionCookie as k, createLogger as l, logger as m, type InferSession as n, optionsMiddleware as o, parseSetCookieHeader as p, type InferUser as q, type InferPluginTypes as r, setSessionCookie as s, init as t, getEndpoints as u, router as v, signInOAuth as w, signInEmail as x, callbackOAuth as y, getSession as z };
5382
+ export { ok as $, type Adapter as A, type BetterAuthPlugin as B, getSessionFromCtx as C, sessionMiddleware as D, listSessions as E, type FieldAttribute as F, type GenericEndpointContext as G, type HookEndpointContext as H, type InferFieldOutput as I, revokeSession as J, revokeSessions as K, signOut as L, forgetPassword as M, forgetPasswordCallback as N, resetPassword as O, type PluginSchema as P, createEmailVerificationToken as Q, type RateLimit as R, type SessionAdapter as S, sendVerificationEmail as T, verifyEmail as U, updateUser as V, type Where as W, changePassword as X, setPassword as Y, getCSRFToken as Z, error as _, createAuthEndpoint as a, signUpEmail as a0, csrfMiddleware as a1, betterAuth as a2, type AuthEndpoint as b, createAuthMiddleware as c, type AuthMiddleware as d, type Auth as e, type BetterAuthOptions as f, type AuthContext as g, getCookies as h, createCookieGetter as i, type BetterAuthCookies as j, deleteSessionCookie as k, createLogger as l, logger as m, type InferUser as n, optionsMiddleware as o, parseSetCookieHeader as p, type InferSession as q, type InferPluginTypes as r, setSessionCookie as s, init as t, getEndpoints as u, router as v, signInOAuth as w, signInEmail as x, callbackOAuth as y, getSession as z };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { e as Auth, a2 as betterAuth } from './index-CG6kutYo.js';
1
+ export { e as Auth, a2 as betterAuth } from './index-D9F_2jw7.js';
2
2
  import 'kysely';
3
- import './index-C-ootLvf.js';
3
+ import './index-37csVPVw.js';
4
4
  import 'arctic';
5
5
  import 'zod';
6
- import './helper-C1ihmerM.js';
6
+ import './helper-D-PIAORk.js';
7
7
  import 'better-call';