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 446 forks source link

FacebookStrategy function is not working #269

Open yasir-rafiq opened 4 years ago

yasir-rafiq commented 4 years ago

HI, everyone my function is not getting executing in facebbokstrategy like

passport.use(new FacebookStrategy({ clientID: app.facebookAuth.clientID, clientSecret: app.facebookAuth.clientSecret, callbackURL: app.facebookAuth.callbackURL, profileFields: ['id', 'displayName','email'], enableProof: true }, function(accessToken, refreshToken, profile, done) { console.log('profile ===', profile); // **this line not print** }

channel = 'facebook' passport.authenticate(channel, { scope : ['email'] }, function(err, user, info) {});

xyide commented 4 years ago

Where are you executing passport.authenticate from? Do you have it executing as a handler similar to this?

app.get('/login', passport.authenticate(channel, { scope : ['email'] }, function(err, user, info) {}));