requests-oauthlib
requests-oauthlib copied to clipboard
`oauth2_session.OAuth2Session.refresh_token` creates infinite loop with Exchange Online when token expires
Using an expired access token with Microsoft Exchange Online for sending Outlook e-mails under exchangelib runs into an infinite loop during the token refresh just because the app creds are bundled into the body
structure instead of being provided as a (client_id, client_secret)
pair given the auth
object. (context)
Is it possible to automatically create and use an auth
object (if it isn't provided explicitly by the caller) based on these refresh kwargs (if they contain the client creds) right inside of oauth2_session.OAuth2Session.refresh_token
so the /token
POST will benefit from this implicit auth
object and make the server auth working with Exchange?