Commit Graph
227 Commits
Author SHA1 Message Date
TaesuandGitHub 7d3bfc6c3f fix(core): consolidate rateLimit table schema definition (#7551) 2026-01-22 21:07:59 +00:00
Alex YangandGitHub 50de0a1d48 refactor: generic in BetterAuthPluginRegistry (#7514) 2026-01-22 20:33:12 +00:00
Alex YangandGitHub 0e85da5642 chore(core): improve runInBackground API type (#7533) 2026-01-22 20:19:46 +00:00
Alex Yang 6295dfcd34 chore: release v1.5.0-beta.9 2026-01-20 19:38:14 -08:00
Alex Yang 5de9704ec0 fix: set default ipv6 subnet to 64 (#7509) 2026-01-20 17:28:32 -08:00
Alex YangandGitHub 80a1c7daca chore: bump deps (#7508) 2026-01-20 23:55:35 +00:00
Alex YangGitHubclaude[bot] <41898282+claude[bot]@users.noreply.github.com>Alex Yang
dabed1ba06 fix: delay database hooks execution until after transaction commits (#7345)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Alex Yang <himself65@users.noreply.github.com>
2026-01-20 05:38:20 +00:00
Paola Estefanía de CamposandGitHub 78f12ba6b7 fix(sso): fix validateToken JWK handling for all key types (#7479) 2026-01-20 03:36:13 +00:00
TaesuandGitHub 7a9dca2dc0 fix: consistent token endpoint for dropbox provider (#7444) 2026-01-20 00:26:52 +00:00
Alex YangandGitHub 57af0f7b91 fix(rate-limit): support IPv6 address normalization and subnet (#7470) 2026-01-19 23:30:38 +00:00
9cc4e67453 refactor: return linked account in findOAuthUser (#7331)
Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
2026-01-19 20:24:32 +00:00
Alex Yang 9806a932c2 chore: release v1.5.0-beta.8 2026-01-16 20:27:30 -08:00
TaesuandGitHub 5a360ba69c fix: update Figma provider default scope and oauth endpoints (#7422) 2026-01-16 21:22:15 +00:00
TaesuandGitHub a618b5ca22 fix: centralize schema parsing for API responses (#7414) 2026-01-16 18:55:01 +00:00
TaesuandGitHub fd1dcf94d6 feat: add skipTrailingSlashes option to advanced config (#7404) 2026-01-16 17:09:20 +00:00
Alex Yang c7e826e20f chore: release v1.5.0-beta.7 2026-01-14 14:25:47 -08:00
TaesuGitHubAlex Yangclaude[bot] <41898282+claude[bot]@users.noreply.github.com>
a1e14adb61 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 14:20:12 -08:00
Alex YangandGitHub 531b9d56a5 chore: add lint rule useConst (#7369) 2026-01-14 14:18:18 -08:00
Alex YangandGitHub d90218f901 feat(core): add version in AuthContext (#7362) 2026-01-14 11:05:05 -08:00
TaesuandGitHub f875a491e6 fix: correctly handle OAuth callback and Apple email field (#7181) 2026-01-15 01:09:54 +09:00
Paola Estefanía de CamposGitHubclaude[bot] <41898282+claude[bot]@users.noreply.github.com>Alex Yang
34c8a4bd2a fix(saml): IdP-Initiated Callback Routing (#6675)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Alex Yang <himself65@users.noreply.github.com>
2026-01-13 17:54:37 -08:00
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