mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 23:53:17 -05:00
Two generic extension points complete the contribution surface. A custom grant handler injects per-request claims and response fields through the new `extra` option on the exported `createUserTokens`: `extra.accessTokenClaims` merge into the JWT access token beneath the host-pinned claims, and `extra.tokenResponse` into the response body beneath the standard OAuth fields. `CreateUserTokensParams` is now exported so external grant handlers can type it. Plugins register token-endpoint client-authentication methods through `OAuthContributions.clientAuthStrategies`, keyed by `client_assertion_type` and dispatched at the shared `extractClientCredentials` chokepoint (so the token, introspection, and revocation endpoints all honor them). A method such as wallet attestation becomes executable, not merely advertised.