------------------------------------------- Above is Code-------------------------------------
ERROR BELOW COMING WHILE AUTHENTICATING
InternalOAuthError: Failed to obtain access token
at Strategy.OAuth2Strategy._createOAuthError (/home/pankaj/work/expressjs_project/oauth2check/node_modules/passport-oauth2/lib/strategy.js:379:17)
at /home/pankaj/work/expressjs_project/oauth2check/node_modules/passport-oauth2/lib/strategy.js:166:45
at /home/pankaj/work/expressjs_project/oauth2check/node_modules/oauth/lib/oauth2.js:191:18
at ClientRequest. (/home/pankaj/work/expressjs_project/oauth2check/node_modules/oauth/lib/oauth2.js:162:5)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8)
// TODO: Configuring passport-google-oauth20
var _google_strategy = new GoogleStrategy({ clientID: '1057680845037-fdcghju9jogg16jlcjprhkturoir8tg3.apps.googleusercontent.com', clientSecret: 'CemzwXb5L1thjMAJgigFHUmN', callbackURL: "http://localhost:3000/login/google/callback" }, function(accessToken, refreshToken, profile, cb) { saveAuthDetails(accessToken, refreshToken, profile, function(err, ress){ return cb(null, profile); }); } );
passport.use('gmail', _google_strategy);
------------------------------------------- Above is Code------------------------------------- ERROR BELOW COMING WHILE AUTHENTICATING
InternalOAuthError: Failed to obtain access token at Strategy.OAuth2Strategy._createOAuthError (/home/pankaj/work/expressjs_project/oauth2check/node_modules/passport-oauth2/lib/strategy.js:379:17) at /home/pankaj/work/expressjs_project/oauth2check/node_modules/passport-oauth2/lib/strategy.js:166:45 at /home/pankaj/work/expressjs_project/oauth2check/node_modules/oauth/lib/oauth2.js:191:18 at ClientRequest. (/home/pankaj/work/expressjs_project/oauth2check/node_modules/oauth/lib/oauth2.js:162:5)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8)