I\'m using Passport.js to login a user with username and password. I\'m essentially using the sample code from the Passport site. Here are the relevant parts (I think) of my c
late to party but this worked for me
use this in your app.js
app.use(function(req,res,next){ res.locals.currentUser = req.user; next(); })
get current user details in client side like ejs
<%= locals.currentUser.[parameter like name || email] %>