Commit Graph
6898 Commits
Author SHA1 Message Date
TaesuandGitHub 2bf224cad8 docs: correct OAuth Provider sidebar icon color (#6935) 2025-12-23 11:08:36 +08:00
TaesuandGitHub ec38c22938 fix(expo): add missing matcher paths (#6939) 2025-12-23 11:06:53 +08:00
Bereket Engida 9d784407ca chore: release v1.4.8-beta.7 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
Bereket EngidaandGitHub 52769504e1 chore: improve jsdoc comment for betterAuth instance (#6910) 2025-12-22 18:16:44 +08:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
356d9b5492 chore(deps): update dependency deno to v2.6.3 (#6926)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-22 18:16:08 +08:00
Alex Yang ed258bc5d6 chore: release v1.4.8-beta.6 v1.4.8-beta.6 2025-12-22 13:40:14 +08:00
TaesuandGitHub 1c9a0f4af6 fix(stripe): update subscriptionId to use Stripe id (#6920) 2025-12-21 18:22:33 +08:00
Bereket Engida 1f8d54488e chore: release v1.4.8-beta.5 v1.4.8-beta.5 2025-12-20 13:28:09 -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
30dc04b12f docs(organization): update default organization limit to 'unlimited' (#6808)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-20 07:38:11 -08:00
Alex YangandGitHub cbd215f6ac fix: export necessary adapter types (#6903) 2025-12-20 16:33:13 +08:00
6743a7a84b docs: clarify username sign-in functionality in documentation (#6901)
Co-authored-by: Jilles Soeters <jilleswf@gmail.com>
2025-12-20 16:17:04 +08:00
FactivenandGitHub fbafa0b9b3 fix(generic-oauth): ensure encryptOAuthTokens is respected in account linking flow (#6874) 2025-12-20 16:16:50 +08:00
03ffcc9a7a chore(demo): add loading component for reset-password (#6900)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-20 16:03:35 +08:00
Alex YangandGitHub 5b2821e9fc chore: remove unused server-only package (#6899) 2025-12-20 15:29:36 +08:00
Alex YangandGitHub e1dfdc3c27 chore(docs): bump tailwindcss (#6896) 2025-12-20 15:18:09 +08:00
TaesuandGitHub b1ca46f560 chore(demo): improve nextjs demo (#6727) 2025-12-19 23:02:12 -08:00
MaxwellGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
3d8eeb9f38 fix: update-user breaking during stateless auth (#6894)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-12-19 22:45:34 -08:00
Alex Yang 52640907e7 chore: update cspell 2025-12-20 13:20:04 +08:00
vijit-larkandGitHub cfb56fdab4 docs: add community plugin Lark billing (#6813) 2025-12-19 18:06:23 -08:00
Paola Estefanía de CamposandGitHub 2f39d862f5 chore: add explicit type for trustedOrigins callback parameter (#6892) 2025-12-19 17:56:46 -08:00
Paola Estefanía de CamposandGitHub 790764c1e1 deps(core): bump better-call to 1.1.7 (#6891) 2025-12-19 17:05:51 -08:00
Mauricio GalvezandGitHub becb4e96ee docs: fix typo in Organization plugin docs (#6885) 2025-12-19 16:41:04 -08:00
Paola Estefanía de CamposandGitHub 65193cb56d doc(auth): clarify trustedOrigins callback request parameter (#6890) 2025-12-19 16:40:37 -08:00
Paola Estefanía de CamposandGitHub 0d0a4edafd test(auth): handle undefined request in trustedOrigins test (#6888) 2025-12-19 15:26:14 -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 v1.4.8-beta.4 2025-12-19 14:52:04 -08:00
Bereket EngidaandGitHub 9469701b5f fix: trusted origins resolving (#6887) 2025-12-19 14:51:16 -08:00
Bereket Engida ac6f495ac7 chore: only show base url warning once 2025-12-19 14:13:52 -08:00
Paola Estefanía de CamposandGitHub fc78c7c041 fix(sso): enforce domain verification in assignOrganizationByDomain (#6868) 2025-12-19 09:40:26 -08:00
Bereket Engida 39718e6c1d chore: release v1.4.8-beta.3 v1.4.8-beta.3 2025-12-19 09:09:24 -08:00
Paola Estefanía de CamposandGitHub 19d2b3a990 fix(auth): respect trustedOrigins when baseURL is inferred (#6882) 2025-12-19 09:08:37 -08:00
TaesuandGitHub e9cd882f1f docs: use dotenv instead of env (#6883) 2025-12-19 09:03:46 -08:00
Bereket EngidaandGitHub b9c346e944 chore: dispaly warning when baseURL isn't available (#6787) 2025-12-19 08:28:23 -08:00
Alex Yang 373a1c658a docs: fix twitter id 2025-12-19 22:25:00 +08:00
4981827262 docs: add baseURL configuration warning to Google provider (#6878)
Co-authored-by: Gautam Manchandani <gautammanch@Gautams-MacBook-Air.local>
2025-12-19 20:00:13 +08:00
Alex Yang 307acc9155 chore: release v1.4.8-beta.2 v1.4.8-beta.2 2025-12-19 16:53:21 +08:00
Joél SolanoandGitHub 48464f13cb chore: fix peer dependencies in package.json (#6855) 2025-12-19 16:53:06 +08:00
TaesuandGitHub 8a67c2be76 chore: remove unnecessary custom word (#6825) 2025-12-18 21:57:23 -08:00
TaesuandGitHub 8c1f757303 fix(passkey): use deleteVerificationByIdentifier instead of deleteVerificationValue (#6821) 2025-12-18 21:56:42 -08:00
Soham DattaandGitHub 519bdb1014 docs(convex): fix import statement for authConfig (#6861) 2025-12-19 13:27:53 +08:00
TaesuandGitHub 9ffaa0f628 docs: fix AI chat code formatting issue (#6869) 2025-12-19 13:26:44 +08:00
Joél SolanoandGitHub c8039f075f chore: pass options to plugin configurations (#6858) 2025-12-19 12:16:05 +08:00
Alex Yang a345badd73 chore: release v1.4.8-beta.1 v1.4.8-beta.1 2025-12-19 01:16:42 +08:00
4b0924b218 fix(organization): allow internal organization creation when disabled for client (#6857)
Co-authored-by: Gautam Manchandani <gautammanch@Gautams-MacBook-Air.local>
2025-12-18 21:00:56 +08:00
TaesuandGitHub d3ebfacd91 fix: respect IP headers in dev/test environments (#6854) 2025-12-18 20:25:10 +08:00
Bennett DamsandGitHub 3897be5603 docs: change role type from string to enum values (#6844) 2025-12-18 14:23:57 +08:00
Joél SolanoandGitHub ce4e2e2e89 chore(api-key): pass options to plugin config (#6843) 2025-12-18 13:46:47 +08:00