Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // User logged in
- sails.log.info('Password matches');
- req.session.userId = admin.id;
- req.session.authenticated = true;
- return res.redirect("/home");
- // User logging out
- req.session.destroy(function() {
- return res.redirect("/");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement