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)
[x] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactor
[ ] Other, please describe:
Does this PR introduce a breaking change? (check one)
[ ] Yes
[x] No
[x] You consent that the copyright of your pull request source code belongs to Authlib's author.
When the
OAuth2Client
is not constructed explicitly withgrant_type='client_credentials'
, fetching the initial token works (due to the auto-detection ofclient_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)