Hello all,I am making a Node app(beginner here) that uses Google auth with Passport js and I can login successfully. However, later when deserializeUser is called. It does not find the user. One thing that I have seen is that user _id is stored in the user document as ObjectId("id") while in the session document the user is stored as a pure String "id". Can that be the problem? I thought Mongoose used to do that conversion.Here are the versions I am using:"connect-mongodb-session": "^2.2.0","express": "^4.16.4","express-session": "^1.16.2","mongoose": "^5.4.20","passport": "^0.4.0","passport-google-oauth20": "^2.0.0"Here is some code:https://www.codepile.net/pile/GNeBXOxL
Submitted July 10, 2019 at 05:37PM by dejavits
No comments:
Post a Comment