fixed email signup

This commit is contained in:
David Baldwynn 2015-11-05 14:38:38 -08:00
parent 1309832742
commit 23828b0b25
6 changed files with 16 additions and 7 deletions

View file

@ -41,6 +41,13 @@ var config_nev = function () {
html: '<p>Your account has been successfully verified.</p>',
text: 'Your account has been successfully verified.'
},
verifySendMailCallback: function(err, info) {
if (err) {
throw err;
} else {
console.log(info);
}
},
});
nev.generateTempUserModel(User);
@ -60,7 +67,7 @@ exports.validateVerificationToken = function(req, res){
res.status(200).send('User successfully verified');
}else {
// redirect to resend verification email
res.status(400).send( {message: 'Verification token is invalid or has expired'} );
return res.status(400).send( {message: 'Verification token is invalid or has expired'} );
}
});
};
@ -68,6 +75,7 @@ exports.validateVerificationToken = function(req, res){
exports.resendVerificationEmail = function(req, res, next){
nev.resendVerificationEmail(req.body.email, function(err, userFound) {
if(err) {
console.log(errorHandler.getErrorMessage(err));
res.status(500).send( {message: errorHandler.getErrorMessage(err) } );
}else if (userFound){
res.status(200).send('Verification email successfully Re-Sent');

View file

@ -47,9 +47,9 @@ module.exports = {
callbackURL: '/auth/github/callback'
},
mailer: {
from: process.env.MAILER_FROM || '',
from: process.env.MAILER_FROM || 'no-reply@kioskform.herokuapp.com',
options: {
service: process.env.MAILER_SERVICE_PROVIDER || 'no-reply@kioskform.herokuapp.com',
service: process.env.MAILER_SERVICE_PROVIDER || '',
auth: {
user: process.env.MAILER_EMAIL_ID || '',
pass: process.env.MAILER_PASSWORD || ''

View file

@ -65,9 +65,9 @@ module.exports = {
callbackURL: '/auth/github/callback'
},
mailer: {
from: process.env.MAILER_FROM || '',
from: process.env.MAILER_FROM || 'no-reply@kioskform.herokuapp.com',
options: {
service: process.env.MAILER_SERVICE_PROVIDER || 'no-reply@kioskform.herokuapp.com',
service: process.env.MAILER_SERVICE_PROVIDER || '',
auth: {
user: process.env.MAILER_EMAIL_ID || '',
pass: process.env.MAILER_PASSWORD || ''

View file

@ -2,6 +2,7 @@
angular.module('users').controller('PasswordController', ['$scope', '$stateParams', '$state', 'User',
function($scope, $stateParams, $state, User) {
$scope.error = '';
// Submit forgotten password account id
$scope.askForPasswordReset = function() {

View file

@ -5,7 +5,7 @@ angular.module('users').controller('VerifyController', ['$scope', '$state', '$ro
$scope.isReset = false;
$scope.credentials = {};
$scope.error = '';
// Submit forgotten password account id
$scope.resendVerifyEmail = function() {

View file

@ -32,7 +32,7 @@
<p>Check your email and click on the activation link to activate your account. If you have any questions drop us a line at <a href="mail:hi@NodeForms.com">hi@NodeForms.com</a></p>
<div class="text-center form-group">
<button type="submit" class="btn btn-large btn-primary">
<a href="/#!/">Continue</a>
<a href="/#!/" style="color:white;">Continue</a>
</button>
</div>
</div>