Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX bug causing error after login #18

Open
Gwillison415 opened this issue Aug 23, 2017 · 1 comment
Open

UX bug causing error after login #18

Gwillison415 opened this issue Aug 23, 2017 · 1 comment

Comments

@Gwillison415
Copy link
Member

Gwillison415 commented Aug 23, 2017

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
@Gwillison415 Gwillison415 changed the title User data is not being stored UX bug causing error after login Aug 24, 2017
@Gwillison415
Copy link
Member Author

cannot nail down if it is on refresh, back button however it is always resolved by going through the Oauth route again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant