jaredhanson / passport-facebook

Facebook authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-facebook/?utm_source=github&utm_medium=referral&utm_campaign=passport-facebook&utm_content=about
MIT License
1.29k stars 447 forks source link

Failed to obtain access token #216

Open pankajnarwal11 opened 7 years ago

pankajnarwal11 commented 7 years ago

// 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)

angelxmoreno commented 1 year ago

@pankajnarwal11 shouldn't this be under passport-google-oauth20 instead of passport-facebook ?