title: how to delete password field from user object in passport
body: <p>I need to create the session with user object via passport js, but in this part of a code, I can add only all user object, or user.id :</p>
  
  <pre><code>    passport.serializeUser(function(user, done) {
         done(null, **user.id or user**  );
         });
  </code></pre>
  
  <p>My object : 
     var userSchema = mongoose.Schema({
      local: {
          email: String,
          password: String,
      },
      });</p>
  
  <pre><code>passport.serializeUser(function(user, done) {
  //Also i tried to delete object field here 
       //( delete user.local.password ) ,
             //but it didn't help
      done(null, user.id );
  });
  </code></pre>
  
  <p>Can someone help me with that? </p>