Commit Graph
357 Commits
Author SHA1 Message Date
Gustavo Valverde a99a331376 chore: pin kysely and zod, regenerate lockfiles for merged deps (#9533)
Reconcile pnpm-lock.yaml (root) and demo/nextjs/pnpm-lock.yaml with the merged
package.json and pnpm-workspace.yaml overrides: next's workspace versions plus
main's security bumps (samlify 2.13.1, fast-xml-parser 5.8.0) and the #9820
transitive-version overrides. demo/nextjs is a standalone pnpm project whose
lockfile was resolved to next's during the merge while its workspace took
main's overrides, so it is regenerated to match.

Two root overrides pin dependencies to next's working versions:
- kysely 0.28.17 (main's resolved version). The catalog range permits 0.29,
  but kysely 0.29's ESM build dropped the migration-table exports the
  kysely-adapter node:sqlite introspector imports, breaking table discovery.
- zod 4.x to 4.3.6. better-call's zod peer otherwise resolves to 4.4.3, which
  produces a third zod copy that makes the docs app resolve zod to the 3.x
  line and fails react-hook-form's zodResolver type check.

main reaches these versions through its release-age policy; next pins them
explicitly because that policy does not resolve in every environment. Remove
the pins once the kysely 0.29 and zod 4.4 upgrades land with their fixes.

Verified: frozen install (root and all demos) under the strict policy, docs
tsc, build, and the OAuth/SSO/oauth-provider regression suites.
2026-05-31 01:36:10 +01:00
Gustavo Valverde ef4fb0ff95 chore: merge main into next (#9533)
Sync main (through #9821/#9820/#9822/#9768) into next. Conflicting
package.json files keep next's version and intentional divergences (for
example the cli's c12 v4) while taking main's dependency updates, including
the samlify 2.13.1 and fast-xml-parser security bumps; the lockfile is
regenerated from the reconciled set. The 13 source/doc/test conflicts take
next's refactored architecture as the baseline; main's colliding fixes are
re-applied on top in the following per-domain commits.

Clean main fixes land via this merge, including the auto-restored
account-takeover defenses #9578 and #9577.
2026-05-31 00:10:16 +01:00
Gustavo ValverdeandGitHub a1028d9f1f fix(deps): force patched transitive versions via pnpm overrides (#9820) 2026-05-30 23:40:38 +01:00
04303a92ac fix(deps): widen Kysely peer dependency range for 0.29 support (#9683)
Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
2026-05-19 17:28:38 +00:00
Gustavo ValverdeandGitHub e637c7d8ff fix(deps): resolve dependabot security alerts (#9662) 2026-05-18 01:41:47 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>TaesuTaesu
45d7cb8ad6 chore(deps): bump next from 16.2.3 to 16.2.6 (#9580)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Taesu <166604494+bytaesu@users.noreply.github.com>
Co-authored-by: Taesu <bytaesu@gmail.com>
2026-05-12 23:44:51 +00:00
TaesuandGitHub 8cd6fc5136 chore: restore pnpm v11 upgrade and bump to v11.1.1 (#9541) 2026-05-12 19:12:14 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Taesu
3bec284c4f chore(deps): bump kysely from 0.28.14 to 0.28.17 (#9567)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Taesu <bytaesu@gmail.com>
2026-05-12 06:25:23 +00:00
Taesu 2b83087180 chore: sync main to next 2026-05-10 03:45:29 +09:00
TaesuandGitHub 698678bcd0 chore: revert pnpm v11 upgrade and action-setup bump (#9529) 2026-05-09 15:54:10 +00:00
TaesuandGitHub d4d7888d62 chore: upgrade to pnpm v11 (#9416) 2026-05-01 02:22:49 +00:00
Gustavo ValverdeandGitHub a3348dab01 chore(deps): pin patched versions in demo lockfiles (#9168) 2026-04-22 16:22:24 +00:00
Gustavo Valverde eb3cd10d50 chore: resolve main-to-next sync conflicts
- keep next package versions at 1.7.0-beta.1
- keep both changelog streams by inserting the stable 1.6.5, 1.6.6, and 1.6.7 sections below the 1.7.0-beta entries
- keep the cimd and dash deps on demo/nextjs (next-only); regenerate pnpm-lock.yaml
- resolve TODO(sync-from-main-9226) in oauth-provider authorize.ts: findRegisteredRedirectUri now uses isLoopbackIP from @better-auth/core/utils/host to cover the full 127.0.0.0/8 range per RFC 8252 §7.3
- drop the unused saml import that main's #9262 added to sso/src/routes/sso.ts; next already migrated to saml-pipeline
2026-04-22 14:54:27 +01:00
TaesuandGitHub d1b27d7af6 chore(demo): update deps, imports, tsconfig to fix build (#9302) 2026-04-22 10:24:48 +00:00
Gustavo Valverde 3fbab44068 chore: sync main to next
Resolves conflicts in PR #9115 which the release bot cannot auto-merge.

Conflict resolutions:
- .github/workflows/release.yml: take main's hardened grep fallback (92256a2d0)
- docs/content/docs/plugins/sso.mdx: take main's named-exports refactor verbatim (#9144)
- packages/oauth-provider/src/token.ts: keep next's at_hash sequencing (#9079),
  add main's customTokenResponseFields spread and credential helper rename (#9118)
- packages/oauth-provider/src/token.test.ts: keep both new describe blocks
  (at_hash in id tokens from next, customTokenResponseFields from main)

Semantic fixes on auto-merged files where git silently dropped main's changes
around next's discriminated-response refactor:
- two-factor/index.ts: restore skipVerificationOnEnable handling in the totp
  enablement path
- two-factor/types.ts: restore the skipVerificationOnEnable type field
- two-factor/two-factor.test.ts: narrow the discriminated enable response via
  method === "totp" guard
2026-04-14 11:30:13 +01:00
cd8313ba00 feat(cimd): add Client ID Metadata Document plugin (#9159)
Co-authored-by: Dylan Vanmali <dylanvanmali@yahoo.com>
2026-04-13 20:52:34 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>TaesuTaesu
ed2c18df31 chore(deps): bump next from 16.2.2 to 16.2.3 in /docs (#9112)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Taesu <bytaesu@gmail.com>
Co-authored-by: Taesu <166604494+bytaesu@users.noreply.github.com>
2026-04-12 08:47:53 +00:00
TaesuGitHubleonardo2204better-release[bot] <273320539+better-release[bot]@users.noreply.github.com>
5f84335815 feat(stripe): support Stripe SDK v21 and v22 (#9084)
Co-authored-by: leonardo2204 <1509421+leonardo2204@users.noreply.github.com>
Co-authored-by: better-release[bot] <273320539+better-release[bot]@users.noreply.github.com>
2026-04-10 06:19:34 +00:00
6ce30cf138 fix: incorrect operationId in password reset callback endpoint (#9072)
Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
2026-04-09 20:13:06 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a9e4f50b14 chore(deps): bump mcp-handler from 1.0.7 to 1.1.0 in /demo/nextjs (#8907)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-02 08:07:03 +00:00
TaesuandGitHub 163d76fb4a chore(demo): remove 'type': 'module' from nextjs demo (#8776) 2026-03-25 21:06:19 +00:00
Alex YangandGitHub 92d60cd0d4 chore(deps): bump next.js from 16.1.6 to 16.2.0 (#8682) 2026-03-18 22:11:23 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c6fe68f276 chore(deps): bump hono from 4.12.3 to 4.12.7 in /demo/nextjs (#8543)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 02:13:07 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1657116612 chore(deps): bump hono from 4.12.3 to 4.12.5 in /demo/nextjs (#8393)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 20:40:50 +00:00
Alex Yang 6d61759a41 chore: fix demo/nextjs setup 2026-03-02 00:54:56 +09:00
Alex YangandGitHub 32c8a11de7 chore: separate the demo into different lock files (#8251) 2026-03-01 13:58:04 +00:00
Alex YangandGitHub 8048a1d367 chore: upgrade dependencies (#8183) 2026-02-27 08:11:46 +00:00
Bereket EngidaandGitHub 72ec62ff06 chore: integrate new dash and sentinel into authentication flow (#8053) 2026-02-18 13:02:21 -08:00
Bereket EngidaandGitHub b8ed56d135 chore: update infra version (#8052) 2026-02-18 12:27:53 -08:00
Joél SolanoandGitHub 7306c5af05 feat(electron): allow manual token exchange & add sanitizeUser option (#7976) 2026-02-16 23:10:02 -08:00
Carlos Eduardo MedimandGitHub cc65d9085e feat(providers): add Railway OAuth provider (#7730) 2026-02-16 12:49:02 -08:00
Joél SolanoandGitHub 3d17eaee3f chore(electron) add openapi metadata to routes (#7872) 2026-02-10 01:04:28 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Alex Yang
b6fbe93a95 chore(deps): bump @modelcontextprotocol/sdk from 1.25.3 to 1.26.0 (#7797)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Yang <himself65@outlook.com>
2026-02-04 22:35:49 +00:00
1c9aab3bce feat: electron integration (#7647)
Co-authored-by: Alex Yang <himself65@outlook.com>
2026-02-04 20:37:05 +00:00
Alex YangandGitHub c1f046f588 chore: bump version (#7646) 2026-01-27 23:12:31 +00:00
Alex YangandGitHub b0a6fb89c4 chore: bump version (#7626) 2026-01-27 21:05:02 +00:00
Alex YangandGitHub 80a1c7daca chore: bump deps (#7508) 2026-01-20 23:55:35 +00:00
Alex YangandGitHub f53eb498d9 chore: bump deps (#7475) 2026-01-19 23:56:56 +00:00
TaesuandGitHub ac0cb53ec0 chore(demo): correct trustedProviders option (#7449) 2026-01-18 21:54:03 +00:00
Bereket Engida ab5c2e7d64 chore(demo): hide admin dashboard for non-admin users 2026-01-17 22:18:42 -08:00
Bereket EngidaandAlex Yang 890bcce053 chore: update @better-auth/dash version to ^0.1.6 in package.json and pnpm-lock.yaml 2026-01-17 17:39:15 -08:00
Alex YangandGitHub cccfe03283 chore: add @better-auth/dash (#7433) 2026-01-17 04:23:48 +00:00
2a728dbd95 chore(scim): add SCIM demo (#6639)
Co-authored-by: Alex Yang <himself65@outlook.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-13 16:15:24 -08:00
Bereket EngidaGitHubclaude[bot] <41898282+claude[bot]@users.noreply.github.com>Bereket Engida
3b7b96ee02 demo: improve demo project ui (#7269)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Bereket Engida <Bekacru@users.noreply.github.com>
2026-01-11 14:50:10 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
272e3a3612 chore(deps): bump @modelcontextprotocol/sdk from 1.25.1 to 1.25.2 (#7175)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-10 06:49:50 -08:00
Alex YangandGitHub a17468438d docs: build regression after format (#7110) 2026-01-04 01:28:36 +08:00
Alex YangandGitHub 8b01d6abac chore: format markdown (#7103) 2026-01-03 16:55:39 +08:00
Alex YangandGitHub 5a8ff63e8d chore: bump next (#6986) 2025-12-25 00:01:06 +08:00
TaesuandGitHub 9d882ed5cf chore(demo): redirect to home when current session is removed (#6907) 2025-12-23 11:47:08 +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