ID mismatch using Passport in Express

So I have a bit of a problem, also just getting into Node so be gentle!

I have the following (using Passport):

User.findOne({}, '_id username interests', {
    _id: req.user._id
}, function(err, user) {
    if (err) return;
    console.log(req.user._id);
    console.log(user._id);
    res.json(user);
});

However, the two console.log's yield different IDs! I have no idea why?? How is this possible?

Like I said, I'm new to Node, so I'm floundering a little...

findOne needs to be passed the query as the first argument. In your example, you're passing it an empty argument which pretty much means 'give me some random user from the database'.

Try this:

User.findOne({ _id: req.user._id }, '_id username interests', function(err, user) {
  // in case of errors, send back a response too!
  if (err)
    return res.send(500);
  ...
});

FWIW: since it looks like you're using Mongoose, there's also findById for cases like this.