i am getting token and secret while authorizing user with garmin but profile is an empty object. i need profile details too.
so i am trying to fetch profile details with outh request method using the token i am receiving but i dont know the right url to hit to get profile info.
can someone please help. url used below is not working.
problem is similar to - github.com/.../73
let client = new OAuthStrategy({ requestTokenURL: configAuth.garmin.requestTokenUrl, userAuthorizationURL: configAuth.garmin.userAuthorizationUrl,
accessTokenURL: configAuth.garmin.accessTokenUrl, clientID: configAuth.garmin.clientID, clientSecret: configAuth.garmin.clientSecret, callbackURL: configAuth.garmin.redirectURL }, function(accessToken, refreshToken, profile, cb) { // do stuff }); client.userProfile = function (accesstoken, done) { // choose your own adventure, or use the Strategy's oauth client this._oauth2._request("GET", connect.garmin.com/.../info, null, null, accesstoken, (err, data) => { if (err) { return done(err); } try { data = JSON.parse( data ); } catch(e) { return done(e); } done(null, data); }); }; passport.use(client);