I\'ve been reading passport.js info and samples for two days, but I\'m not sure after that I did all the process of authenticating.
How do I know if I\
If you would like to use it in your templates as your code sample seems to indicate you can create some middleware such as this:
app.use(function (req, res, next) {
res.locals.login = req.isAuthenticated();
next();
});
Place that code somewhere after you have setup passport.
And then use it in your template (swig example)
{% if login %}
{% else %}
{% endif %}