-
Notifications
You must be signed in to change notification settings - Fork 3
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
implement token refresh #2
Comments
in the requests-oauthlib code, there is this:
if i can register a custom complance_hook, then i can set the body and headers based on what fitbit is expecting...
|
here's an example of using automatic refresh tokens with requests-oauthlib. https://requests-oauthlib.readthedocs.io/en/latest/examples/real_world_example_with_refresh.html specifically
|
hmm... added token expiry, and it really looks like the tokens are being renewed: When i hit /fitbitexpiretoken:
i manually expire the token then issue a get-profile api command. after that the token has been updated with a new refresh token and new expiration. |
token refresh is not currently working with flask-dance-fitbit.
token refresh is the ability to seamlessly refresh any expired tokens without requiring the application to re-authenticate the user and re-run the full oauth protocol. Token refresh is supported by many oauth providers, that provide both a token (with expiration), and a refresh_token that is single use.
for example: fitbit supports token refresh using: https://dev.fitbit.com/build/reference/web-api/authorization/refresh-token/
and https://community.fitbit.com/t5/Web-API-Development/How-to-build-Refresh-Token-Flow/m-p/3744205/highlight/true#M10964
I have an open issue with flask-dance looking for some guidance: singingwolfboy/flask-dance#391 (comment)
The text was updated successfully, but these errors were encountered: