Commit Graph
258 Commits
Author SHA1 Message Date
TaesuandAlex Yang ea589eef0a fix(core): consolidate rateLimit table schema definition (#7551) 2026-01-28 17:06:03 -08:00
Alex Yang 3100826d9b chore(core): improve runInBackground API type (#7533) 2026-01-28 17:06:03 -08:00
TaesuandAlex Yang c918ee6582 fix: correctly handle OAuth callback and Apple email field (#7181) 2026-01-28 17:06:03 -08:00
Alex Yang bcbeeee23c chore: release v1.4.17 2026-01-20 19:29:15 -08:00
Alex Yang 6ef600deae fix: set default ipv6 subnet to 64 (#7509) 2026-01-20 17:45:20 -08:00
Alex YangandGitHub f4440274e0 chore: bump zod (#7507) 2026-01-20 15:33:00 -08:00
Alex Yang 4625dcf784 chore: release v1.4.16 2026-01-19 22:41:09 -08:00
Alex Yang 1ba5a3fd5a fix(rate-limit): support IPv6 address normalization and subnet (#7470) 2026-01-19 22:40:42 -08:00
eb297c2b7f refactor: return linked account in findOAuthUser (#7331)
Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
2026-01-19 22:40:42 -08:00
Alex Yang bcb4d24cbc chore: release v1.4.15 2026-01-17 17:39:08 -08:00
Alex Yang 1d649c09a4 chore: release v1.4.14 2026-01-16 20:23:14 -08:00
TaesuandAlex Yang 1233031cfe fix: update Figma provider default scope and oauth endpoints (#7422) 2026-01-16 19:43:53 -08:00
TaesuandAlex Yang a9e4448429 fix: centralize schema parsing for API responses (#7414) 2026-01-16 19:43:53 -08:00
TaesuandAlex Yang 88e9224a4a feat: add skipTrailingSlashes option to advanced config (#7404) 2026-01-16 19:43:53 -08:00
Alex Yang e14c211afd chore: release v1.4.13 2026-01-14 19:20:36 -08:00
TaesuAlex Yangclaude[bot] <41898282+claude[bot]@users.noreply.github.com>
f812e875c1 fix: preserve attributes when expiring cookies (#7363)
Co-authored-by: Alex Yang <himself65@outlook.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
2026-01-14 19:20:18 -08:00
Alex Yang 39fcf97315 feat(core): add version in AuthContext (#7362) 2026-01-14 19:20:18 -08:00
Alex Yang 9a7085c8e0 chore: add lint rule useConst (#7369) 2026-01-14 19:20:18 -08:00
Alex Yang 1c765ef310 chore(core): fix error.cause in BetterAuthError (#7347) 2026-01-14 19:20:18 -08:00
Alex Yangandcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> d702b88d53 chore(core): use global for multiple instances of BetterAuth (#7334)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-01-14 19:20:18 -08:00
Alex Yang cb40989769 chore: release v1.4.12 2026-01-12 16:01:04 -08:00
Alex Yang 37b0bf00f4 chore: release v1.4.12-beta.2 2026-01-12 16:00:48 -08:00
19db775b4e feat(oauth): add custom authorizationEndpoint option (#6962)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-12 16:00:48 -08:00
Alex Yang 1e5947f28f chore: release v1.4.12-beta.1 2026-01-12 16:00:48 -08:00
Alex Yang 7ece139ce1 fix(core): remove dual module warning (#7308) 2026-01-12 16:00:48 -08:00
Alex Yang 3b8db3418b chore: release v1.4.11 2026-01-12 02:50:38 -08:00
Wonsuk ChoiandAlex Yang 1359f1c6c7 chore: add --coverage.provider=istanbul to coverage script (#7262) 2026-01-12 02:50:02 -08:00
Paola Estefanía de CamposandAlex Yang 35caa43242 fix(core): separate CSRF and origin checks (#7204)
Co-authored-by: Alex Yang <himself65@outlook.com>
2026-01-12 02:50:02 -08:00
Alex Yang 037b81b2a2 chore: release v1.4.11-beta.2 2026-01-12 02:50:02 -08:00
Alex Yang d4dcea0fb2 chore: release v1.4.11-beta.1 2026-01-12 02:50:02 -08:00
Alex Yang bb1c36bfc9 chore: tag onEmailVerification as deprecated (#7163) 2026-01-12 02:50:02 -08:00
Alex Yang fe2fc7bb95 chore(core): add deprecate API (#7162) 2026-01-12 02:50:02 -08:00
Alex Yang f8318f6b6c chore(core): add getPlugin API in AuthContext (#7145) 2026-01-12 02:50:02 -08:00
Alex Yang 1baaa9c814 fix(core): detect dual module error (#7097) 2026-01-12 02:50:02 -08:00
TaesuandAlex Yang 0e7a55b26f fix: filter null values from dynamic trusted origins (#7080)
Co-authored-by: Alex Yang <himself65@outlook.com>
2026-01-12 02:50:02 -08:00
Alex Yang 4bf85c648f chore: release v1.4.10 2025-12-31 21:37:16 +08:00
3f06dd2ddd feat: support form data for email sign-in/sign-up and fallback to checking fetch Metadata for first login (#6314)
Co-authored-by: Taesu <166604494+bytaesu@users.noreply.github.com>
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
Co-authored-by: Jonathan Samines <jn.samines@gmail.com>
2025-12-31 21:36:19 +08:00
MaxwellandAlex Yang 8e85b0d15c fix(anonymous): missing path breaks anonymous hooks (#6794)
Co-authored-by: Alex Yang <himself65@outlook.com>
2025-12-31 21:36:19 +08:00
Alex Yang 3e13c535a6 chore: move @better-auth/utils to catalog (#6981) 2025-12-31 21:36:19 +08:00
Alex Yang 35fcd1aa89 chore: release v1.4.9 2025-12-23 23:46:35 +08:00
Alex Yang b96c38bddc Merge branch 'canary'
# Conflicts:
#	docs/content/docs/plugins/sso.mdx
#	packages/better-auth/package.json
#	packages/better-auth/src/api/index.ts
#	packages/better-auth/src/api/to-auth-endpoints.test.ts
#	packages/better-auth/src/auth/base.ts
#	packages/better-auth/src/context/create-context.ts
#	packages/better-auth/src/plugins/jwt/index.ts
#	packages/better-auth/src/plugins/multi-session/index.ts
#	packages/better-auth/src/plugins/oauth-proxy/index.ts
#	packages/better-auth/src/plugins/two-factor/index.ts
#	packages/cli/package.json
#	packages/core/package.json
#	packages/core/src/types/init-options.ts
#	packages/expo/package.json
#	packages/oauth-provider/package.json
#	packages/passkey/package.json
#	packages/scim/package.json
#	packages/sso/package.json
#	packages/sso/src/index.ts
#	packages/sso/src/linking/org-assignment.ts
#	packages/stripe/package.json
#	packages/telemetry/package.json
2025-12-23 23:41:56 +08:00
Alex Yang 148b32e0cb chore: release v1.4.8 2025-12-23 14:25:03 +08:00
Nhan Nguyenandgithub-actions[bot] b3d9961447 fix(cognito): use %20 encoding for scopes instead of + (#6929) 2025-12-23 06:00:21 +00:00
Nhan NguyenandGitHub 840d0e4b0c fix(cognito): use %20 encoding for scopes instead of + (#6929) 2025-12-23 14:00:15 +08:00
Bereket Engida 9d784407ca chore: release v1.4.8-beta.7 2025-12-22 11:40:01 -08:00
Dylan Vanmaliandgithub-actions[bot] f1b90e4085 feat(oauth-provider): an oauth 2.1 compliant plugin (#4163)
An upgrade to oidc-provider plugin that makes it oauth2.1 compliant and has a configuration that is secure by default.

Plans for the deprecation of oidc-provider plugin due to many inherent flaws in its design. Internally, plugin functions now share logic, providing for better future extensibility if new code_grants need to be written or user/client jwt or opaque tokens need to be written. Furthermore, as an oAuth 2.1 provider, it provides logic valid for an MCP server. When using the scope "openid" (optional, enabled by default), the server acts like an OpenId server able to issue id tokens and provides a /userinfo endpoint.

Features

OAuth 2.1 by default
Properly supports authorization_code, refresh_token, and client_credentials grants
PKCE by default (removes plain completely)
Public and confidential client registration
JWT plugin is required by default, but can be disabled using disableJWTPlugin flag
Access tokens can now be received in JWT verifiable format using the resource parameter (ie JWT aud field)
Id tokens are still verifiable by JWKS when using JWT Plugin, or clientSecret if disabled. Fixes issue to prevent public clients when disableJWTPlugin: true from obtaining id tokens directly even when they shouldn't be allowed an id token and should use /userinfo instead.
Protects /userinfo with scope check
Separates Refresh Token and Access token on database schema to allow multiple access tokens per refresh and multiple refresh tokens per login session.
oauthAccessToken strictly deals with opaque tokens
Opaque tokens are given only when resource parameter (aka audience) is not provided
Option to Encode and Decode refresh tokens
allowDynamicClientRegistration with allowUnauthenticatedClientRegistration flags
Separation of default expiration times
Proper creation of public and confidential clients
Prevents misconfiguration between .well-known/openid-configuration endpoint and plugin settings
scopeExpirations to assign scopes specific expiration
Custom claims through separated functions: customAccessTokenClaims, customIdTokenClaims, and customUserInfoClaims
Organizational support through activeOrganizationalId on a session such as through the organizational plugin. Attaches to oAuthClient via reference_id.
Rp-initiated logout
Account Selection via prompt=select_account.
Account Creation via prompt=create.
Prompt combinations prompt=select_account+consent and prompt=login+consent

Docs available at https://www.better-auth.com/docs/plugins/oauth-provider (pr: https://github.com/better-auth/better-auth/blob/main/docs/content/docs/plugins/oauth-provider.mdx)
2025-12-22 19:16:54 +00:00
Dylan VanmaliandGitHub 686fba4e11 feat(oauth-provider): an oauth 2.1 compliant plugin (#4163)
An upgrade to oidc-provider plugin that makes it oauth2.1 compliant and has a configuration that is secure by default.

Plans for the deprecation of oidc-provider plugin due to many inherent flaws in its design. Internally, plugin functions now share logic, providing for better future extensibility if new code_grants need to be written or user/client jwt or opaque tokens need to be written. Furthermore, as an oAuth 2.1 provider, it provides logic valid for an MCP server. When using the scope "openid" (optional, enabled by default), the server acts like an OpenId server able to issue id tokens and provides a /userinfo endpoint.

Features

OAuth 2.1 by default
Properly supports authorization_code, refresh_token, and client_credentials grants
PKCE by default (removes plain completely)
Public and confidential client registration
JWT plugin is required by default, but can be disabled using disableJWTPlugin flag
Access tokens can now be received in JWT verifiable format using the resource parameter (ie JWT aud field)
Id tokens are still verifiable by JWKS when using JWT Plugin, or clientSecret if disabled. Fixes issue to prevent public clients when disableJWTPlugin: true from obtaining id tokens directly even when they shouldn't be allowed an id token and should use /userinfo instead.
Protects /userinfo with scope check
Separates Refresh Token and Access token on database schema to allow multiple access tokens per refresh and multiple refresh tokens per login session.
oauthAccessToken strictly deals with opaque tokens
Opaque tokens are given only when resource parameter (aka audience) is not provided
Option to Encode and Decode refresh tokens
allowDynamicClientRegistration with allowUnauthenticatedClientRegistration flags
Separation of default expiration times
Proper creation of public and confidential clients
Prevents misconfiguration between .well-known/openid-configuration endpoint and plugin settings
scopeExpirations to assign scopes specific expiration
Custom claims through separated functions: customAccessTokenClaims, customIdTokenClaims, and customUserInfoClaims
Organizational support through activeOrganizationalId on a session such as through the organizational plugin. Attaches to oAuthClient via reference_id.
Rp-initiated logout
Account Selection via prompt=select_account.
Account Creation via prompt=create.
Prompt combinations prompt=select_account+consent and prompt=login+consent

Docs available at https://www.better-auth.com/docs/plugins/oauth-provider (pr: https://github.com/better-auth/better-auth/blob/main/docs/content/docs/plugins/oauth-provider.mdx)
2025-12-22 11:16:42 -08:00
6d4aab5190 fix(adapter): apply customTransformInput to where clause values (#6914)
Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
2025-12-22 17:11:49 +00:00
525f0982ec fix(adapter): apply customTransformInput to where clause values (#6914)
Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
2025-12-22 09:11:19 -08:00
Alex Yang ed258bc5d6 chore: release v1.4.8-beta.6 2025-12-22 13:40:14 +08:00