passport.serializeUser() & passport deserializeUser() explanation

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

2 Likes

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…

2 Likes

Checkout this link for a good explanation