Answer the question
In order to leave comments, you need to log in
Is it possible to just do(null, user) in the serializeUser/deserializeUser functions in passport.js?
Good evening.
Can serializeUser and deserializeUser just return user? Doing nothing with it?
passport.serializeUser(function(user, done) {
done(null, user);
});
passport.deserializeUser(function(user, done) {
done(null, user);
});
Answer the question
In order to leave comments, you need to log in
It is possible, but in theory you do not store the user'a object, but its identifier, by which in deserializeUser you request it from the source (for example, a database), then the data is relevant within the request
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question