diff --git a/.gitignore b/.gitignore
index 5401c1ba..c7d74141 100755
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,8 @@ config/sslcerts/*.pem
access.log
#public/dist/
uploads/
+# API keys file
+api_keys.js
# Sublime editor
# ==============
diff --git a/app/controllers/users/users.verify.server.controller.js b/app/controllers/users/users.verify.server.controller.js
deleted file mode 100644
index 5e1455ad..00000000
--- a/app/controllers/users/users.verify.server.controller.js
+++ /dev/null
@@ -1,45 +0,0 @@
-'use strict';
-
-angular.module('users').controller('VerifyController', ['$scope', '$location', '$state', '$rootScope', 'User', 'Auth',
- function($scope, $location, $state, $rootScope, User, Auth) {
-
- $scope = $rootScope;
- $scope.credentials = {};
- $scope.error = null;
- $scope.success = null;
-
- // If user is signed in then redirect back home
- if ($scope.authentication.isAuthenticated()) $state.go('home');
-
- $scope.validateVerifyToken = function(){
- $scope.success = $scope.error = null;
- User.validateVerifyToken($stateParams.token).then(
- function(response){
- // If successful show success message and clear form
- $scope.success = response.message;
- $scope.passwordDetails = null;
- },
- function(error){
- $scope.error = error.message || error;
- $scope.passwordDetails = null;
- }
- );
- }
-
-
- // Submit forgotten password account id
- $scope.resendVerifyEmail = function() {
- User.resendVerifyEmail($scope.email).then(
- function(response){
- $scope.success = response.message;
- $scope.credentials = null;
- },
- function(error){
- $scope.error = error;
- $scope.credentials = null;
- }
- );
- };
-
- }
-]);
\ No newline at end of file
diff --git a/app/views/layout.server.view.html b/app/views/layout.server.view.html
index 98cc4cab..a6853f6e 100755
--- a/app/views/layout.server.view.html
+++ b/app/views/layout.server.view.html
@@ -54,7 +54,7 @@
-
+
diff --git a/config/config.js b/config/config.js
index c7ca3447..58c76cc6 100755
--- a/config/config.js
+++ b/config/config.js
@@ -13,7 +13,8 @@ var _ = require('lodash'),
*/
module.exports = _.extend(
require('./env/all'),
- require('./env/' + process.env.NODE_ENV) || {}
+ require('./env/' + process.env.NODE_ENV) || {},
+ require('./env/api_keys.js') || {}
);
/**
diff --git a/config/env/development.js b/config/env/development.js
index caea8d69..4433b42b 100755
--- a/config/env/development.js
+++ b/config/env/development.js
@@ -46,12 +46,12 @@ module.exports = {
callbackURL: '/auth/github/callback'
},
mailer: {
- from: process.env.MAILER_FROM || 'hi@example.com',
+ from: process.env.MAILER_FROM || '',
options: {
- service: process.env.MAILER_SERVICE_PROVIDER || 'Mandrill',
+ service: process.env.MAILER_SERVICE_PROVIDER || '',
auth: {
- user: process.env.MAILER_EMAIL_ID || 'hackouver@gmail.com',
- pass: process.env.MAILER_PASSWORD || 'ehOLuSXCBFxLjipRalBxVg'
+ user: process.env.MAILER_EMAIL_ID || '',
+ pass: process.env.MAILER_PASSWORD || ''
}
}
}
diff --git a/config/env/production.js b/config/env/production.js
index 9c0c11c8..4a8d6cbf 100755
--- a/config/env/production.js
+++ b/config/env/production.js
@@ -61,12 +61,12 @@ module.exports = {
callbackURL: '/auth/github/callback'
},
mailer: {
- from: process.env.MAILER_FROM || 'noreply@forms.polydaic.com',
+ from: process.env.MAILER_FROM || '',
options: {
- service: process.env.MAILER_SERVICE_PROVIDER || 'Mandrill',
+ service: process.env.MAILER_SERVICE_PROVIDER || '',
auth: {
- user: process.env.MAILER_EMAIL_ID || 'hackouver@gmail.com',
- pass: process.env.MAILER_PASSWORD || 'ehOLuSXCBFxLjipRalBxVg'
+ user: process.env.MAILER_EMAIL_ID || '',
+ pass: process.env.MAILER_PASSWORD || ''
}
}
}
diff --git a/config/env/secure.js b/config/env/secure.js
index e44b3166..cfc2da98 100755
--- a/config/env/secure.js
+++ b/config/env/secure.js
@@ -62,12 +62,12 @@ module.exports = {
callbackURL: 'https://localhost:443/auth/github/callback'
},
mailer: {
- from: process.env.MAILER_FROM || 'noreply@forms.polydaic.com',
+ from: process.env.MAILER_FROM || '',
options: {
- service: process.env.MAILER_SERVICE_PROVIDER || 'Mandrill',
+ service: process.env.MAILER_SERVICE_PROVIDER || '',
auth: {
- user: process.env.MAILER_EMAIL_ID || 'hackouver@gmail.com',
- pass: process.env.MAILER_PASSWORD || 'ehOLuSXCBFxLjipRalBxVg'
+ user: process.env.MAILER_EMAIL_ID || '',
+ pass: process.env.MAILER_PASSWORD || ''
}
}
}
diff --git a/fig.yml b/fig.yml
deleted file mode 100755
index 967ac7d1..00000000
--- a/fig.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-web:
- build: .
- links:
- - db
- ports:
- - "3000:3000"
- environment:
- NODE_ENV: development
-db:
- image: mongo
- ports:
- - "27017:27017"
diff --git a/gruntfile.js b/gruntfile.js
index e4e7b0c4..1e359da0 100755
--- a/gruntfile.js
+++ b/gruntfile.js
@@ -131,10 +131,13 @@ module.exports = function(grunt) {
},
env: {
test: {
- NODE_ENV: 'test'
+ NODE_ENV: 'test',
},
secure: {
NODE_ENV: 'secure'
+ },
+ options: {
+ src: 'ENV.json'
}
},
mochaTest: {
diff --git a/public/dist/application.min.css b/public/dist/application.min.css
index 5baa926a..a7fa9b27 100644
--- a/public/dist/application.min.css
+++ b/public/dist/application.min.css
@@ -1 +1 @@
-.navbar-inverse{background-color:#fafafa;border:0}.navbar .navbar-brand{font-size:1.6em;font-weight:900;color:#ff8383}.navbar .navbar-brand:hover,.navbar .navbar-brand:visited{color:#FA787E}.navbar li.dropdown a.dropdown-toggle:hover>*{color:#000}.navbar li.dropdown a.dropdown-toggle>*{color:#d9d9d9}.navbar li.dropdown.open a.dropdown-toggle:hover>*{color:#fff}.navbar .navbar-brand span{text-decoration:underline}.nav.navbar-nav.navbar-right li{padding-right:20px}.content{margin-top:70px}.undecorated-link:hover{text-decoration:none}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}.ng-invalid.ng-dirty{border-color:#FA787E}.ng-valid.ng-dirty{border-color:#78FA89}.browsehappy.jumbotron.hide,body.ng-cloak{display:block}section.hero-section{width:100%}section.hero-section .jumbotron{background-color:transparent;color:#fff}.image-background{position:absolute;top:0;left:0;height:230%;width:100%;z-index:-98;background-image:url(http://yourplaceandmine.ie/wp-content/uploads/2014/09/Daingean-meeting-048_13-1080x675.jpg);background-repeat:no-repeat;background-position:0 50%;background-size:cover}.opacity-background{position:absolute;top:0;left:0;height:230%;width:100%;background-color:rgba(0,0,0,.5);z-index:-97}section.hero-section .jumbotron .signup-btn{background-color:#FA787E;border:none;font-size:2em;padding:.3em .9em;color:#fff;background-color:rgba(250,120,126,.65) #FA787E}.row-height{display:table;table-layout:fixed;height:100%;width:100%}.col-height{display:table-cell;float:none;height:100%}.col-top{vertical-align:top}.col-middle{vertical-align:middle}.col-bottom{vertical-align:bottom}@media (min-width:480px){.row-xs-height{display:table;table-layout:fixed;height:100%;width:100%}.col-xs-height{display:table-cell;float:none;height:100%}.col-xs-top{vertical-align:top}.col-xs-middle{vertical-align:middle}.col-xs-bottom{vertical-align:bottom}}@media (min-width:768px){.row-sm-height{display:table;table-layout:fixed;height:100%;width:100%}.col-sm-height{display:table-cell;float:none;height:100%}.col-sm-top{vertical-align:top}.col-sm-middle{vertical-align:middle}.col-sm-bottom{vertical-align:bottom}}@media (min-width:992px){.row-md-height{display:table;table-layout:fixed;height:100%;width:100%}.col-md-height{display:table-cell;float:none;height:100%}.col-md-top{vertical-align:top}.col-md-middle{vertical-align:middle}.col-md-bottom{vertical-align:bottom}}@media (min-width:1200px){.row-lg-height{display:table;table-layout:fixed;height:100%;width:100%}.col-lg-height{display:table-cell;float:none;height:100%}.col-lg-top{vertical-align:top}.col-lg-middle{vertical-align:middle}.col-lg-bottom{vertical-align:bottom}}.btn{border:1px solid #c6c6c6!important}form .row.field{padding:1em 0 3em}form .row.field>.field-title{margin-top:.5em;font-size:1.5em}form.submission-form .row.field.statement>.field-title{font-size:1.7em}form.submission-form .row.field.statement>.field-input{font-size:1.2em;color:#ddd}form.submission-form .select.radio>.field-input input,form.submission-form .select>.field-input input{width:20%}form.submission-form .select>.field-input .btn{text-align:left;margin-bottom:.7em}form.submission-form .select>.field-input .btn>span{font-size:1.1em}form.submission-form .row.field>.field-input input{width:100%}form.submission-form .row.field .field-input>input:focus{font-size:1em}form .row.field.textfield>.field-input>input{padding:.45em .9em;width:100%;line-height:160%}form .row.field.dropdown>.field-input{height:34px;overflow:hidden}form .row.field.dropdown>.field-input>select{padding:.45em .9em;width:100%;background:0 0;font-size:16px;border:1px solid #ccc;height:34px}div.config-form>.row{padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05);width:90%}div.config-form>.row>.container:nth-of-type(odd){border-right:1px #ddd solid}div.config-form .row>.field-input{padding-top:1.2em;padding-left:.1em}div.config-form .row>.field-input label{padding-left:1.3em;display:block}.admin-form>.page-header{padding-bottom:0;margin-bottom:40px}.admin-form>.page-header h1{margin-bottom:0}.admin-form>.page-header>.col-xs-3{padding-top:1.4em}.admin-form .form-controls .row{padding:5px}.admin-form .page-header{border:none}.admin-form .tab-content{padding-top:3em}.admin-form .panel-heading{background-color:#f1f1f1}.admin-form .panel-heading:hover{background-color:#fff;cursor:pointer}.admin-form .panel-heading a:hover{text-decoration:none}.current-fields .tool-panel>.panel-default:hover{border-color:#9d9d9d;cursor:pointer}.current-fields .tool-panel>.panel-default .panel-heading{background-color:#fff;color:#9d9d9d!important}.current-fields .tool-panel>.panel-default .panel-heading:hover{background-color:#eee;color:#000!important;cursor:pointer}.current-fields .tool-panel>.panel-default .panel-heading a{color:inherit}.current-fields .tool-panel>.panel-default .panel-heading a:hover{text-decoration:none}.admin-form .add-field{background-color:#ddd}.admin-form .add-field .col-xs-6{padding:.25em .4em}.admin-form .add-field .col-xs-6 .panel-heading{border-width:1px;border-style:solid;border-color:#bbb;border-radius:4px}.status-light{padding-left:.6em}.status-light.status-light-off{color:#BE0000}.status-light.status-light-on{color:#3C0}section>section.ng-scope{padding:0 60px 20px}.form-item.row{text-align:center;border-bottom:6px inset #ccc;background-color:#eee;width:180px;height:215px;margin-bottom:45px}.form-item.row.create-new{background-color:#838383;color:#fff}.form-item.row.create-new.new-form{background-color:#ff8383;z-index:11}.form-item.row.create-new.new-form:hover{background-color:#ff6464}.form-item.new-form a.btn{font-size:.95em}.overlay{position:absolute;top:0;left:0;height:193%;width:inherit;background-color:rgba(0,0,0,.5);z-index:10}.form-item.row.create-new:hover,.form-item.row:hover{border-bottom:8px inset #ccc;background-color:#d9d9d9}.form-item.row.create-new:hover{background-color:#515151}.form-item.row>.title-row{position:relative;top:15px;padding-top:3em;padding-bottom:3.65em}.form-item.row>.title-row h4{font-size:1.3em}.form-item.row.create-new>.title-row{padding:0}.form-item.row.create-new>.title-row h4{font-size:7em}.form-item.row>.details-row{margin-top:3.2em}.form-item.row>.details-row small{font-size:.6em}.form-item.row.create-new>.details-row small{font-size:.95em}@media (min-width:992px){.nav-users{position:fixed}}.remove-account-container{display:inline-block;position:relative}.btn-remove-account{top:10px;right:10px;position:absolute}section.auth{margin-top:5em}section.auth>h3{font-size:3em;font-weight:500;color:#777}section.auth.signup-view>h3{font-size:4.4em;padding-bottom:.5em}
\ No newline at end of file
+.navbar-inverse{background-color:#fafafa;border:0}.navbar .navbar-brand{font-size:1.6em;font-weight:900;color:#ff8383}.navbar .navbar-brand:hover,.navbar .navbar-brand:visited{color:#FA787E}.navbar li.dropdown a.dropdown-toggle:hover>*{color:#000}.navbar li.dropdown a.dropdown-toggle>*{color:#d9d9d9}.navbar li.dropdown.open a.dropdown-toggle:hover>*{color:#fff}.navbar .navbar-brand span{text-decoration:underline}.nav.navbar-nav.navbar-right li{padding-right:20px}.content{margin-top:70px}.undecorated-link:hover{text-decoration:none}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}.ng-invalid.ng-dirty{border-color:#FA787E}.ng-valid.ng-dirty{border-color:#78FA89}.browsehappy.jumbotron.hide,body.ng-cloak{display:block}section.hero-section{width:100%}section.hero-section .jumbotron{background-color:transparent;color:#fff}.image-background{position:absolute;top:0;left:0;height:230%;width:100%;z-index:-98;background-image:url(http://yourplaceandmine.ie/wp-content/uploads/2014/09/Daingean-meeting-048_13-1080x675.jpg);background-repeat:no-repeat;background-position:0 50%;background-size:cover}.opacity-background{position:absolute;top:0;left:0;height:230%;width:100%;background-color:rgba(0,0,0,.5);z-index:-97}section.hero-section .jumbotron .signup-btn{background-color:#FA787E;border:none;font-size:2em;padding:.3em .9em;color:#fff;background-color:rgba(250,120,126,.65) #FA787E}.row-height{display:table;table-layout:fixed;height:100%;width:100%}.col-height{display:table-cell;float:none;height:100%}.col-top{vertical-align:top}.col-middle{vertical-align:middle}.col-bottom{vertical-align:bottom}@media (min-width:480px){.row-xs-height{display:table;table-layout:fixed;height:100%;width:100%}.col-xs-height{display:table-cell;float:none;height:100%}.col-xs-top{vertical-align:top}.col-xs-middle{vertical-align:middle}.col-xs-bottom{vertical-align:bottom}}@media (min-width:768px){.row-sm-height{display:table;table-layout:fixed;height:100%;width:100%}.col-sm-height{display:table-cell;float:none;height:100%}.col-sm-top{vertical-align:top}.col-sm-middle{vertical-align:middle}.col-sm-bottom{vertical-align:bottom}}@media (min-width:992px){.row-md-height{display:table;table-layout:fixed;height:100%;width:100%}.col-md-height{display:table-cell;float:none;height:100%}.col-md-top{vertical-align:top}.col-md-middle{vertical-align:middle}.col-md-bottom{vertical-align:bottom}}@media (min-width:1200px){.row-lg-height{display:table;table-layout:fixed;height:100%;width:100%}.col-lg-height{display:table-cell;float:none;height:100%}.col-lg-top{vertical-align:top}.col-lg-middle{vertical-align:middle}.col-lg-bottom{vertical-align:bottom}}.btn{border:1px solid #c6c6c6!important}form .row.field{padding:1em 0 3em}form .row.field>.field-title{margin-top:.5em;font-size:1.5em}form.submission-form .row.field.statement>.field-title{font-size:1.7em}form.submission-form .row.field.statement>.field-input{font-size:1.2em;color:#ddd}form.submission-form .select.radio>.field-input input,form.submission-form .select>.field-input input{width:20%}form.submission-form .select>.field-input .btn{text-align:left;margin-bottom:.7em}form.submission-form .select>.field-input .btn>span{font-size:1.1em}form.submission-form .row.field>.field-input input{width:100%}form.submission-form .row.field .field-input>input:focus{font-size:1em}form .row.field.textfield>.field-input>input{padding:.45em .9em;width:100%;line-height:160%}form .row.field.dropdown>.field-input{height:34px;overflow:hidden}form .row.field.dropdown>.field-input>select{padding:.45em .9em;width:100%;background:0 0;font-size:16px;border:1px solid #ccc;height:34px}div.config-form>.row{padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05);width:90%}div.config-form>.row>.container:nth-of-type(odd){border-right:1px #ddd solid}div.config-form .row>.field-input{padding-top:1.2em;padding-left:.1em}div.config-form .row>.field-input label{padding-left:1.3em;display:block}.admin-form>.page-header{padding-bottom:0;margin-bottom:40px}.admin-form>.page-header h1{margin-bottom:0}.admin-form>.page-header>.col-xs-3{padding-top:1.4em}.admin-form .form-controls .row{padding:5px}.admin-form .page-header{border:none}.admin-form .tab-content{padding-top:3em}.admin-form .panel-heading{background-color:#f1f1f1}.admin-form .panel-heading:hover{background-color:#fff;cursor:pointer}.admin-form .panel-heading a:hover{text-decoration:none}.current-fields .tool-panel>.panel-default:hover{border-color:#9d9d9d;cursor:pointer}.current-fields .tool-panel>.panel-default .panel-heading{background-color:#fff;color:#9d9d9d!important}.current-fields .tool-panel>.panel-default .panel-heading:hover{background-color:#eee;color:#000!important;cursor:pointer}.current-fields .tool-panel>.panel-default .panel-heading a{color:inherit}.current-fields .tool-panel>.panel-default .panel-heading a:hover{text-decoration:none}.admin-form .add-field{background-color:#ddd}.admin-form .add-field .col-xs-6{padding:.25em .4em}.admin-form .add-field .col-xs-6 .panel-heading{border-width:1px;border-style:solid;border-color:#bbb;border-radius:4px}.status-light{padding-left:.6em}.status-light.status-light-off{color:#BE0000}.status-light.status-light-on{color:#3C0}section>section.public-form{padding:0 6em 7em}.form-item.row{text-align:center;border-bottom:6px inset #ccc;background-color:#eee;width:180px;height:215px;margin-bottom:45px}.form-item.row.create-new{background-color:#838383;color:#fff}.form-item.row.create-new.new-form{background-color:#ff8383;z-index:11}.form-item.row.create-new.new-form:hover{background-color:#ff6464}.form-item.new-form a.btn{font-size:.95em}.overlay{position:absolute;top:0;left:0;height:193%;width:inherit;background-color:rgba(0,0,0,.5);z-index:10}.form-item.row.create-new:hover,.form-item.row:hover{border-bottom:8px inset #ccc;background-color:#d9d9d9}.form-item.row.create-new:hover{background-color:#515151}.form-item.row>.title-row{position:relative;top:15px;padding-top:3em;padding-bottom:3.65em}.form-item.row>.title-row h4{font-size:1.3em}.form-item.row.create-new>.title-row{padding:0}.form-item.row.create-new>.title-row h4{font-size:7em}.form-item.row>.details-row{margin-top:3.2em}.form-item.row>.details-row small{font-size:.6em}.form-item.row.create-new>.details-row small{font-size:.95em}@media (min-width:992px){.nav-users{position:fixed}}.remove-account-container{display:inline-block;position:relative}.btn-remove-account{top:10px;right:10px;position:absolute}section.auth{margin-top:5em}section.auth>h3{font-size:3em;font-weight:500;color:#777}section.auth.signup-view>h3{font-size:4.4em;padding-bottom:.5em}
\ No newline at end of file
diff --git a/public/modules/users/config/users.client.config.js b/public/modules/users/config/users.client.config.js
index e69bd0db..4dd19603 100755
--- a/public/modules/users/config/users.client.config.js
+++ b/public/modules/users/config/users.client.config.js
@@ -6,7 +6,7 @@ angular.module('users').config(['$httpProvider',
$httpProvider.interceptors.push(function($q, $location) {
return {
responseError: function(response) {
- if( $location.path() !== '/users/me' && $location.path() !== '/' && $location.path() !== '/signup' && response.config){
+ if( $location.path() !== '/verify' && $location.path() !== '/users/me' && $location.path() !== '/' && $location.path() !== '/signup' && response.config){
console.log('intercepted rejection of ', response.config.url, response.status);
if (response.status === 401) {
diff --git a/public/modules/users/controllers/authentication.client.controller.js b/public/modules/users/controllers/authentication.client.controller.js
index 05906fc3..46fc8e54 100755
--- a/public/modules/users/controllers/authentication.client.controller.js
+++ b/public/modules/users/controllers/authentication.client.controller.js
@@ -49,20 +49,5 @@ angular.module('users').controller('AuthenticationController', ['$scope', '$loca
);
};
-
- // Submit forgotten password account id
- $scope.resendVerifyEmail = function() {
- User.resendVerifyEmail($scope.email).then(
- function(response){
- $scope.success = response.message;
- $scope.credentials = null;
- },
- function(error){
- $scope.error = error;
- $scope.credentials = null;
- }
- );
- };
-
}
]);
\ No newline at end of file
diff --git a/public/modules/users/controllers/verify.client.controller.js b/public/modules/users/controllers/verify.client.controller.js
new file mode 100644
index 00000000..c59ffe8d
--- /dev/null
+++ b/public/modules/users/controllers/verify.client.controller.js
@@ -0,0 +1,46 @@
+'use strict';
+
+angular.module('users').controller('VerifyController', ['$scope', '$state', '$rootScope', 'User', 'Auth', '$stateParams',
+ function($scope, $state, $rootScope, User, Auth, $stateParams) {
+ if($rootScope.authetication.isAuthenticated){
+ $state.go('home');
+ }
+
+ $scope.isReset = false;
+
+ // Submit forgotten password account id
+ $scope.resendVerifyEmail = function() {
+ User.resendVerifyEmail($scope.email).then(
+ function(response){
+ $scope.success = response.message;
+ $scope.credentials = null;
+ },
+ function(error){
+ $scope.error = error;
+ $scope.credentials = null;
+ }
+ );
+ };
+
+ //Validate Verification Token
+ $scope.validateVerifyToken = function() {
+ if($stateParams.token){
+ console.log($stateParams.token);
+ User.validateVerifyToken($stateParams.token).then(
+ function(response){
+ console.log('Success: '+response.message);
+ $scope.success = response.message;
+ $scope.isReset = true;
+ $scope.credentials = null;
+ },
+ function(error){
+ console.log('Error: '+error.message);
+ $scope.isReset = false;
+ $scope.error = error;
+ $scope.credentials = null;
+ }
+ );
+ }
+ }
+ }
+]);
\ No newline at end of file
diff --git a/public/modules/users/services/user.js b/public/modules/users/services/user.js
index 5500d99e..d4b0be57 100644
--- a/public/modules/users/services/user.js
+++ b/public/modules/users/services/user.js
@@ -56,9 +56,8 @@ angular.module('users').factory('User', ['$window', '$q', '$timeout', '$http', '
resendVerifyEmail: function(email) {
var deferred = $q.defer();
- $http.post('/auth/verify/'+token, email).success(function(response) {
-
- deferred.resolve();
+ $http.post('/auth/verify/', {email: email}).success(function(response) {
+ deferred.resolve(response);
}).error(function(error) {
deferred.reject(error.message || error);
});
@@ -66,6 +65,17 @@ angular.module('users').factory('User', ['$window', '$q', '$timeout', '$http', '
return deferred.promise;
},
+ validateVerifyToken: function(token) {
+ var deferred = $q.defer();
+ $http.get('/auth/verify/'+token).success(function(response) {
+ deferred.resolve(response);
+ }).error(function(error) {
+ deferred.reject(error);
+ });
+
+ return deferred.promise;
+ },
+
resetPassword: function(passwordDetails, token) {
var deferred = $q.defer();
$http.get('/auth/password/'+token, passwordDetails).success(function(response) {
diff --git a/public/modules/users/views/authentication/signup-success.client.view.html b/public/modules/users/views/authentication/signup-success.client.view.html
index e6bc3b9f..84fa5237 100755
--- a/public/modules/users/views/authentication/signup-success.client.view.html
+++ b/public/modules/users/views/authentication/signup-success.client.view.html
@@ -24,8 +24,9 @@
Before you continue, make sure to check your email for our verification email. If you don't receive it within 24h drop us a line at hi@medforms.com
-
+
+ Continue
+
+
\ No newline at end of file
diff --git a/public/modules/users/views/verify/verify-account.client.view.html b/public/modules/users/views/verify/verify-account.client.view.html
index e637a438..7ba1e4b8 100644
--- a/public/modules/users/views/verify/verify-account.client.view.html
+++ b/public/modules/users/views/verify/verify-account.client.view.html
@@ -1,14 +1,14 @@
-
- Password successfully reset
- Continue to home page
-
+
+ Password successfully reset
+ Continue to home page
+
-
- Verification link is invalid or has expired
- Resend your verification email
- Signin to your account
-
+
+ Verification link is invalid or has expired
+ Resend your verification email
+ Signin to your account
+
\ No newline at end of file
diff --git a/test.js b/test.js
deleted file mode 100644
index 95b0a9d5..00000000
--- a/test.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var nodemailer = require('nodemailer'),
-config = require('./config/config');
-console.log('Start script');
-
-var transporter = nodemailer.createTransport(config.mailer.options);
-
-var verifyMailOptions = {
- to: '1nsphq+9hg2ghgtblstc@sharklasers.com',
- from: 'Do Not Reply ',
- subject: 'Confirm your account',
- html: 'Please verify your account by clicking this link . If you are unable to do so, copy and ' +
- 'paste the following link into your browser:
${URL}
',
- text: 'Please verify your account by clicking the following link, or by copying and pasting it into your browser: ${URL}'
- };
-
-transporter.sendMail(verifyMailOptions , function(err, info){
- if (err) console.log(err.message);
- else console.log(info.response);
-
-});