Hello, I’ve got one question concerning serialization and deserialization using passport.js in node.js. For example we serialize user basing on his id:
passport.serializeUser(function(user, done) {
done(null, user.id);
});
And then we deserialize him also basing on his id:
passport.deserializeUser(function(id, done) {
User.findById(id, function(err, user) {
done(err, user);
});
});
But how does the user give us the information about his ID everytime he opens the new tab or reload our website? Does the whole process is based on cookies?