I'm not so strong on Oauth so need some help to implement an interface to my FreeAgent accounting system, they provide an Oauth 2 API.
I want to code in standard Python and it seems the best library is Rauth. My problem is refreshing tokens.
Is there any good sample on how to refresh expired tokens using python Rauth library? What's then the best practice to handle the expiration? I could try to use my token and in case of error due to expiration ask for a refresh. Or maybe I could keep track of the life of a token and in case my computation says it's expired then ask for another. And where is best to save all this token information: in a configuration file, in JSON object, into a database ... ?
Thanks for any help.
Greg