Commit Graph

6627 Commits

Author SHA1 Message Date
Alex Yang
702f624994 chore(sso): allow Buffer (#6979) 2025-12-24 21:20:08 +08:00
Paola Estefanía de Campos
7c593ad4d9 feat(saml): add XML parser hardening with configurable size limits (#6805) 2025-12-24 20:27:36 +08:00
Alex Yang
c8fd32a8a9 ci: remove auto cherry pick (#6976) 2025-12-24 20:05:32 +08:00
Taesu
4b0fa1b16c chore: clean up lint warning (#6960) 2025-12-23 22:47:11 -08:00
Taesu
d16c17adb6 fix(stripe): add 'subscription/restore' to pathMethods (#6959) 2025-12-24 13:32:12 +08:00
Dylan Vanmali
0492750c7e docs: improve oauth provider setup instructions (#6968) 2025-12-23 19:27:22 -08:00
Dylan Vanmali
b361a27beb docs: OAuth Migration improvements (#6964) 2025-12-23 13:40:10 -08:00
Kasper
d8c47707cf chore: BETTER_AUTH_SECRET length check shouldn't throw error (#6954) 2025-12-23 09:00:04 -08:00
Alex Yang
41cb291b8c chore: release v1.5.0-beta.1 v1.5.0-beta.1 2025-12-23 23:56:13 +08:00
Alex Yang
7d8786cd87 feat: add code property for api error instance (#6633) 2025-12-23 23:55:50 +08:00
Alex Yang
380d4c7cae Revert "docs: add Commet plugin documentation (#6827)"
This reverts commit 0ca1431fc6.
2025-12-23 23:42:46 +08:00
Alexander Asomba
75d13a0414 docs: add Paystack plugin to community plugins list (#6782) 2025-12-23 23:38:29 +08:00
Alex Yang
36fda45eac test: coverage with asResponse (#6873)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-23 19:05:18 +08:00
Alex Yang
38b24f6ad3 docs: update plugin schema definition (#6951)
Co-authored-by: Mikiyas Tibebu <mikitebe123@gmail.com>
2025-12-23 19:00:03 +08:00
Salih Candir
66a6c804f1 docs: update file naming example in Next.js integration guide (#6948) 2025-12-23 18:44:19 +08:00
Alex Yang
5471295282 fix(cli): cmd info --json unexpected exit with 1 (#6949) 2025-12-23 18:39:55 +08:00
Paola Estefanía de Campos
1f171cb3fd feat(saml): reject deprecated SAML signature and digest algorithms (#6784) 2025-12-23 17:39:24 +08:00
Decker
0ca1431fc6 docs: add Commet plugin documentation (#6827)
Co-authored-by: Alex Yang <himself65@outlook.com>
2025-12-23 17:39:03 +08:00
Taesu
25445eb022 test(stripe): refactor to use test instance helper (#6683) 2025-12-23 16:50:58 +08:00
Taesu
ae90b482d0 fix: correct wildcard pattern matching for trustedOrigins (#6904) 2025-12-23 14:08:58 +08:00
Paolo Ricciuti
cd77223b3b fix: don't set state query param if state is not provided (#6822) 2025-12-23 14:00:54 +08:00
Kasper
da820851a7 fix: use operator in list members where clause (#6850) 2025-12-23 14:00:41 +08:00
Nhan Nguyen
840d0e4b0c fix(cognito): use %20 encoding for scopes instead of + (#6929) 2025-12-23 14:00:15 +08:00
Alex Yang
9321632f3d fix(client): set session data on refreshManager (#6932)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-23 14:00:07 +08:00
Alex Yang
dc37a0fe64 chore(sso): remove Buffer usage (#6942) 2025-12-23 13:59:50 +08:00
Dhruv Jain
a0580b78fe docs: fix mongodb page join link (#6941) 2025-12-22 20:52:45 -08:00
d0
bf71de5f0b docs: add stargate to community plugins list (#6846) 2025-12-23 12:41:31 +08:00
Taesu
9d882ed5cf chore(demo): redirect to home when current session is removed (#6907) 2025-12-23 11:47:08 +08:00
Paola Estefanía de Campos
0e32d9c578 chore(sso): clean up SAML test suite (#6839) 2025-12-23 11:11:10 +08:00
Taesu
2bf224cad8 docs: correct OAuth Provider sidebar icon color (#6935) 2025-12-23 11:08:36 +08:00
Taesu
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 Vanmali
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
Shawn Erquhart
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 Engida
52769504e1 chore: improve jsdoc comment for betterAuth instance (#6910) 2025-12-22 18:16:44 +08:00
renovate[bot]
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
Taesu
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
Shoubhit Dash
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
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 Yang
cbd215f6ac fix: export necessary adapter types (#6903) 2025-12-20 16:33:13 +08:00
Alex Yang
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
Factiven
fbafa0b9b3 fix(generic-oauth): ensure encryptOAuthTokens is respected in account linking flow (#6874) 2025-12-20 16:16:50 +08:00
Alex Yang
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 Yang
5b2821e9fc chore: remove unused server-only package (#6899) 2025-12-20 15:29:36 +08:00
Alex Yang
e1dfdc3c27 chore(docs): bump tailwindcss (#6896) 2025-12-20 15:18:09 +08:00
Taesu
b1ca46f560 chore(demo): improve nextjs demo (#6727) 2025-12-19 23:02:12 -08:00
Maxwell
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