First, you should not keep USER_INFO = {} outside the scope of your current request. If two separate users make a request, they will receive the same object.
You should at least store them so that they can be found separately
var USERS = {}; ... module.exports... passport.use... ... function(accessToken, refreshToken, profile, done) { USERS[profile.id] = profile; done(null, profile); }));
Now, if two separate users make a request, they will have their information separately in USERS
{ 1234: {id: 1234, name: FOO}, 6789: {id: 6789, name: BAR}, }
And done(null, profile) will serialize this user. If you have not defined serialization / deserialization functions, you should do it as follows:
passport.serializeUser(function (user, done) { done(null, user.id); }); passport.deserializeUser(function (id, done) { var user = USERS[id]; done(null, user); });
Your users will now be available in their query contexts as req.user
So you just need to do:
app.get('/fb', function (req, res) { res.json(req.user); });