I wonder when action becomes "login" as it sends me undefined all the time ?
var action = req.param('action');
if (action === 'register') {
res.redirect('/register');
}
else if (action === 'login') {
res.redirect('/login');
}
else if (action === 'disconnect') {
res.redirect('back');
}
else {
// make sure the server always returns a response to the client
// i.e passport-local bad username/email or password
res.forbidden();
}
And this logic works in sails-generate-auth and it's a bit different:
switch (action) {
case 'register':
res.redirect('/register');
break;
case 'disconnect':
res.redirect('back');
break;
default:
res.redirect('/login');
}
Hi guys !
I wonder when action becomes "login" as it sends me undefined all the time ?
And this logic works in sails-generate-auth and it's a bit different: