ExpressJs Passportjs de-serializes user object for every request to a route
问题 I have a ExpressJS app that is using Passportjs to authenticate with Facebook and everything is working as expected exception for one issue. I have vehicle.js under /routes/ which contains some routes (router.gets and router.posts) that need authentication and some that don't. If user is logged in then every request handled by vehicle.js causes User de-serialization which is a Mongoose lookup. How can I avoid these unnecessary Mongoose lookups when request is made to a router.get and/or