Commit Graph
2588 Commits
Author SHA1 Message Date
Gustavo Valverde 74cdffddde refactor(oauth-provider)!: replace client type with application_type
Client registration carried two overlapping profile fields. `type`
(web/native/user-agent-based) was a better-auth invention with no RFC 7591
standing, validated only for self-consistency against the auth method;
`application_type` is the OIDC Registration field, and the one MCP clients
are told to send.

Registration accepted both without cross-checking, so a client could declare
`type: "web"` alongside `application_type: "native"` and be stored claiming
two profiles. Collapsing to `application_type` removes the ambiguity and
gives the field a real column rather than the untyped metadata bag.

`user-agent-based` has no successor: a browser app registers with
`token_endpoint_auth_method: "none"`, which already marks it public. PKCE
enforcement reads `application_type` for the native case that `type` used to
cover, so a native client stays public whatever auth method it registered
with.
2026-07-28 19:36:09 -04:00
Gustavo Valverde 8a5046b6d5 feat(oauth-provider): apply application_type to metadata document clients
Client ID Metadata Documents are the registration mechanism the MCP
2026-07-28 spec recommends, and dynamic client registration the one it
deprecates, but the `application_type` redirect URI constraint reached only
the deprecated path: the field was dropped by the metadata document
allowlist before validation ran.

`type` and `application_type` both describe the client profile, so a
registration sending both must keep them consistent. Cite RFC 8252 for the
native redirect URI rule actually enforced; OIDC Registration predates
claimed https links and does not permit them.
2026-07-28 19:16:41 -04:00
Gustavo Valverde 39d132e834 fix(oauth-provider): challenge with the scopes a token is missing
The insufficient-scope challenge keyed on the FORBIDDEN status, so any
permission denial became a scope challenge advertising the configured
scopes, which the token already held. Clients following the step-up flow
re-authorized for scopes they had and retried into the same failure.

