Gunakan store.get
metode mongoStore
. Anda . Coba sesuatu seperti ini:
var authenticate = function (req, res, next) {
mongoStore.get(req.params.session_id, function (error, session) {
if (error) {
res.status(500).send(error);
return;
}
}
req.session = session;
next();
}