Answer the question
In order to leave comments, you need to log in
How does passport.js work?
Please tell a beginner how passport.js works
1) Where does this user come from?
2) When serializeUzer fires, and when deserializeUser. (I made notes for myself, but I'm not entirely sure that I understood correctly)
3) why do we include this library if we already have passport.session
4) What is the cookie age? how does it even work?
Answer the question
In order to leave comments, you need to log in
serializeUser fires when you need to write the user into some string form (for example, write the user's id in cookies), and deserializeUser fires when this very data has been received (in our example, the id in the cookie) and you need to them to return the user back
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question