Key the challenge on an explicit `insufficient_scope` marker carrying the
scopes the token lacks, matching how DPoP challenges are already detected.
Scope verification reports every missing scope at once rather than the first,
and handlers raise the same challenge through `insufficientScopeError` for
scopes only they know about. Everything else, including a plain FORBIDDEN,
propagates untouched.
2026-07-28 19:16:31 -04:00
Claude ea474eb6c8 docs: point MCP authorization references at the 2026-07-28 spec revision
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QbU1ZgRHK5A1btqpdR5gbD
2026-07-28 19:31:36 +00:00
Claude 8e8a74f73f feat(oauth-provider): accept application_type in dynamic client registration
OIDC Registration §2 / MCP 2026-07-28 (SEP-837): when a registration
declares application_type, redirect URIs are constrained to what the
declared type allows — native clients may use custom schemes, loopback
http redirects, or claimed https links, while web clients require https
on non-loopback hosts. Only enforced when the parameter is explicit, so
existing registrations keep working. The field round-trips through
client metadata and is echoed in the registration response.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QbU1ZgRHK5A1btqpdR5gbD
2026-07-28 19:31:29 +00:00
Claude 0d1ba97145 feat(oauth-provider): answer insufficient scope with a 403 insufficient_scope challenge
Per the MCP 2026-07-28 scope-challenge guidance (RFC 6750 §3.1),
raiseResourceServerChallenge now maps FORBIDDEN errors to a 403 with a
WWW-Authenticate challenge carrying error="insufficient_scope", the
required scope, and the resource_metadata pointer so MCP clients can
step up their authorization. requireMcpAuth and mcpHandler gain a
`scopes` option enforced against the token's scope claim, and awaited
handlers let handler-thrown FORBIDDEN errors produce the same challenge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QbU1ZgRHK5A1btqpdR5gbD
2026-07-28 19:31:09 +00:00
Gustavo ValverdeandGitHub 817a57ac9c docs(mcp): document CLI device authorization (#10565) 2026-07-27 18:07:26 -04:00
Gustavo ValverdeandGitHub d701f90e6f fix(types): expand workspace and consumer type checking (#10505) 2026-07-27 16:01:26 +00:00
2f3a71458d feat(passkey): create session during passkey registration (#9873)
Co-authored-by: Gustavo Valverde <g.valverde02@gmail.com>
2026-07-23 11:29:19 -04:00
f68044dcfb feat(oauth-provider): add device authorization grant (RFC 8628) (#10135)
Co-authored-by: Gustavo Valverde <g.valverde02@gmail.com>
2026-07-23 12:32:32 +00:00
430c895490 feat(generic-oauth): add RP-initiated logout support (#9368)
Signed-off-by: Gautam Manchandani <manchandanigautam@gmail.com>
Co-authored-by: Gustavo Valverde <g.valverde02@gmail.com>
2026-07-23 12:24:53 +00:00
0683a5f36b fix(microsoft)!: use oid as account id (#10204)
Co-authored-by: Gustavo Valverde <g.valverde02@gmail.com>
2026-07-23 12:23:34 +00:00
49b5cf650e fix(device-authorization)!: add lookup indexes (#10059)
Co-authored-by: Gustavo Valverde <g.valverde02@gmail.com>
2026-07-23 07:22:08 -04:00
Gustavo ValverdeandGitHub 973fdde79d fix(siwe): issue addressless nonces (#10234) 2026-07-22 15:17:31 -04:00
Gustavo Valverde 1dd09ed096 docs(sync): address merged documentation comments 2026-07-22 14:22:50 -04:00
Gustavo Valverde cd4eb5627f fix(sync): address behavioral review findings 2026-07-22 14:22:40 -04:00
Gustavo Valverde 558d2de0a7 chore(sync): merge main into next 2026-07-22 10:39:55 -04:00
Gustavo ValverdeandGitHub dec763ef2c feat(scim): expose active provisioned user links (#10474) 2026-07-22 07:07:34 -04:00
Gustavo ValverdeandGitHub ed61b4798e feat(sso): add transactional OIDC user resolution (#10473) 2026-07-22 06:53:55 -04:00
c020a9d6a2 fix(sso): redirect idp initiated saml flows in split origin deployments (#10388)
Co-authored-by: Gustavo Valverde <g.valverde02@gmail.com>
2026-07-22 06:14:46 -04:00
TaesuandGitHub f6ee9e97f5 docs(blog): add theme-aware cover images (#10470) 2026-07-22 05:07:13 +09:00
TaesuandGitHub 9a16103863 docs: remove careers page (#10468) 2026-07-22 05:06:51 +09:00
TaesuandGitHub 0b571ff328 docs: add email provider section (#10459) 2026-07-21 03:35:09 +09:00
Gustavo ValverdeandGitHub a5f7c05924 docs(oauth): clarify provider field ownership (#10432) 2026-07-16 21:03:13 +01:00
Gustavo ValverdeandGitHub dbd302e422 feat(auth)!: scope accounts by issuer (#10403) 2026-07-16 17:24:34 +01:00
Gustavo ValverdeandGitHub 763a2671c5 feat(db): add compound table indexes (#10402) 2026-07-16 14:31:48 +01:00
Gustavo ValverdeandGitHub 0de88f5e61 feat(scim)!: decouple provisioning from the organization plugin (#10390) 2026-07-16 11:17:06 +01:00
bb6c1021e8 feat(organization): add getOrganization for metadata-only fetches (#10397)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 12:49:26 +00:00
MaxwellandGitHub 8784c1c1f4 chore!: move joins to advanced.database.joins (#10359) 2026-07-14 22:21:38 +00:00
TaesuandGitHub 6fe5156ce4 docs: remove "what's next" section from 1.7 rc blog (#10389) 2026-07-14 16:19:20 +09:00
fa8deed833 docs: migrate AI chat from OpenRouter to Vercel AI Gateway (#10384)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 14:28:42 -07:00
c4d1ddaa95 feat: add ctx to verifyIdToken (#10376)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-12 18:01:00 +00:00
c178eeec5b docs: warn that community plugins are not official or verified (#10375)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-12 16:35:41 +00:00
shivamandGitHub 4dfb23bf69 docs: add better-auth-referral to community plugin (#10374) 2026-07-12 16:27:23 +00:00
MaxwellandGitHub 097eecdd16 fix(cli): disambiguate Drizzle relations with relationName (#10352) 2026-07-12 01:54:16 +00:00
JiashengandGitHub 6f20f44482 docs: update ZenStack plugin url to the update-to-date ZenStack repo (#10365) 2026-07-11 22:42:16 +09:00
JackFanandGitHub 3526caeb49 docs: fix incorrect option name and reverse proxy example in cookies page (#10355) 2026-07-10 12:27:19 -07:00
Joel ChigumbaandGitHub 87ac829bf4 docs: add DynamoDB to community adapters (#10361) 2026-07-10 12:22:56 -07:00
MaxwellandGitHub f23ce5012e feat(last-login-method): beforeStoreCookie option for GDPR compliance (#5753) 2026-07-10 01:02:04 +00:00
d6e3858d85 docs: add instagram, zoho, snapchat provider packages to community plugins (#10325)
Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
2026-07-09 01:12:41 +00:00
3bf0e4981e fix(organization): pass endpoint context to organization delete hooks (#10190)
Co-authored-by: Maxwell <145994855+ping-maxwell@users.noreply.github.com>
2026-07-08 22:43:03 +00:00
b30db3ffe5 docs: add better-inbox to community plugins (#10341)
Co-authored-by: ping-maxwell <maxwell.multinite@gmail.com>
2026-07-08 21:09:19 +00:00
MaxwellGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>Cursor AgentMaxwell
fd6b8c13bb docs: fix auth0 migration guide for v5 (#10273)
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Maxwell <ping-maxwell@users.noreply.github.com>
2026-07-07 19:39:36 +00:00
MaxwellGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>Cursor Agent
5d38b138c3 feat(drizzle): generate drizzle schema with schema namespace (#7169)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-07-07 17:57:24 +00:00
Bereket Engida 0b964a3e3c docs: Better Auth is joining Vercel announcement 2026-07-07 08:31:44 -07:00
rondandGitHub 8954563112 docs: correct filename for svelte client snippet (#10284) 2026-07-05 01:28:09 -07:00
Gustavo ValverdeandGitHub 7f510cef53 docs: fix migration errors in the 1.7 upgrade guide and RC blog (#10292) 2026-07-02 14:23:27 +01:00
TaesuandGitHub a76be5029d docs: consolidate the 1.7 RC blog (#10280) 2026-06-29 23:36:46 -04:00
David StackandGitHub 7d99ee7882 docs: add nuxt module and remove NuxSaaS 404 (#10279) 2026-06-29 23:36:23 -04:00
Gustavo Valverde d474e89705 fix(sync): address main to next review comments 2026-06-29 18:25:43 -04:00