You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bryan-prime
changed the title
New token will not be fetched if grant_type is passed for fetch_token()
New token will not be fetched if grant_type='client_credentials' is passed for fetch_token()
Jul 16, 2024
Describe the bug
If I pass
client_credentials
as thegrant_type
it will not automatically fetch the new token.To Reproduce
My code where I pass the
grant_type
.https://github.com/lepture/authlib/blob/master/authlib/oauth2/client.py#L199-L204
self.metadata
is only set ifNone
was passed forgrant_type
https://github.com/lepture/authlib/blob/master/authlib/oauth2/client.py#L279-L284
self.metadata['grant_type']
will beNone
so it will not fetch the new token.My workaround was passing nothing for fetch token because it luckily defaults to
client_credentials
if nothing was passed for thegrant_type
.Expected behavior
A clear and concise description of what you expected to happen.
Environment:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: