lepture / authlib

The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
https://authlib.org/
BSD 3-Clause "New" or "Revised" License
4.49k stars 448 forks source link

Auto refresh token for detected client_credentials grant type #547

Closed looi closed 1 year ago

looi commented 1 year ago

When the OAuth2Client is not constructed explicitly with grant_type='client_credentials', fetching the initial token works (due to the auto-detection of client_credentials in _guess_grant_type) but it then fails to auto-refresh the token (due to the check here).

What kind of change does this PR introduce? (check at least one)

Does this PR introduce a breaking change? (check one)


lepture commented 1 year ago

Thanks for the fix.