Added support for authorization code grant flow#47
Merged
teramonagi merged 3 commits intoteramonagi:masterfrom Jan 11, 2021
Merged
Added support for authorization code grant flow#47teramonagi merged 3 commits intoteramonagi:masterfrom
teramonagi merged 3 commits intoteramonagi:masterfrom
Conversation
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Specifically:
1) added ability to specify use_basic_auth
use_basic_auth (for httr::oauth2.0_token) must be set to TRUE for Fitbit oauth2.0 authorization code grant flow (as per Fitbit API) currently use_basic_auth defaults to FALSE (which is fine I think for implicit code grant flow). Since some users may want to use authorization code grant flow for their applications exposing this so users can change this and use this library is helpful.
2) added ability to specify query parameters for Fitbit authentication page
see httr#503
The httr library was recently updated to support the ability to pass down URLquery parameters to the initial oauth2.0 authorization page. This is useful for the for defining additional URI parameters in the authorization code grant flow (such as token expiration duration, ability to force authorization page/consent and others - see Authorization Page @ https://dev.fitbit.com/build/reference/web-api/oauth2/) that must be appended to the initial authorization URL.