passport.serializeUser() & passport deserializeUser() explanation

passport.serializeUser() & passport deserializeUser() explanation
0

#1

can someone please explain to me what exactly passport.serializeUser() & passport.deserializeUser() do?


#2

ok, i think i’ve figure it out… passport.serializeUser() is setting id as cookie in user’s browser and passport.deserializeUser() is getting id from the cookie, which is then used in callback to get user info or something else, based on that id or some other piece of information from the cookie…


#3

Checkout this link for a good explanation