-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add refresh callback to CLI #31
Comments
@brad Any update on this? Still confused how refresh and save tokens, to then use those saved tokens for the next api request. |
Sorry @ethanopp at this point this is not a needed feature for the product owner so it will not happen unless a community member contributes the code |
Didn’t someone already do this? |
@ethanopp The method in that PR manually refreshes tokens and doesn't save them for later (just updates the tokens for use in the current session) A refresh callback is a method that takes a new token (automatically generated by oauthlib) as input and persists it somewhere (in this case, it should be a config file). |
@brad forgive me if I'm missing something here (a little new to developing with oauth 2), but what is the purpose of saving the My understanding with the other apps I've used oauth2 on was that you save the creds, and then in the application do something like the following, so you're only gettting new tokens once the ones you saved have expired:
|
Dug through the code a little bit and think I found what I was looking for...
Where save_withings_token is my method to save creds to db |
Setup a refresh callback for the CLI, will fix #30
The text was updated successfully, but these errors were encountered: