I\'m trying to do this since a lot of days but all my tests fails...
Users on my platform connect them by using passportjs strategies (paypal, facebook, google...).<
I got the same problem and finally I found the solution:
var user = newDataObj;
req.logIn(user, function(error) {
if (!error) {
console.log('succcessfully updated user');
}
});
res.end(); // important to update session
The req.logIn will call serialize function and save a new session to db.
res.end() is important. without it the session will not be saved.