mirror of
https://github.com/better-auth/better-auth.git
synced 2026-08-16 02:58:43 -05:00
The OAuth Provider extension surface let a grant handler drift from what it issued in two ways. The client-registration check honored a request-supplied grant type while issuance used the provider-bound grant, so a handler could authenticate a client for a permissive grant and mint under a stricter one. And a client-authentication strategy returned the client record the provider then authorized against, so a strategy could supply a client's grants, scopes, or enabled state. The provider-bound grant is now the sole authority for the registration check, and grantType is removed from OAuthClientAuthenticationRequest. A strategy proves only the client id it authenticated (plus an optional confirmation); the provider resolves and authorizes the client record itself via getClient. The strategy result type is now OAuthClientAuthenticationResult.