fixed email signup
This commit is contained in:
parent
1309832742
commit
23828b0b25
|
@ -41,6 +41,13 @@ var config_nev = function () {
|
||||||
html: '<p>Your account has been successfully verified.</p>',
|
html: '<p>Your account has been successfully verified.</p>',
|
||||||
text: 'Your account has been successfully verified.'
|
text: 'Your account has been successfully verified.'
|
||||||
},
|
},
|
||||||
|
verifySendMailCallback: function(err, info) {
|
||||||
|
if (err) {
|
||||||
|
throw err;
|
||||||
|
} else {
|
||||||
|
console.log(info);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
nev.generateTempUserModel(User);
|
nev.generateTempUserModel(User);
|
||||||
|
@ -60,7 +67,7 @@ exports.validateVerificationToken = function(req, res){
|
||||||
res.status(200).send('User successfully verified');
|
res.status(200).send('User successfully verified');
|
||||||
}else {
|
}else {
|
||||||
// redirect to resend verification email
|
// 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){
|
exports.resendVerificationEmail = function(req, res, next){
|
||||||
nev.resendVerificationEmail(req.body.email, function(err, userFound) {
|
nev.resendVerificationEmail(req.body.email, function(err, userFound) {
|
||||||
if(err) {
|
if(err) {
|
||||||
|
console.log(errorHandler.getErrorMessage(err));
|
||||||
res.status(500).send( {message: errorHandler.getErrorMessage(err) } );
|
res.status(500).send( {message: errorHandler.getErrorMessage(err) } );
|
||||||
}else if (userFound){
|
}else if (userFound){
|
||||||
res.status(200).send('Verification email successfully Re-Sent');
|
res.status(200).send('Verification email successfully Re-Sent');
|
||||||
|
|
4
config/env/development.js
vendored
4
config/env/development.js
vendored
|
@ -47,9 +47,9 @@ module.exports = {
|
||||||
callbackURL: '/auth/github/callback'
|
callbackURL: '/auth/github/callback'
|
||||||
},
|
},
|
||||||
mailer: {
|
mailer: {
|
||||||
from: process.env.MAILER_FROM || '',
|
from: process.env.MAILER_FROM || 'no-reply@kioskform.herokuapp.com',
|
||||||
options: {
|
options: {
|
||||||
service: process.env.MAILER_SERVICE_PROVIDER || 'no-reply@kioskform.herokuapp.com',
|
service: process.env.MAILER_SERVICE_PROVIDER || '',
|
||||||
auth: {
|
auth: {
|
||||||
user: process.env.MAILER_EMAIL_ID || '',
|
user: process.env.MAILER_EMAIL_ID || '',
|
||||||
pass: process.env.MAILER_PASSWORD || ''
|
pass: process.env.MAILER_PASSWORD || ''
|
||||||
|
|
4
config/env/production.js
vendored
4
config/env/production.js
vendored
|
@ -65,9 +65,9 @@ module.exports = {
|
||||||
callbackURL: '/auth/github/callback'
|
callbackURL: '/auth/github/callback'
|
||||||
},
|
},
|
||||||
mailer: {
|
mailer: {
|
||||||
from: process.env.MAILER_FROM || '',
|
from: process.env.MAILER_FROM || 'no-reply@kioskform.herokuapp.com',
|
||||||
options: {
|
options: {
|
||||||
service: process.env.MAILER_SERVICE_PROVIDER || 'no-reply@kioskform.herokuapp.com',
|
service: process.env.MAILER_SERVICE_PROVIDER || '',
|
||||||
auth: {
|
auth: {
|
||||||
user: process.env.MAILER_EMAIL_ID || '',
|
user: process.env.MAILER_EMAIL_ID || '',
|
||||||
pass: process.env.MAILER_PASSWORD || ''
|
pass: process.env.MAILER_PASSWORD || ''
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
angular.module('users').controller('PasswordController', ['$scope', '$stateParams', '$state', 'User',
|
angular.module('users').controller('PasswordController', ['$scope', '$stateParams', '$state', 'User',
|
||||||
function($scope, $stateParams, $state, User) {
|
function($scope, $stateParams, $state, User) {
|
||||||
|
$scope.error = '';
|
||||||
|
|
||||||
// Submit forgotten password account id
|
// Submit forgotten password account id
|
||||||
$scope.askForPasswordReset = function() {
|
$scope.askForPasswordReset = function() {
|
||||||
|
|
|
@ -5,7 +5,7 @@ angular.module('users').controller('VerifyController', ['$scope', '$state', '$ro
|
||||||
|
|
||||||
$scope.isReset = false;
|
$scope.isReset = false;
|
||||||
$scope.credentials = {};
|
$scope.credentials = {};
|
||||||
|
$scope.error = '';
|
||||||
|
|
||||||
// Submit forgotten password account id
|
// Submit forgotten password account id
|
||||||
$scope.resendVerifyEmail = function() {
|
$scope.resendVerifyEmail = function() {
|
||||||
|
|
|
@ -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>
|
<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">
|
<div class="text-center form-group">
|
||||||
<button type="submit" class="btn btn-large btn-primary">
|
<button type="submit" class="btn btn-large btn-primary">
|
||||||
<a href="/#!/">Continue</a>
|
<a href="/#!/" style="color:white;">Continue</a>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue