How do I specify which HTTP method should be used in a redirect in my express application?
I have a NodeJS/Express application where I am using PassportJS for authentication.
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