Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save philipimperato/1f99ed49204ac674c9749014e471a688 to your computer and use it in GitHub Desktop.
Save philipimperato/1f99ed49204ac674c9749014e471a688 to your computer and use it in GitHub Desktop.
/* this is the first route hit */
routeConfig.all('/*', (req, res, next) => {
req.sessionStore.get(req.session.id, (err, sess) => {
/* sess.user is set on login */
if (sess && sess.user) {
/* logged in */
} else {
/* not logged in */
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment