@better-auth/core 1.5.0-beta.3 → 1.5.0-beta.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/.turbo/turbo-build.log +4 -4
- package/dist/api/index.d.mts +1 -1
- package/dist/context/index.d.mts +1 -1
- package/dist/db/adapter/index.d.mts +1 -1
- package/dist/db/index.d.mts +1 -1
- package/dist/{index-CGr4Qrv8.d.mts → index-B5x_W0dM.d.mts} +19 -4
- package/dist/index.d.mts +1 -1
- package/dist/oauth2/index.d.mts +1 -1
- package/dist/social-providers/index.d.mts +1 -1
- package/package.json +2 -2
- package/src/types/init-options.ts +19 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @better-auth/core@1.5.0-beta.
|
|
2
|
+
> @better-auth/core@1.5.0-beta.4 build /home/runner/work/better-auth/better-auth/packages/core
|
|
3
3
|
> tsdown
|
|
4
4
|
|
|
5
5
|
[34mℹ[39m tsdown [2mv0.17.2[22m powered by rolldown [2mv1.0.0-beta.53[22m
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
[34mℹ[39m [2mdist/[22m[32m[1mapi/index.d.mts[22m[39m [2m 0.26 kB[22m [2m│ gzip: 0.14 kB[22m
|
|
38
38
|
[34mℹ[39m [2mdist/[22m[32m[1masync_hooks/index.d.mts[22m[39m [2m 0.24 kB[22m [2m│ gzip: 0.16 kB[22m
|
|
39
39
|
[34mℹ[39m [2mdist/[22m[32m[1masync_hooks/pure.index.d.mts[22m[39m [2m 0.22 kB[22m [2m│ gzip: 0.16 kB[22m
|
|
40
|
-
[34mℹ[39m [2mdist/[22m[32mindex-
|
|
40
|
+
[34mℹ[39m [2mdist/[22m[32mindex-B5x_W0dM.d.mts[39m [2m228.92 kB[22m [2m│ gzip: 36.28 kB[22m
|
|
41
41
|
[34mℹ[39m [2mdist/[22m[32mindex-BRBu0-5h.d.mts[39m [2m 3.31 kB[22m [2m│ gzip: 1.11 kB[22m
|
|
42
|
-
[34mℹ[39m 32 files, total: 415.
|
|
43
|
-
[32m✔[39m Build complete in [
|
|
42
|
+
[34mℹ[39m 32 files, total: 415.92 kB
|
|
43
|
+
[32m✔[39m Build complete in [32m5286ms[39m
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as optionsMiddleware, i as createAuthMiddleware, n as AuthMiddleware, r as createAuthEndpoint, t as AuthEndpoint } from "../index-
|
|
1
|
+
import { a as optionsMiddleware, i as createAuthMiddleware, n as AuthMiddleware, r as createAuthEndpoint, t as AuthEndpoint } from "../index-B5x_W0dM.mjs";
|
|
2
2
|
export { AuthEndpoint, AuthMiddleware, createAuthEndpoint, createAuthMiddleware, optionsMiddleware };
|
package/dist/context/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Qn as DBAdapter, f as AuthContext, rr as DBTransactionAdapter } from "../index-
|
|
1
|
+
import { Qn as DBAdapter, f as AuthContext, rr as DBTransactionAdapter } from "../index-B5x_W0dM.mjs";
|
|
2
2
|
import { AsyncLocalStorage } from "@better-auth/core/async_hooks";
|
|
3
3
|
import { EndpointContext, InputContext } from "better-call";
|
|
4
4
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $n as DBAdapterDebugLogOption, Dr as initGetFieldAttributes, Er as initGetFieldName, Or as initGetDefaultModelName, Qn as DBAdapter, Tr as initGetIdField, Xn as CleanedWhere, Zn as CustomAdapter, _r as CreateAdapterOptions, ar as JoinOption, cr as withApplyDefault, dr as createAdapterFactory, er as DBAdapterFactoryConfig, fr as AdapterConfig, gr as AdapterTestDebugLogs, hr as AdapterFactoryOptions, ir as JoinConfig, kr as initGetDefaultFieldName, lr as AdapterFactory, mr as AdapterFactoryCustomizeAdapterCreator, nr as DBAdapterSchemaCreation, or as Where, pr as AdapterFactoryConfig, rr as DBTransactionAdapter, sr as deepmerge, tr as DBAdapterInstance, ur as createAdapter, vr as CreateCustomAdapter, wr as initGetModelName } from "../../index-
|
|
1
|
+
import { $n as DBAdapterDebugLogOption, Dr as initGetFieldAttributes, Er as initGetFieldName, Or as initGetDefaultModelName, Qn as DBAdapter, Tr as initGetIdField, Xn as CleanedWhere, Zn as CustomAdapter, _r as CreateAdapterOptions, ar as JoinOption, cr as withApplyDefault, dr as createAdapterFactory, er as DBAdapterFactoryConfig, fr as AdapterConfig, gr as AdapterTestDebugLogs, hr as AdapterFactoryOptions, ir as JoinConfig, kr as initGetDefaultFieldName, lr as AdapterFactory, mr as AdapterFactoryCustomizeAdapterCreator, nr as DBAdapterSchemaCreation, or as Where, pr as AdapterFactoryConfig, rr as DBTransactionAdapter, sr as deepmerge, tr as DBAdapterInstance, ur as createAdapter, vr as CreateCustomAdapter, wr as initGetModelName } from "../../index-B5x_W0dM.mjs";
|
|
2
2
|
export { AdapterConfig, AdapterFactory, AdapterFactoryConfig, AdapterFactoryCustomizeAdapterCreator, AdapterFactoryOptions, AdapterTestDebugLogs, CleanedWhere, CreateAdapterOptions, CreateCustomAdapter, CustomAdapter, DBAdapter, DBAdapterDebugLogOption, DBAdapterFactoryConfig, DBAdapterInstance, DBAdapterSchemaCreation, DBTransactionAdapter, JoinConfig, JoinOption, Where, createAdapter, createAdapterFactory, deepmerge, initGetDefaultFieldName, initGetDefaultModelName, initGetFieldAttributes, initGetFieldName, initGetIdField, initGetModelName, withApplyDefault };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ar as Verification, Br as accountSchema, Fr as Session, Gr as DBFieldAttribute, Hr as getAuthTables, Ir as sessionSchema, Jr as DBPrimitive, Kr as DBFieldAttributeConfig, Lr as RateLimit, Mr as User, Nr as userSchema, Pr as coreSchema, Rr as rateLimitSchema, Ur as BaseModelNames, Vr as BetterAuthPluginDBSchema, Wr as BetterAuthDBSchema, Xr as SecondaryStorage, Yr as ModelNames, jr as verificationSchema, qr as DBFieldType, zr as Account } from "../index-
|
|
1
|
+
import { Ar as Verification, Br as accountSchema, Fr as Session, Gr as DBFieldAttribute, Hr as getAuthTables, Ir as sessionSchema, Jr as DBPrimitive, Kr as DBFieldAttributeConfig, Lr as RateLimit, Mr as User, Nr as userSchema, Pr as coreSchema, Rr as rateLimitSchema, Ur as BaseModelNames, Vr as BetterAuthPluginDBSchema, Wr as BetterAuthDBSchema, Xr as SecondaryStorage, Yr as ModelNames, jr as verificationSchema, qr as DBFieldType, zr as Account } from "../index-B5x_W0dM.mjs";
|
|
2
2
|
export { Account, BaseModelNames, BetterAuthDBSchema, BetterAuthPluginDBSchema, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPrimitive, ModelNames, RateLimit, SecondaryStorage, Session, User, Verification, accountSchema, coreSchema, getAuthTables, rateLimitSchema, sessionSchema, userSchema, verificationSchema };
|
|
@@ -6415,17 +6415,32 @@ type BetterAuthAdvancedOptions = {
|
|
|
6415
6415
|
*/
|
|
6416
6416
|
useSecureCookies?: boolean | undefined;
|
|
6417
6417
|
/**
|
|
6418
|
-
* Disable
|
|
6418
|
+
* Disable all CSRF protection.
|
|
6419
|
+
*
|
|
6420
|
+
* When enabled, this disables:
|
|
6421
|
+
* - Origin header validation when cookies are present
|
|
6422
|
+
* - Fetch Metadata checks (Sec-Fetch-Site, Sec-Fetch-Mode, Sec-Fetch-Dest)
|
|
6423
|
+
* - Cross-site navigation blocking for first-login scenarios
|
|
6419
6424
|
*
|
|
6420
6425
|
* ⚠︎ This is a security risk and it may expose your application to
|
|
6421
6426
|
* CSRF attacks
|
|
6427
|
+
*
|
|
6428
|
+
* @default false
|
|
6422
6429
|
*/
|
|
6423
6430
|
disableCSRFCheck?: boolean | undefined;
|
|
6424
6431
|
/**
|
|
6425
|
-
* Disable
|
|
6432
|
+
* Disable URL validation against trustedOrigins.
|
|
6426
6433
|
*
|
|
6427
|
-
*
|
|
6428
|
-
*
|
|
6434
|
+
* When enabled, this disables validation of:
|
|
6435
|
+
* - callbackURL
|
|
6436
|
+
* - redirectTo
|
|
6437
|
+
* - errorCallbackURL
|
|
6438
|
+
* - newUserCallbackURL
|
|
6439
|
+
*
|
|
6440
|
+
* ⚠︎ This may allow open redirects and could lead to security
|
|
6441
|
+
* vulnerabilities.
|
|
6442
|
+
*
|
|
6443
|
+
* @default false
|
|
6429
6444
|
*/
|
|
6430
6445
|
disableOriginCheck?: boolean | undefined;
|
|
6431
6446
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as HookEndpointContext, Cr as Primitive, Mn as BetterAuthCookies, S as BetterAuthPlugin, Sr as Prettify, _ as PluginContext, b as BetterAuthRateLimitOptions, br as LiteralString, c as BetterAuthClientPlugin, d as ClientStore, f as AuthContext, g as InternalAdapter, h as GenericEndpointContext, l as ClientAtomListener, m as BetterAuthPluginRegistryIdentifier, o as StandardSchemaV1, p as BetterAuthPluginRegistry, s as BetterAuthClientOptions, u as ClientFetchOption, v as BetterAuthAdvancedOptions, x as GenerateIdFn, xr as LiteralUnion, y as BetterAuthOptions, yr as Awaitable } from "./index-
|
|
1
|
+
import { C as HookEndpointContext, Cr as Primitive, Mn as BetterAuthCookies, S as BetterAuthPlugin, Sr as Prettify, _ as PluginContext, b as BetterAuthRateLimitOptions, br as LiteralString, c as BetterAuthClientPlugin, d as ClientStore, f as AuthContext, g as InternalAdapter, h as GenericEndpointContext, l as ClientAtomListener, m as BetterAuthPluginRegistryIdentifier, o as StandardSchemaV1, p as BetterAuthPluginRegistry, s as BetterAuthClientOptions, u as ClientFetchOption, v as BetterAuthAdvancedOptions, x as GenerateIdFn, xr as LiteralUnion, y as BetterAuthOptions, yr as Awaitable } from "./index-B5x_W0dM.mjs";
|
|
2
2
|
export { AuthContext, Awaitable, BetterAuthAdvancedOptions, BetterAuthClientOptions, BetterAuthClientPlugin, BetterAuthCookies, BetterAuthOptions, BetterAuthPlugin, BetterAuthPluginRegistry, BetterAuthPluginRegistryIdentifier, BetterAuthRateLimitOptions, ClientAtomListener, ClientFetchOption, ClientStore, GenerateIdFn, GenericEndpointContext, HookEndpointContext, InternalAdapter, LiteralString, LiteralUnion, PluginContext, Prettify, Primitive, StandardSchemaV1 };
|
package/dist/oauth2/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bn as getOAuth2Tokens, Fn as verifyJwsAccessToken, Gn as createClientCredentialsTokenRequest, Hn as refreshAccessToken, In as createAuthorizationCodeRequest, Jn as OAuthProvider, Kn as OAuth2Tokens, Ln as validateAuthorizationCode, Nn as getJwks, Pn as verifyAccessToken, Rn as validateToken, Un as createAuthorizationURL, Vn as createRefreshAccessTokenRequest, Wn as clientCredentialsToken, Yn as ProviderOptions, qn as OAuth2UserInfo, zn as generateCodeChallenge } from "../index-
|
|
1
|
+
import { Bn as getOAuth2Tokens, Fn as verifyJwsAccessToken, Gn as createClientCredentialsTokenRequest, Hn as refreshAccessToken, In as createAuthorizationCodeRequest, Jn as OAuthProvider, Kn as OAuth2Tokens, Ln as validateAuthorizationCode, Nn as getJwks, Pn as verifyAccessToken, Rn as validateToken, Un as createAuthorizationURL, Vn as createRefreshAccessTokenRequest, Wn as clientCredentialsToken, Yn as ProviderOptions, qn as OAuth2UserInfo, zn as generateCodeChallenge } from "../index-B5x_W0dM.mjs";
|
|
2
2
|
export { OAuth2Tokens, OAuth2UserInfo, OAuthProvider, ProviderOptions, clientCredentialsToken, createAuthorizationCodeRequest, createAuthorizationURL, createClientCredentialsTokenRequest, createRefreshAccessTokenRequest, generateCodeChallenge, getJwks, getOAuth2Tokens, refreshAccessToken, validateAuthorizationCode, validateToken, verifyAccessToken, verifyJwsAccessToken };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as NotionOptions, $t as HuggingFaceProfile, A as VercelOptions, An as apple, At as LinearOptions, B as PaybinOptions, Bt as TwitterOption, Cn as getCognitoPublicKey, Ct as tiktok, D as SocialProviders, Dn as AppleNonConformUser, Dt as LinkedInOptions, E as SocialProviderListEnum, En as atlassian, Et as gitlab, F as polar, Ft as KickProfile, G as LineUserInfo, Gt as twitch, H as paybin, Ht as twitter, I as PayPalOptions, It as kick, J as NaverProfile, Jt as spotify, K as line, Kt as SpotifyOptions, L as PayPalProfile, Lt as DropboxOptions, M as vercel, Mt as LinearUser, N as PolarOptions, Nt as linear, O as socialProviderList, On as AppleOptions, Ot as LinkedInProfile, P as PolarProfile, Pt as KickOptions, Q as kakao, Qt as HuggingFaceOptions, R as PayPalTokenResponse, Rt as DropboxProfile, Sn as cognito, St as TiktokProfile, T as SocialProviderList, Tn as AtlassianProfile, Tt as GitlabProfile, U as LineIdTokenPayload, Ut as TwitchOptions, V as PaybinProfile, Vt as TwitterProfile, W as LineOptions, Wt as TwitchProfile, X as KakaoOptions, Xt as SlackProfile, Y as naver, Yt as SlackOptions, Z as KakaoProfile, Zt as slack, _n as DiscordOptions, _t as roblox, an as MicrosoftEntraIDProfile, at as PronounOption, bn as CognitoOptions, bt as reddit, cn as GithubOptions, ct as zoom, dn as FigmaOptions, dt as vk, en as huggingface, et as NotionProfile, fn as FigmaProfile, ft as SalesforceOptions, gn as facebook, gt as RobloxProfile, hn as FacebookProfile, ht as RobloxOptions, in as google, it as PhoneNumber, j as VercelProfile, jn as getApplePublicKey, jt as LinearProfile, k as socialProviders, kn as AppleProfile, kt as linkedin, ln as GithubProfile, lt as VkOption, mn as FacebookOptions, mt as salesforce, nn as GoogleProfile, nt as AccountStatus, on as MicrosoftOptions, ot as ZoomOptions, pn as figma, pt as SalesforceProfile, q as NaverOptions, qt as SpotifyProfile, rn as getGooglePublicKey, rt as LoginType, sn as microsoft, st as ZoomProfile, tn as GoogleOptions, tt as notion, un as github, ut as VkProfile, vn as DiscordProfile, vt as RedditOptions, w as SocialProvider, wn as AtlassianOptions, wt as GitlabOptions, xn as CognitoProfile, xt as TiktokOptions, yn as discord, yt as RedditProfile, z as paypal, zt as dropbox } from "../index-
|
|
1
|
+
import { $ as NotionOptions, $t as HuggingFaceProfile, A as VercelOptions, An as apple, At as LinearOptions, B as PaybinOptions, Bt as TwitterOption, Cn as getCognitoPublicKey, Ct as tiktok, D as SocialProviders, Dn as AppleNonConformUser, Dt as LinkedInOptions, E as SocialProviderListEnum, En as atlassian, Et as gitlab, F as polar, Ft as KickProfile, G as LineUserInfo, Gt as twitch, H as paybin, Ht as twitter, I as PayPalOptions, It as kick, J as NaverProfile, Jt as spotify, K as line, Kt as SpotifyOptions, L as PayPalProfile, Lt as DropboxOptions, M as vercel, Mt as LinearUser, N as PolarOptions, Nt as linear, O as socialProviderList, On as AppleOptions, Ot as LinkedInProfile, P as PolarProfile, Pt as KickOptions, Q as kakao, Qt as HuggingFaceOptions, R as PayPalTokenResponse, Rt as DropboxProfile, Sn as cognito, St as TiktokProfile, T as SocialProviderList, Tn as AtlassianProfile, Tt as GitlabProfile, U as LineIdTokenPayload, Ut as TwitchOptions, V as PaybinProfile, Vt as TwitterProfile, W as LineOptions, Wt as TwitchProfile, X as KakaoOptions, Xt as SlackProfile, Y as naver, Yt as SlackOptions, Z as KakaoProfile, Zt as slack, _n as DiscordOptions, _t as roblox, an as MicrosoftEntraIDProfile, at as PronounOption, bn as CognitoOptions, bt as reddit, cn as GithubOptions, ct as zoom, dn as FigmaOptions, dt as vk, en as huggingface, et as NotionProfile, fn as FigmaProfile, ft as SalesforceOptions, gn as facebook, gt as RobloxProfile, hn as FacebookProfile, ht as RobloxOptions, in as google, it as PhoneNumber, j as VercelProfile, jn as getApplePublicKey, jt as LinearProfile, k as socialProviders, kn as AppleProfile, kt as linkedin, ln as GithubProfile, lt as VkOption, mn as FacebookOptions, mt as salesforce, nn as GoogleProfile, nt as AccountStatus, on as MicrosoftOptions, ot as ZoomOptions, pn as figma, pt as SalesforceProfile, q as NaverOptions, qt as SpotifyProfile, rn as getGooglePublicKey, rt as LoginType, sn as microsoft, st as ZoomProfile, tn as GoogleOptions, tt as notion, un as github, ut as VkProfile, vn as DiscordProfile, vt as RedditOptions, w as SocialProvider, wn as AtlassianOptions, wt as GitlabOptions, xn as CognitoProfile, xt as TiktokOptions, yn as discord, yt as RedditProfile, z as paypal, zt as dropbox } from "../index-B5x_W0dM.mjs";
|
|
2
2
|
export { AccountStatus, AppleNonConformUser, AppleOptions, AppleProfile, AtlassianOptions, AtlassianProfile, CognitoOptions, CognitoProfile, DiscordOptions, DiscordProfile, DropboxOptions, DropboxProfile, FacebookOptions, FacebookProfile, FigmaOptions, FigmaProfile, GithubOptions, GithubProfile, GitlabOptions, GitlabProfile, GoogleOptions, GoogleProfile, HuggingFaceOptions, HuggingFaceProfile, KakaoOptions, KakaoProfile, KickOptions, KickProfile, LineIdTokenPayload, LineOptions, LineUserInfo, LinearOptions, LinearProfile, LinearUser, LinkedInOptions, LinkedInProfile, LoginType, MicrosoftEntraIDProfile, MicrosoftOptions, NaverOptions, NaverProfile, NotionOptions, NotionProfile, PayPalOptions, PayPalProfile, PayPalTokenResponse, PaybinOptions, PaybinProfile, PhoneNumber, PolarOptions, PolarProfile, PronounOption, RedditOptions, RedditProfile, RobloxOptions, RobloxProfile, SalesforceOptions, SalesforceProfile, SlackOptions, SlackProfile, SocialProvider, SocialProviderList, SocialProviderListEnum, SocialProviders, SpotifyOptions, SpotifyProfile, TiktokOptions, TiktokProfile, TwitchOptions, TwitchProfile, TwitterOption, TwitterProfile, VercelOptions, VercelProfile, VkOption, VkProfile, ZoomOptions, ZoomProfile, apple, atlassian, cognito, discord, dropbox, facebook, figma, getApplePublicKey, getCognitoPublicKey, getGooglePublicKey, github, gitlab, google, huggingface, kakao, kick, line, linear, linkedin, microsoft, naver, notion, paybin, paypal, polar, reddit, roblox, salesforce, slack, socialProviderList, socialProviders, spotify, tiktok, twitch, twitter, vercel, vk, zoom };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/core",
|
|
3
|
-
"version": "1.5.0-beta.
|
|
3
|
+
"version": "1.5.0-beta.4",
|
|
4
4
|
"description": "The most comprehensive authentication framework for TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -139,6 +139,6 @@
|
|
|
139
139
|
"lint:types": "attw --profile esm-only --pack .",
|
|
140
140
|
"typecheck": "tsc --project tsconfig.json",
|
|
141
141
|
"test": "vitest",
|
|
142
|
-
"coverage": "vitest run --coverage"
|
|
142
|
+
"coverage": "vitest run --coverage --coverage.provider=istanbul"
|
|
143
143
|
}
|
|
144
144
|
}
|
|
@@ -151,17 +151,32 @@ export type BetterAuthAdvancedOptions = {
|
|
|
151
151
|
*/
|
|
152
152
|
useSecureCookies?: boolean | undefined;
|
|
153
153
|
/**
|
|
154
|
-
* Disable
|
|
154
|
+
* Disable all CSRF protection.
|
|
155
|
+
*
|
|
156
|
+
* When enabled, this disables:
|
|
157
|
+
* - Origin header validation when cookies are present
|
|
158
|
+
* - Fetch Metadata checks (Sec-Fetch-Site, Sec-Fetch-Mode, Sec-Fetch-Dest)
|
|
159
|
+
* - Cross-site navigation blocking for first-login scenarios
|
|
155
160
|
*
|
|
156
161
|
* ⚠︎ This is a security risk and it may expose your application to
|
|
157
162
|
* CSRF attacks
|
|
163
|
+
*
|
|
164
|
+
* @default false
|
|
158
165
|
*/
|
|
159
166
|
disableCSRFCheck?: boolean | undefined;
|
|
160
167
|
/**
|
|
161
|
-
* Disable
|
|
168
|
+
* Disable URL validation against trustedOrigins.
|
|
162
169
|
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
170
|
+
* When enabled, this disables validation of:
|
|
171
|
+
* - callbackURL
|
|
172
|
+
* - redirectTo
|
|
173
|
+
* - errorCallbackURL
|
|
174
|
+
* - newUserCallbackURL
|
|
175
|
+
*
|
|
176
|
+
* ⚠︎ This may allow open redirects and could lead to security
|
|
177
|
+
* vulnerabilities.
|
|
178
|
+
*
|
|
179
|
+
* @default false
|
|
165
180
|
*/
|
|
166
181
|
disableOriginCheck?: boolean | undefined;
|
|
167
182
|
/**
|