Closed BigPhatNerd closed 4 years ago
Thanks @BigPhatNerd, I'll add it to the list of officially supported ones :+1:
In the meantime you can define garmin
directly in your config.json
, no need to update anything in Grant:
{
"defaults": {
"origin": "http://localhost:3000",
"transport": "session"
},
"garmin": {
"request_url": "https://connectapi.garmin.com/oauth-service/oauth/request_token",
"authorize_url": "https://connect.garmin.com/oauthConfirm",
"access_url": "https://connectapi.garmin.com/oauth-service/oauth/access_token",
"oauth": 1,
"key": "...",
"secret": "...",
"callback": "/garmin/redirect"
}
}
Added in v5.2.0
Hey @simov follow up question here on the Garmin Provider.
Grant works really good and helps to make the OAuth flow real straightforward. With Garmin there is one extra step that needs to be performed to get the UAT from it. I was wondering I can doing this by changing any config on grant? Currently, in the callback I get an oauth_token and an oauth_verifier. Mainly asking because this request to fetch the UAT also requires a HMAC-SHA1 signature which I was currently relying on grant to generate for the first response 😅
Let me know if there is a possibility of a quick fix using grant, else happy to do this one request manually haha
Not sure what UAT is, but in case you need to make additional request to the Garmin API after you have the access credentials then you can use the underlying HTTP client, available as a standalone module to make that additional call. Here is how to make a call using OAuth1.0a credentials https://github.com/simov/request-compose/blob/master/examples/mw-oauth.js
If UAT is about the user profile endpoint then you can try configuring the profile_url
in Grant.
Thanks, that works!! @simov
i was actually able to resolve my main issue by reading the difference between redirect_uri and callback 😅
Hey guys, total noob here, so not even sure how to do this. I am using Grant for Twitter and I went ahead and used it for Garmin as well and it did just fine. Keep up the good work. I greatly appreciate having Grant available.
oauth.json
In my config.json file: