我应该重定向还是呈现页面?身份验证的最佳做法是什么。
var User = require('models/user.js');
User.authenticate(req.body.email, req.body.password)
.then(function(error, user){
//IF SUCCES AND NO ERROR
res.redirect('/profile');
//OR
res.render('profile.pug');
})
.catch(error => console.log(error));