Monday 22 July 2019

passport-facebook login issue return _=_

Hi so right to the question,​So i have been trying to implement facebook login with my app (local) and when i pass the "email" permission in the scope it just returns the same URL but with "_=_" appended to it.I tried to using different permissions and they works. but the email permission is not working.​Here's my code.passport.jspassport.use("facebook",new FBStrategy({clientID: process.env....,clientSecret: process.env....,callbackURL: "http://localhost:5000/auth/facebook/callback",passReqToCallback: true,profileFields: ["id", "emails", "name"]},(accessToken, refreshToken, profile, done) => {console.log(accessToken, refreshToken, profile);}));routeroute.get("/facebook", passport.authenticate("facebook", { scope: ["email"] }));

Submitted July 22, 2019 at 03:41PM by Magic-Sarap

No comments:

Post a Comment