Add quick temporary patch for Authorization error

This commit is contained in:
Mrugesh Mohapatra
2016-06-03 10:34:59 +05:30
parent a2e426d48e
commit ec508636b0

View File

@ -81,20 +81,19 @@ module.exports = function(app) {
'emails',
'a-extend-user-welcome.ejs'
),
redirect: '/'
redirect: '/email-signin'
};
debug('sending welcome email');
return user.verify(mailOptions, function(err) {
if (err) { return next(err); }
return req.logIn(user, function(err) {
if (err) { return next(err); }
req.flash('success', {
msg: [ "Welcome to Free Code Camp! We've created your account." ]
msg: [ 'Congratulations ! We\'ve created your account. ',
'Please check your email. We sent you a link that you can ',
'click to verify your email address and then login.'
].join('')
});
return res.redirect(redirect);
});
});
});
};