Commit Graph
206 Commits
Author SHA1 Message Date
Alex YangandGitHub f8b052d2e1 chore(core): fix error.cause in BetterAuthError (#7347) 2026-01-13 17:24:10 -08:00
Alex YangandGitHub ad4ca36320 chore: improve rate limiting type definitions (#7313) 2026-01-13 11:23:56 -08:00
Alex YangGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
e496c39644 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-13 10:01:05 -08:00
Alex Yang 74357c5392 chore: release v1.5.0-beta.6 2026-01-12 15:21:20 -08:00
Alex Yang 38ab025013 fix(core): remove dual module warning (#7308) 2026-01-12 15:20:05 -08:00
Alex Yang 244e4142f7 chore: release v1.5.0-beta.5 2026-01-12 12:11:24 -08:00
Alex YangandGitHub 7ab73b1c08 refactor(core): split utils into small files (#7288) 2026-01-12 10:57:51 -08:00
69c9c790db feat(oauth): add custom authorizationEndpoint option (#6962)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-12 09:08:10 -08:00
Alex Yang 23ac747b72 chore: release v1.5.0-beta.4 2026-01-12 02:47:34 -08:00
Wonsuk ChoiandGitHub b35a860af8 chore: add --coverage.provider=istanbul to coverage script (#7262) 2026-01-11 10:55:54 -08:00
5989c12611 fix(core): separate CSRF and origin checks (#7204)
Co-authored-by: Alex Yang <himself65@outlook.com>
2026-01-10 16:27:54 -08:00
Alex Yang ec50ee27b4 chore: release v1.5.0-beta.3 2026-01-10 02:10:36 -08:00
Alex YangandGitHub b057064e92 chore: tag onEmailVerification as deprecated (#7163) 2026-01-07 18:16:17 +08:00
Alex YangandGitHub 06f2bc078c chore(core): add deprecate API (#7162) 2026-01-07 16:27:34 +08:00
43a974cb9e chore(core): add hasPlugin API in AuthContext (#7157)
Co-authored-by: Alex Yang <himself65@outlook.com>
2026-01-07 15:32:52 +08:00
Alex YangandGitHub 91331a9607 chore(core): add BetterAuthPluginRegistry for type system (#7146) 2026-01-07 14:51:28 +08:00
Alex YangandGitHub 748c82fd4c chore(core): add getPlugin API in AuthContext (#7145) 2026-01-06 16:57:24 +08:00
Alex YangandGitHub 7c98ff5c8d fix(core): detect dual module error (#7097) 2026-01-03 17:14:33 +08:00
63633d57df fix: filter null values from dynamic trusted origins (#7080)
Co-authored-by: Alex Yang <himself65@outlook.com>
2026-01-02 16:20:05 +08:00
Alex Yang 59fac14aed chore: release v1.5.0-beta.2 2025-12-31 21:06:57 +08:00
e8aa51c052 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-25 11:05:23 -08:00
d5a88df986 fix(anonymous): missing path breaks anonymous hooks (#6794)
Co-authored-by: Alex Yang <himself65@outlook.com>
2025-12-24 22:17:36 +08:00
Alex YangandGitHub ebb889ff84 chore: move @better-auth/utils to catalog (#6981) 2025-12-24 21:38:06 +08:00
Alex Yang 41cb291b8c chore: release v1.5.0-beta.1 2025-12-23 23:56:13 +08:00
Alex YangandGitHub 7d8786cd87 feat: add code property for api error instance (#6633) 2025-12-23 23:55:50 +08: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 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
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
d544ba97f9 feat: add a global backgroundTasks config option to defer actions like sending email and updates to run after response is sent (#6713)
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
Co-authored-by: Bereket Engida <Bekacru@gmail.com>
2025-12-20 11:43:03 -08:00
Bereket Engida 9af0a8b68b chore: support calling trusted origins callback during initalization 2025-12-19 15:03:00 -08:00
Bereket Engida 803459d9bb chore: release v1.4.8-beta.4 2025-12-19 14:52:04 -08:00
Bereket Engida 39718e6c1d chore: release v1.4.8-beta.3 2025-12-19 09:09:24 -08:00
Alex Yang 307acc9155 chore: release v1.4.8-beta.2 2025-12-19 16:53:21 +08:00
Alex Yang a345badd73 chore: release v1.4.8-beta.1 2025-12-19 01:16:42 +08:00
Alex YangandGitHub c091391d0b chore(db): remove deprecated types (#6793) 2025-12-17 16:18:54 +08:00
Muzzaiyyan HussainandGitHub 6444fd0fc5 chore: replace unsafe any in adapter factory types (#6819) 2025-12-17 16:11:53 +08:00
Alex YangandGitHub 63b961a5a9 chore: use Awaitable type (#6790) 2025-12-16 16:46:28 +08:00
noctarius aka Christoph EngelbertandGitHub eab5b4a04f feat: add additionalFields option in verification table schema (#6747) 2025-12-15 16:41:10 +09:00
Bereket Engida fd3460fadb chore: release v1.4.7 2025-12-13 22:47:53 -08:00
Bereket EngidaandGitHub 4cdf869c67 feat(phone-number): add password length validation for reset functionality (#6674) 2025-12-13 15:51:03 -08:00
Bereket EngidaandGitHub 12a9797ef3 fix(line): enforce nonce (#6631) 2025-12-13 15:41:12 -08:00
Bereket Engida 09d3222a2b chore: release v1.4.7-beta.4 2025-12-12 08:40:12 -08:00
Bereket Engida 3545c6a4ab chore: release v1.4.7-beta.3 2025-12-11 16:14:56 -08:00
Bereket Engida 4a3b391249 Revert "chore: independent pkg bumping (#6628)"
This reverts commit ce17ac2616.
2025-12-11 16:14:42 -08:00
744f30d665 chore: add support for scoped endpoints (#6275)
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-12-11 12:22:12 -08:00
Dylan VanmaliandGitHub ce17ac2616 chore: independent pkg bumping (#6628) 2025-12-10 16:23:17 -08:00
Bereket Engida b1a23dc0fc chore: release v1.4.7-beta.2 2025-12-10 11:42:15 -08:00
Bereket Engida dbb8f5e959 chore: release v1.4.7-beta.1 2025-12-10 07:27:22 -08:00