@better-auth/oauth-provider
❗ Breaking Changes
- Restricted
customIdTokenClaims, extension ID-token claims, and per-issuanceidTokenClaimsfrom overriding protected OIDC/JWT protocol claims (#10140)
Migration: Remove any
iss,sub,aud,exp,nonce,auth_time,acr,amr, orazpfields fromcustomIdTokenClaims, extension ID-token claims, and per-issuanceidTokenClaims. Use namespaced custom claims (e.g.,"https://example.com/role") for application-specific data instead.
Features
- Added support for confidential DCR clients to complete authorization-code flows without PKCE when
clientRegistrationRequirePKCE: falseis set (#10146) - Added support for the
claims.userinfoauthorization request parameter, allowing clients to request specific standard claims from the UserInfo endpoint (#10156)
Bug Fixes
- Fixed the UserInfo endpoint to accept bearer tokens in
application/x-www-form-urlencodedPOST request bodies (#10155) - Fixed confidential clients that opted out of PKCE to successfully request
offline_accesswhen the authorization includes bothopenidscope and anonce(#10153) - Fixed the OIDC authorization endpoint to accept form-encoded POST requests and return proper errors for unsupported
requestandrequest_uriparameters (#10151) - Fixed the UserInfo endpoint to correctly return
profileandemailscope claims, and added rejection of unsupportedacr_valuesin authorization requests (#10152) - Fixed the token endpoint to only require
redirect_uriwhen the original authorization request included one, and to returninvalid_granton mismatches (#10159) - Fixed Dynamic Client Registration to preserve client key metadata across updates (#10144)
- Fixed authorization requests missing
response_typeto redirect errors to the client redirect URI instead of the provider error page (#10149) - Fixed authorization code replay to correctly return
invalid_grantand revoke all tokens previously issued from the replayed code (#10150) - Fixed refresh token validation to return
invalid_grantwhen a client attempts to use a refresh token issued to a different client (#10154)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
Full changelog: v1.7.0-beta.8...v1.7.0-beta.9