-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
app.use((req, res, next) => {
console.log('res.locals.user', res.toString(), 'req.session.passport', req.session.passport);
res.locals.user = req.user;
next();
});
not positive what this code is used for besides the obvious passing of user info from request to response object. What I do know is that the res.locals is a function function () { [native code] } and it cannot be coerced to a string.
possible causes:
- asynchronous call is returning error before data resolves - such that 'map is not a function'
- placement /order of app.use's
- not a saved session via the 'express-session' middleware (however I see a proper session w/ sessionID)
- possibly not calling deserializeUser #45
- res does not include a user except in the graphql query and the raw JSON from res.MemoryStore
Metadata
Metadata
Assignees
Labels
No labels