Is your feature request related to a problem? Please describe.
If the token url gives say 503, then the fetch token doesn't perform the retry (number of retries should be configurable). The sessions adapter method does support retries but if we are using the "get" on the oauth2client as follows, how to send the configure the session adapter/retry settings
oauth_client = OAuth2Session(client_id=client_id,
client_secret=client_secret,
token_endpoint=token_url,
grant_type='client_credentials',
verify=ssl)
oauth_client.fetch_token(token_url) # Can we retry if this fails in 1st attempt.
oauth.get(url) # can we retry here if the existing token fails and the authlib attempts to fetch new token and there it meets 503 for token_url
Describe the solution you'd like
Need help on how we can enable and pass custom retries to the final request made by the authlib to fetch tokens.
Describe alternatives you've considered
To do this manually using while loop and retry the request.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
If the token url gives say 503, then the fetch token doesn't perform the retry (number of retries should be configurable). The sessions adapter method does support retries but if we are using the "get" on the oauth2client as follows, how to send the configure the session adapter/retry settings
Describe the solution you'd like
Need help on how we can enable and pass custom retries to the final request made by the authlib to fetch tokens.
Describe alternatives you've considered
To do this manually using while loop and retry the request.
Additional context
Add any other context or screenshots about the feature request here.