Relative Content

Tag Archive for node.jsexpresspassport.js

NODE + PASSPORT + GOOGLE STRATEGY: req.user not being persistent

I’m working on a MERN stack project and I’m facing this issue where my req object is not being persistent and holding the req.user after it has been authenticated. when the /google/callback enpoint is triggered the req.user seems to exist but the second my application tries to fetch /user the req.user is undefined