requests / requests-oauthlib

OAuthlib support for Python-Requests!
https://requests-oauthlib.readthedocs.org/
ISC License
1.71k stars 421 forks source link

Compliance fix for tokens that never expire (e.g. Mailchimp) #509

Open corradio opened 1 year ago

corradio commented 1 year ago

Hello,

I've encountered an issue when integrating with Mailchimp, as it turns out mailchimp tokens never expire. A compliance fix is available here. It is an access_token_response hook, where the expired_in value is set to 3600 instead of 0. The consequence is that when my app is authorized and a token is fetched, I can use that token for 3600 seconds.

The problem is that I'd like to store and use this token once the arbitrary 3600 seconds have passed. Currently, there doesn't seem to be a way around that. Has anyone had the same issue?