Answer the question
In order to leave comments, you need to log in
How to keep user logged in in Node.js?
Authorization happens with the help of passport . Sessions are stored in the database:
var session = require('express-session');
var MongoStore = require('connect-mongo')(session),
sessionStore = new MongoStore({ url: 'mongodb://localhost:27017/loginapp' });
module.exports = sessionStore;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question