@better-auth/core 1.5.0-beta.3 → 1.5.0-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.
Files changed (175) hide show
  1. package/.turbo/turbo-build.log +170 -37
  2. package/dist/api/index.d.mts +188 -1
  3. package/dist/api/index.mjs +2 -1
  4. package/dist/context/endpoint-context.d.mts +19 -0
  5. package/dist/context/endpoint-context.mjs +27 -0
  6. package/dist/context/index.d.mts +3 -52
  7. package/dist/context/index.mjs +22 -1
  8. package/dist/context/request-state.d.mts +27 -0
  9. package/dist/context/request-state.mjs +45 -0
  10. package/dist/context/transaction.d.mts +16 -0
  11. package/dist/context/transaction.mjs +48 -0
  12. package/dist/db/adapter/factory.d.mts +27 -0
  13. package/dist/db/adapter/factory.mjs +738 -0
  14. package/dist/db/adapter/get-default-field-name.d.mts +18 -0
  15. package/dist/db/adapter/get-default-field-name.mjs +38 -0
  16. package/dist/db/adapter/get-default-model-name.d.mts +12 -0
  17. package/dist/db/adapter/get-default-model-name.mjs +32 -0
  18. package/dist/db/adapter/get-field-attributes.d.mts +29 -0
  19. package/dist/db/adapter/get-field-attributes.mjs +39 -0
  20. package/dist/db/adapter/get-field-name.d.mts +18 -0
  21. package/dist/db/adapter/get-field-name.mjs +33 -0
  22. package/dist/db/adapter/get-id-field.d.mts +39 -0
  23. package/dist/db/adapter/get-id-field.mjs +67 -0
  24. package/dist/db/adapter/get-model-name.d.mts +12 -0
  25. package/dist/db/adapter/get-model-name.mjs +23 -0
  26. package/dist/db/adapter/index.d.mts +513 -1
  27. package/dist/db/adapter/index.mjs +8 -970
  28. package/dist/db/adapter/types.d.mts +139 -0
  29. package/dist/db/adapter/utils.d.mts +7 -0
  30. package/dist/db/adapter/utils.mjs +38 -0
  31. package/dist/db/get-tables.d.mts +8 -0
  32. package/dist/{get-tables-CMc_Emww.mjs → db/get-tables.mjs} +1 -1
  33. package/dist/db/index.d.mts +10 -2
  34. package/dist/db/index.mjs +7 -60
  35. package/dist/db/plugin.d.mts +12 -0
  36. package/dist/db/schema/account.d.mts +26 -0
  37. package/dist/db/schema/account.mjs +19 -0
  38. package/dist/db/schema/rate-limit.d.mts +14 -0
  39. package/dist/db/schema/rate-limit.mjs +11 -0
  40. package/dist/db/schema/session.d.mts +21 -0
  41. package/dist/db/schema/session.mjs +14 -0
  42. package/dist/db/schema/shared.d.mts +10 -0
  43. package/dist/db/schema/shared.mjs +11 -0
  44. package/dist/db/schema/user.d.mts +20 -0
  45. package/dist/db/schema/user.mjs +13 -0
  46. package/dist/db/schema/verification.d.mts +19 -0
  47. package/dist/db/schema/verification.mjs +12 -0
  48. package/dist/db/type.d.mts +143 -0
  49. package/dist/env/color-depth.d.mts +4 -0
  50. package/dist/env/color-depth.mjs +88 -0
  51. package/dist/env/env-impl.d.mts +32 -0
  52. package/dist/env/env-impl.mjs +82 -0
  53. package/dist/env/index.d.mts +4 -2
  54. package/dist/env/index.mjs +3 -1
  55. package/dist/{index-BRBu0-5h.d.mts → env/logger.d.mts} +1 -35
  56. package/dist/env/logger.mjs +81 -0
  57. package/dist/error/codes.d.mts +186 -0
  58. package/dist/{error-GNtLPYaS.mjs → error/codes.mjs} +2 -29
  59. package/dist/error/index.d.mts +1 -185
  60. package/dist/error/index.mjs +28 -3
  61. package/dist/index.d.mts +7 -1
  62. package/dist/oauth2/client-credentials-token.d.mts +36 -0
  63. package/dist/oauth2/client-credentials-token.mjs +54 -0
  64. package/dist/oauth2/create-authorization-url.d.mts +45 -0
  65. package/dist/oauth2/create-authorization-url.mjs +42 -0
  66. package/dist/oauth2/index.d.mts +8 -2
  67. package/dist/oauth2/index.mjs +6 -2
  68. package/dist/oauth2/oauth-provider.d.mts +194 -0
  69. package/dist/oauth2/refresh-access-token.d.mts +36 -0
  70. package/dist/oauth2/refresh-access-token.mjs +58 -0
  71. package/dist/oauth2/utils.d.mts +7 -0
  72. package/dist/oauth2/utils.mjs +27 -0
  73. package/dist/oauth2/validate-authorization-code.d.mts +55 -0
  74. package/dist/oauth2/validate-authorization-code.mjs +71 -0
  75. package/dist/oauth2/verify.d.mts +49 -0
  76. package/dist/oauth2/verify.mjs +95 -0
  77. package/dist/social-providers/apple.d.mts +119 -0
  78. package/dist/social-providers/apple.mjs +102 -0
  79. package/dist/social-providers/atlassian.d.mts +72 -0
  80. package/dist/social-providers/atlassian.mjs +83 -0
  81. package/dist/social-providers/cognito.d.mts +87 -0
  82. package/dist/social-providers/cognito.mjs +165 -0
  83. package/dist/social-providers/discord.d.mts +126 -0
  84. package/dist/social-providers/discord.mjs +64 -0
  85. package/dist/social-providers/dropbox.d.mts +71 -0
  86. package/dist/social-providers/dropbox.mjs +75 -0
  87. package/dist/social-providers/facebook.d.mts +81 -0
  88. package/dist/social-providers/facebook.mjs +120 -0
  89. package/dist/social-providers/figma.d.mts +63 -0
  90. package/dist/social-providers/figma.mjs +84 -0
  91. package/dist/social-providers/github.d.mts +104 -0
  92. package/dist/social-providers/github.mjs +80 -0
  93. package/dist/social-providers/gitlab.d.mts +125 -0
  94. package/dist/social-providers/gitlab.mjs +82 -0
  95. package/dist/social-providers/google.d.mts +99 -0
  96. package/dist/social-providers/google.mjs +108 -0
  97. package/dist/social-providers/huggingface.d.mts +85 -0
  98. package/dist/social-providers/huggingface.mjs +75 -0
  99. package/dist/social-providers/index.d.mts +1723 -1
  100. package/dist/social-providers/index.mjs +33 -2569
  101. package/dist/social-providers/kakao.d.mts +163 -0
  102. package/dist/social-providers/kakao.mjs +72 -0
  103. package/dist/social-providers/kick.d.mts +75 -0
  104. package/dist/social-providers/kick.mjs +71 -0
  105. package/dist/social-providers/line.d.mts +107 -0
  106. package/dist/social-providers/line.mjs +113 -0
  107. package/dist/social-providers/linear.d.mts +70 -0
  108. package/dist/social-providers/linear.mjs +88 -0
  109. package/dist/social-providers/linkedin.d.mts +69 -0
  110. package/dist/social-providers/linkedin.mjs +76 -0
  111. package/dist/social-providers/microsoft-entra-id.d.mts +174 -0
  112. package/dist/social-providers/microsoft-entra-id.mjs +106 -0
  113. package/dist/social-providers/naver.d.mts +104 -0
  114. package/dist/social-providers/naver.mjs +67 -0
  115. package/dist/social-providers/notion.d.mts +66 -0
  116. package/dist/social-providers/notion.mjs +75 -0
  117. package/dist/social-providers/paybin.d.mts +73 -0
  118. package/dist/social-providers/paybin.mjs +85 -0
  119. package/dist/social-providers/paypal.d.mts +131 -0
  120. package/dist/social-providers/paypal.mjs +144 -0
  121. package/dist/social-providers/polar.d.mts +76 -0
  122. package/dist/social-providers/polar.mjs +73 -0
  123. package/dist/social-providers/reddit.d.mts +64 -0
  124. package/dist/social-providers/reddit.mjs +83 -0
  125. package/dist/social-providers/roblox.d.mts +72 -0
  126. package/dist/social-providers/roblox.mjs +59 -0
  127. package/dist/social-providers/salesforce.d.mts +81 -0
  128. package/dist/social-providers/salesforce.mjs +91 -0
  129. package/dist/social-providers/slack.d.mts +85 -0
  130. package/dist/social-providers/slack.mjs +68 -0
  131. package/dist/social-providers/spotify.d.mts +65 -0
  132. package/dist/social-providers/spotify.mjs +71 -0
  133. package/dist/social-providers/tiktok.d.mts +171 -0
  134. package/dist/social-providers/tiktok.mjs +62 -0
  135. package/dist/social-providers/twitch.d.mts +81 -0
  136. package/dist/social-providers/twitch.mjs +78 -0
  137. package/dist/social-providers/twitter.d.mts +140 -0
  138. package/dist/social-providers/twitter.mjs +87 -0
  139. package/dist/social-providers/vercel.d.mts +64 -0
  140. package/dist/social-providers/vercel.mjs +61 -0
  141. package/dist/social-providers/vk.d.mts +72 -0
  142. package/dist/social-providers/vk.mjs +83 -0
  143. package/dist/social-providers/zoom.d.mts +173 -0
  144. package/dist/social-providers/zoom.mjs +72 -0
  145. package/dist/types/context.d.mts +246 -0
  146. package/dist/types/cookie.d.mts +23 -0
  147. package/dist/types/helper.d.mts +8 -0
  148. package/dist/types/index.d.mts +8 -0
  149. package/dist/types/init-options.d.mts +1266 -0
  150. package/dist/types/plugin-client.d.mts +110 -0
  151. package/dist/types/plugin.d.mts +124 -0
  152. package/dist/utils/deprecate.d.mts +10 -0
  153. package/dist/utils/deprecate.mjs +17 -0
  154. package/dist/utils/{index.d.mts → error-codes.d.mts} +1 -19
  155. package/dist/utils/error-codes.mjs +11 -0
  156. package/dist/utils/id.d.mts +4 -0
  157. package/dist/utils/id.mjs +9 -0
  158. package/dist/utils/json.d.mts +4 -0
  159. package/dist/utils/json.mjs +25 -0
  160. package/dist/utils/string.d.mts +4 -0
  161. package/dist/utils/string.mjs +7 -0
  162. package/package.json +10 -7
  163. package/src/db/adapter/get-id-field.ts +1 -1
  164. package/src/error/codes.ts +1 -1
  165. package/src/oauth2/create-authorization-url.ts +1 -1
  166. package/src/oauth2/oauth-provider.ts +6 -0
  167. package/src/types/init-options.ts +19 -4
  168. package/tsdown.config.ts +3 -1
  169. package/dist/context-BBNwughv.mjs +0 -133
  170. package/dist/env-DbssmzoK.mjs +0 -245
  171. package/dist/index-CGr4Qrv8.d.mts +0 -8039
  172. package/dist/oauth2-BjWM15hm.mjs +0 -326
  173. package/dist/utils/index.mjs +0 -4
  174. package/dist/utils-puAL36Bz.mjs +0 -63
  175. package/src/utils/index.ts +0 -5
