The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
BSD 3-Clause "New" or "Revised" License
4.39k
stars
436
forks
source link
Token refresh failed when using AsyncOAuth2Client with client credentials #650
Open
radiophysicist opened 1 month ago
Describe the bug
In case of using AsyncOAuth2Client with client credential I'm obtaining a TypeError exception after token expiration when making POST request.
Error Stacks
To Reproduce My code simplified:
Expected behavior
Expected the token to be refreshed / re-obtained and than request complete successfully
Environment:
Additional context
The problem seems to originate from line: https://github.com/lepture/authlib/blob/610622e54b6cbc810ad9fda97569f13401614348/authlib/oauth2/client.py#L275 In case of client credentials there are both no
token_endpoint
in metadata andurl
in token. Token data:Metadata:
Is it intended, a bug or my client misconfiguration?