From cc0e7bf0d69d7d63a3370afea1d2e03982721a26 Mon Sep 17 00:00:00 2001 From: Pranjal Agrawal <2018kucp1127@iiitkota.ac.in> Date: Mon, 20 Apr 2020 02:07:37 +0530 Subject: [PATCH] change tokeninfo to userinfo to get all information about profile --- lib/strategy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/strategy.js b/lib/strategy.js index cae0a37..80951cf 100644 --- a/lib/strategy.js +++ b/lib/strategy.js @@ -106,7 +106,7 @@ GoogleTokenStrategy.prototype.authenticate = function(req, options) { * @api protected */ GoogleTokenStrategy.prototype.userProfile = function(accessToken, done) { - var profileUrl = 'https://www.googleapis.com/oauth2/v3/tokeninfo?access_token='+accessToken; + var profileUrl = 'https://www.googleapis.com/oauth2/v3/userinfo?access_token='+accessToken; this._oauth2.get(profileUrl, null, function (err, body, res) { if (err) { return done(new InternalOAuthError('failed to fetch user profile', err)); }