@@ -0,0 +1,246 @@
1
+ import { BetterAuthDBSchema, ModelNames, SecondaryStorage } from "../db/type.mjs";
2
+ import { Account } from "../db/schema/account.mjs";
3
+ import { Session } from "../db/schema/session.mjs";
4
+ import { User } from "../db/schema/user.mjs";
5
+ import { Verification } from "../db/schema/verification.mjs";
6
+ import "../db/index.mjs";
7
+ import { LiteralString } from "./helper.mjs";
8
+ import { DBAdapter, Where } from "../db/adapter/index.mjs";
9
+ import { createLogger } from "../env/logger.mjs";
10
+ import { OAuthProvider } from "../oauth2/oauth-provider.mjs";
11
+ import "../oauth2/index.mjs";
12
+ import { BetterAuthCookies } from "./cookie.mjs";
13
+ import { BetterAuthPlugin } from "./plugin.mjs";
14
+ import { BetterAuthOptions, BetterAuthRateLimitOptions } from "./init-options.mjs";
15
+ import { CookieOptions, EndpointContext } from "better-call";
16
+
17
+ //#region src/types/context.d.ts
18
+
19
+ /**
20
+ * Mutators are defined in each plugin
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * declare module "@better-auth/core" {
25
+ * interface BetterAuthPluginRegistry<Auth, Context> {
26
+ * 'jwt': {
27
+ * creator: typeof jwt
28
+ * }
29
+ * }
30
+ * }
31
+ * ```
32
+ */
33
+ interface BetterAuthPluginRegistry<Auth, Context> {}
34
+ type BetterAuthPluginRegistryIdentifier = keyof BetterAuthPluginRegistry<unknown, unknown>;
35
+ type GenericEndpointContext<Options extends BetterAuthOptions = BetterAuthOptions> = EndpointContext<string, any> & {
36
+ context: AuthContext<Options>;
37
+ };
38
+ interface InternalAdapter<_Options extends BetterAuthOptions = BetterAuthOptions> {
39
+ createOAuthUser(user: Omit<User, "id" | "createdAt" | "updatedAt">, account: Omit<Account, "userId" | "id" | "createdAt" | "updatedAt"> & Partial<Account>): Promise<{
40
+ user: User;
41
+ account: Account;
42
+ }>;
43
+ createUser<T extends Record<string, any>>(user: Omit<User, "id" | "createdAt" | "updatedAt" | "emailVerified"> & Partial<User> & Record<string, any>): Promise<T & User>;
44
+ createAccount<T extends Record<string, any>>(account: Omit<Account, "id" | "createdAt" | "updatedAt"> & Partial<Account> & T): Promise<T & Account>;
45
+ listSessions(userId: string): Promise<Session[]>;
46
+ listUsers(limit?: number | undefined, offset?: number | undefined, sortBy?: {
47
+ field: string;
48
+ direction: "asc" | "desc";
49
+ } | undefined, where?: Where[] | undefined): Promise<User[]>;
50
+ countTotalUsers(where?: Where[] | undefined): Promise<number>;
51
+ deleteUser(userId: string): Promise<void>;
52
+ createSession(userId: string, dontRememberMe?: boolean | undefined, override?: (Partial<Session> & Record<string, any>) | undefined, overrideAll?: boolean | undefined): Promise<Session>;
53
+ findSession(token: string): Promise<{
54
+ session: Session & Record<string, any>;
55
+ user: User & Record<string, any>;
56
+ } | null>;
57
+ findSessions(sessionTokens: string[]): Promise<{
58
+ session: Session;
59
+ user: User;
60
+ }[]>;
61
+ updateSession(sessionToken: string, session: Partial<Session> & Record<string, any>): Promise<Session | null>;
62
+ deleteSession(token: string): Promise<void>;
63
+ deleteAccounts(userId: string): Promise<void>;
64
+ deleteAccount(accountId: string): Promise<void>;
65
+ deleteSessions(userIdOrSessionTokens: string | string[]): Promise<void>;
66
+ findOAuthUser(email: string, accountId: string, providerId: string): Promise<{
67
+ user: User;
68
+ accounts: Account[];
69
+ } | null>;
70
+ findUserByEmail(email: string, options?: {
71
+ includeAccounts: boolean;
72
+ } | undefined): Promise<{
73
+ user: User;
74
+ accounts: Account[];
75
+ } | null>;
76
+ findUserById(userId: string): Promise<User | null>;
77
+ linkAccount(account: Omit<Account, "id" | "createdAt" | "updatedAt"> & Partial<Account>): Promise<Account>;
78
+ updateUser<T extends Record<string, any>>(userId: string, data: Partial<User> & Record<string, any>): Promise<User & T>;
79
+ updateUserByEmail<T extends Record<string, any>>(email: string, data: Partial<User & Record<string, any>>): Promise<User & T>;
80
+ updatePassword(userId: string, password: string): Promise<void>;
81
+ findAccounts(userId: string): Promise<Account[]>;
82
+ findAccount(accountId: string): Promise<Account | null>;
83
+ findAccountByProviderId(accountId: string, providerId: string): Promise<Account | null>;
84
+ findAccountByUserId(userId: string): Promise<Account[]>;
85
+ updateAccount(id: string, data: Partial<Account>): Promise<Account>;
86
+ createVerificationValue(data: Omit<Verification, "createdAt" | "id" | "updatedAt"> & Partial<Verification>): Promise<Verification>;
87
+ findVerificationValue(identifier: string): Promise<Verification | null>;
88
+ deleteVerificationValue(id: string): Promise<void>;
89
+ deleteVerificationByIdentifier(identifier: string): Promise<void>;
90
+ updateVerificationValue(id: string, data: Partial<Verification>): Promise<Verification>;
91
+ }
92
+ type CreateCookieGetterFn = (cookieName: string, overrideAttributes?: Partial<CookieOptions> | undefined) => {
93
+ name: string;
94
+ attributes: CookieOptions;
95
+ };
96
+ type CheckPasswordFn<Options extends BetterAuthOptions = BetterAuthOptions> = (userId: string, ctx: GenericEndpointContext<Options>) => Promise<boolean>;
97
+ type PluginContext = {
98
+ getPlugin: <ID extends BetterAuthPluginRegistryIdentifier | LiteralString>(pluginId: ID) => (ID extends BetterAuthPluginRegistryIdentifier ? ReturnType<BetterAuthPluginRegistry<unknown, unknown>[ID]["creator"]> : BetterAuthPlugin) | null;
99
+ /**
100
+ * Checks if a plugin is enabled by its ID.
101
+ *
102
+ * @param pluginId - The ID of the plugin to check
103
+ * @returns `true` if the plugin is enabled, `false` otherwise
104
+ *
105
+ * @example
106
+ * ```ts
107
+ * if (ctx.context.hasPlugin("organization")) {
108
+ * // organization plugin is enabled
109
+ * }
110
+ * ```
111
+ */
112
+ hasPlugin: <ID extends BetterAuthPluginRegistryIdentifier | LiteralString>(pluginId: ID) => boolean;
113
+ };
114
+ type AuthContext<Options extends BetterAuthOptions = BetterAuthOptions> = PluginContext & {
115
+ options: Options;
116
+ appName: string;
117
+ baseURL: string;
118
+ trustedOrigins: string[];
119
+ /**
120
+ * Verifies whether url is a trusted origin according to the "trustedOrigins" configuration
121
+ * @param url The url to verify against the "trustedOrigins" configuration
122
+ * @param settings Specify supported pattern matching settings
123
+ * @returns {boolean} true if the URL matches the origin pattern, false otherwise.
124
+ */
125
+ isTrustedOrigin: (url: string, settings?: {
126
+ allowRelativePaths: boolean;
127
+ }) => boolean;
128
+ oauthConfig: {
129
+ /**
130
+ * This is dangerous and should only be used in dev or staging environments.
131
+ */
132
+ skipStateCookieCheck?: boolean | undefined;
133
+ /**
134
+ * Strategy for storing OAuth state
135
+ *
136
+ * - "cookie": Store state in an encrypted cookie (stateless)
137
+ * - "database": Store state in the database
138
+ *
139
+ * @default "cookie"
140
+ */
141
+ storeStateStrategy: "database" | "cookie";
142
+ };
143
+ /**
144
+ * New session that will be set after the request
145
+ * meaning: there is a `set-cookie` header that will set
146
+ * the session cookie. This is the fetched session. And it's set
147
+ * by `setNewSession` method.
148
+ */
149
+ newSession: {
150
+ session: Session & Record<string, any>;
151
+ user: User & Record<string, any>;
152
+ } | null;
153
+ session: {
154
+ session: Session & Record<string, any>;
155
+ user: User & Record<string, any>;
156
+ } | null;
157
+ setNewSession: (session: {
158
+ session: Session & Record<string, any>;
159
+ user: User & Record<string, any>;
160
+ } | null) => void;
161
+ socialProviders: OAuthProvider[];
162
+ authCookies: BetterAuthCookies;
163
+ logger: ReturnType<typeof createLogger>;
164
+ rateLimit: {
165
+ enabled: boolean;
166
+ window: number;
167
+ max: number;
168
+ storage: "memory" | "database" | "secondary-storage";
169
+ } & BetterAuthRateLimitOptions;
170
+ adapter: DBAdapter<Options>;
171
+ internalAdapter: InternalAdapter<Options>;
172
+ createAuthCookie: CreateCookieGetterFn;
173
+ secret: string;
174
+ sessionConfig: {
175
+ updateAge: number;
176
+ expiresIn: number;
177
+ freshAge: number;
178
+ cookieRefreshCache: false | {
179
+ enabled: true;
180
+ updateAge: number;
181
+ };
182
+ };
183
+ generateId: (options: {
184
+ model: ModelNames;
185
+ size?: number | undefined;
186
+ }) => string | false;
187
+ secondaryStorage: SecondaryStorage | undefined;
188
+ password: {
189
+ hash: (password: string) => Promise<string>;
190
+ verify: (data: {
191
+ password: string;
192
+ hash: string;
193
+ }) => Promise<boolean>;
194
+ config: {
195
+ minPasswordLength: number;
196
+ maxPasswordLength: number;
197
+ };
198
+ checkPassword: CheckPasswordFn<Options>;
199
+ };
200
+ tables: BetterAuthDBSchema;
201
+ runMigrations: () => Promise<void>;
202
+ publishTelemetry: (event: {
203
+ type: string;
204
+ anonymousId?: string | undefined;
205
+ payload: Record<string, any>;
206
+ }) => Promise<void>;
207
+ /**
208
+ * This skips the origin check for all requests.
209
+ *
210
+ * set to true by default for `test` environments and `false`
211
+ * for other environments.
212
+ *
213
+ * It's inferred from the `options.advanced?.disableCSRFCheck`
214
+ * option or `options.advanced?.disableOriginCheck` option.
215
+ *
216
+ * @default false
217
+ */
218
+ skipOriginCheck: boolean;
219
+ /**
220
+ * This skips the CSRF check for all requests.
221
+ *
222
+ * This is inferred from the `options.advanced?.
223
+ * disableCSRFCheck` option.
224
+ *
225
+ * @default false
226
+ */
227
+ skipCSRFCheck: boolean;
228
+ /**
229
+ * Background task handler for deferred operations.
230
+ *
231
+ * This is inferred from the `options.advanced?.backgroundTasks?.handler` option.
232
+ * Defaults to a no-op that just runs the promise.
233
+ */
234
+ runInBackground: (promise: Promise<void>) => void;
235
+ /**
236
+ * Runs a task in the background if `runInBackground` is configured,
237
+ * otherwise awaits the task directly.
238
+ *
239
+ * This is useful for operations like sending emails where we want
240
+ * to avoid blocking the response when possible (for timing attack
241
+ * mitigation), but still ensure the operation completes.
242
+ */
243
+ runInBackgroundOrAwait: (promise: Promise<unknown> | Promise<void> | void | unknown) => Promise<unknown>;
244
+ };
245
+ //#endregion
246
+ export { AuthContext, BetterAuthPluginRegistry, BetterAuthPluginRegistryIdentifier, GenericEndpointContext, InternalAdapter, PluginContext };
@@ -0,0 +1,23 @@
1
+ import { CookieOptions } from "better-call";
2
+
3
+ //#region src/types/cookie.d.ts
4
+ type BetterAuthCookies = {
5
+ sessionToken: {
6
+ name: string;
7
+ options: CookieOptions;
8
+ };
9
+ sessionData: {
10
+ name: string;
11
+ options: CookieOptions;
12
+ };
13
+ accountData: {
14
+ name: string;
15
+ options: CookieOptions;
16
+ };
17
+ dontRememberToken: {
18
+ name: string;
19
+ options: CookieOptions;
20
+ };
21
+ };
22
+ //#endregion
23
+ export { BetterAuthCookies };
@@ -0,0 +1,8 @@
1
+ //#region src/types/helper.d.ts
2
+ type Primitive = string | number | symbol | bigint | boolean | null | undefined;
3
+ type Awaitable<T> = T | Promise<T>;
4
+ type LiteralString = "" | (string & Record<never, never>);
5
+ type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
6
+ type Prettify<T> = { [K in keyof T]: T[K] } & {};
7
+ //#endregion
8
+ export { Awaitable, LiteralString, LiteralUnion, Prettify, Primitive };
@@ -0,0 +1,8 @@
1
+ import { Awaitable, LiteralString, LiteralUnion, Prettify, Primitive } from "./helper.mjs";
2
+ import { BetterAuthCookies } from "./cookie.mjs";
3
+ import { BetterAuthPlugin, HookEndpointContext } from "./plugin.mjs";
4
+ import { BetterAuthAdvancedOptions, BetterAuthOptions, BetterAuthRateLimitOptions, GenerateIdFn } from "./init-options.mjs";
5
+ import { AuthContext, BetterAuthPluginRegistry, BetterAuthPluginRegistryIdentifier, GenericEndpointContext, InternalAdapter, PluginContext } from "./context.mjs";
6
+ import { BetterAuthClientOptions, BetterAuthClientPlugin, ClientAtomListener, ClientFetchOption, ClientStore } from "./plugin-client.mjs";
7
+ import { StandardSchemaV1 as StandardSchemaV1$1 } from "@standard-schema/spec";
8
+ export { type StandardSchemaV1$1 as StandardSchemaV1 };