title: Not getting back email from Facebook OAuth API, Passport with MEAN Stack
body: <p>I'm working to set up Face book OAuth for user logging into my website. I am getting an object back from Facebook with my FB information but there is no sign of email anywhere in that profile response. </p>
  
  <p>When I click the  "Login to Facebook" button on my page it takes me to Facebook and says the app will require my profile and email as I added email to the scope of things I wanted. Here is my code: </p>
  
  <p>config/routes.js:</p>
  
  <pre><code>app.get('/auth/facebook', passport.authenticate('facebook', {scope:['email']}));
  
  app.get('/auth/facebook/callback',
    passport.authenticate('facebook', 
  { successRedirect: '/confirm_community',
    failureRedirect: '/signin' }));
  </code></pre>
  
  <p>==============
  passport.js</p>
  
  <pre><code> passport.use(new FacebookStrategy({
      // pull in our app id and secret from our auth.js file
      clientID        : configAuth.facebookAuth.clientID,
      clientSecret    : configAuth.facebookAuth.clientSecret,
      callbackURL     : configAuth.facebookAuth.callbackURL
  
  },
  
  function(accessToken, refreshToken, profile, done) {
       process.nextTick(function() {
              console.log(profile);
              // console.log(profile.emails[0].value);
               User.findOne({'facebook.id':profile.id}, function (error, result){
                      if(error){
                          return done(error);
                      }
                      if(user) {
                          return done(null, user);
                      }
                      else {
                          var newUser = new User();
                          newUser.facebook.id = profile.id;
                          newUser.facebook.token = accessToken;
                          newUser.facebook.name = profile.displayName;
                          newUser.facebook.email = profile.emails[0].value;
  
                          newUser.save(function (error){
                              if(error){
                                  console.log(error);
                                  throw error;
                              } else {
                                  return done(null, newUser);
                              }
                          });
                      }
               });
          });
  }));
  </code></pre>
  
  <p>Here is the FB object I get back when I console.log(profile) in the process.nextTick function with FB's response:</p>
  
  <pre><code>{ id: 'my id is coming back here',
    username: undefined, (because I don't have one)
    displayName: 'my name is coming back here',
    name:
     { familyName: undefined, (I don't have any of these in my profile)
       givenName: undefined,
       middleName: undefined },
       gender: undefined,
    profileUrl: undefined,
    provider: 'facebook',
    _raw: '{"name":"my name is coming here","id":"my id is coming here"}',
    _json: { name: 'my name is coming here', id: 'my id is coming here' } }
  </code></pre>
  
  <p>I made sure my email is public and login to Facebook normally with my email and password, so I'm not using Mobile Phone to sign to Facebook. I'm just missing that email address. I can't seem to figure out why that object isn't giving me back an email?? What am I missing? Help is very much appreciated.</p>