I am using Passport-Facebook authentication.
passport.use(new FacebookStrategy({
clientID: \'CLIENT_ID\',
clientSecret: \'CLIENT_SECRET\
Make sure you're providing the scope parameter into the first .authenticate() call, not the callback.
Like this:
router.get("/auth/facebook", passport.authenticate("facebook", {
scope: [ "email" ], // scope goes here, not below
}));
router.get("/auth/facebook/callback",
passport.authenticate("facebook", {
successRedirect: "/",
failureRedirect: "/login",
}),
);