Friday 30 June 2017

Can't access req.user on routes

Hey guys,I'm using express / express-session and passport.To skip the obvious causes, I'm using express-session, initializing passport, calling passport.session() and serializing / deserializing before requiring my routes.Somehow, req.user is still undefined on my routes, except it turns up when the browser requests /favicon.ico. Does anyone have some ideas as to why req.user wouldn't be showing up? It's almost like the routes get hit before passport is done deserializing.

Submitted June 30, 2017 at 10:59AM by ajc820

No comments:

Post a Comment