remove angular from user account creation flows
This commit is contained in:
@ -156,7 +156,7 @@ module.exports = function(User) {
|
|||||||
req.flash('errors', {
|
req.flash('errors', {
|
||||||
msg: 'Invalid username or password.'
|
msg: 'Invalid username or password.'
|
||||||
});
|
});
|
||||||
return res.redirect('/');
|
return res.redirect('/email-signin');
|
||||||
});
|
});
|
||||||
|
|
||||||
User.afterRemote('logout', function(ctx, result, next) {
|
User.afterRemote('logout', function(ctx, result, next) {
|
||||||
|
@ -201,9 +201,6 @@ module.exports = function(app) {
|
|||||||
req.assert('password', 'Password must be at least 4 characters long')
|
req.assert('password', 'Password must be at least 4 characters long')
|
||||||
.len(4);
|
.len(4);
|
||||||
|
|
||||||
req.assert('confirmPassword', 'Passwords do not match')
|
|
||||||
.equals(req.body.password);
|
|
||||||
|
|
||||||
var errors = req.validationErrors();
|
var errors = req.validationErrors();
|
||||||
|
|
||||||
if (errors) {
|
if (errors) {
|
||||||
|
@ -1,27 +1,19 @@
|
|||||||
extends ../layout
|
extends ../layout
|
||||||
block content
|
block content
|
||||||
.jumbotron.text-center(ng-controller="emailSignInController")
|
.jumbotron.text-center
|
||||||
h2 Sign in with an email address here:
|
.row
|
||||||
form(method='POST', action='/api/users/login')
|
.col-xs-12
|
||||||
input(type='hidden', name='_csrf', value=_csrf)
|
h2 Sign in with an email address here:
|
||||||
.col-sm-6.col-sm-offset-3
|
.col-sm-6.col-sm-offset-3
|
||||||
.form-group
|
form(method='POST', action='/api/users/login')
|
||||||
input.form-control(type='email', name='email', id='email', placeholder='Email', ng-model='email', autofocus=true)
|
input(type='hidden', name='_csrf', value=_csrf)
|
||||||
| {{ $scope.email }}
|
.form-group
|
||||||
.form-group
|
input.input-lg.form-control(type='email', name='email', id='email', placeholder='Email', autofocus=true)
|
||||||
input.form-control(type='password', name='password', id='password', placeholder='Password', ng-model='password')
|
.form-group
|
||||||
.form-group
|
input.input-lg.form-control(type='password', name='password', id='password', placeholder='Password')
|
||||||
button.btn.btn-primary(type='submit')
|
button.btn.btn-primary.btn-lg.btn-block(type='submit')
|
||||||
span.ion-android-hand
|
span.ion-android-hand
|
||||||
| Login
|
| Login
|
||||||
span   
|
.button-spacer
|
||||||
a.btn.btn-info(href='/forgot') Forgot your password?
|
.button-spacer
|
||||||
br
|
a.btn.btn-info.btn-lg.btn-block(href='/forgot') Forgot your password?
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
|
@ -1,51 +1,18 @@
|
|||||||
extends ../layout
|
extends ../layout
|
||||||
block content
|
block content
|
||||||
|
script.
|
||||||
|
var challengeName = 'Email Signup'
|
||||||
.jumbotron.text-center
|
.jumbotron.text-center
|
||||||
h2 Sign up with an email address here:
|
h2 Sign up with an email address here:
|
||||||
form.form-horizontal(method='POST', action='/api/users', name="signupForm", novalidate="novalidate")
|
form.form-horizontal(method='POST', action='/api/users', name="signupForm")
|
||||||
input(type='hidden', name='_csrf', value=_csrf)
|
.row
|
||||||
.form-group
|
.col-sm-6.col-sm-offset-3
|
||||||
.col-sm-6.col-sm-offset-3
|
input(type='hidden', name='_csrf', value=_csrf)
|
||||||
input.form-control(type='email', ng-model='email', ng-keypress='', name='email', id='email', placeholder='email', autofocus, required, autocomplete="off", unique-email='')
|
.form-group
|
||||||
.col-sm-6.col-sm-offset-3(ng-cloak, ng-show="signupForm.email.$error.required && !signupForm.email.$pristine")
|
input.input-lg.form-control(type='email', name='email', id='email', placeholder='email', autofocus, required, autocomplete="off")
|
||||||
alert(type='danger')
|
.form-group
|
||||||
span.ion-close-circled
|
input.input-lg.form-control(type='password', name='password', id='password', placeholder='password', required, pattern=".{8,50}", title="Must be at least 8 characters and no longer than 50 characters.")
|
||||||
| Your email address is required.
|
.form-group
|
||||||
.col-sm-6.col-sm-offset-3(ng-cloak, ng-show="signupForm.$error.email && !signupForm.email.$pristine")
|
button.btn.btn-lg.btn-success.btn-block(type='submit')
|
||||||
alert(type='danger')
|
span.ion-person-add
|
||||||
span.ion-close-circled
|
| Signup
|
||||||
| Please enter a valid email format.
|
|
||||||
.col-sm-6.col-sm-offset-3(ng-cloak, ng-show="signupForm.email.$error.unique && !signupForm.email.$pristine")
|
|
||||||
alert(type='danger')
|
|
||||||
span.ion-close-circled
|
|
||||||
| That email address is already in use.
|
|
||||||
.form-group
|
|
||||||
.col-sm-6.col-sm-offset-3
|
|
||||||
input.form-control(type='password', ng-model='password', name='password', id='password', placeholder='password', required, ng-minlength=8)
|
|
||||||
.col-sm-6.col-sm-offset-3(ng-cloak, ng-show="signupForm.password.$error.minlength && !signupForm.password.$pristine")
|
|
||||||
alert(type='danger')
|
|
||||||
span.ion-close-circled
|
|
||||||
| Your password must be at least 8 characters long.
|
|
||||||
.form-group
|
|
||||||
.col-sm-6.col-sm-offset-3
|
|
||||||
input.form-control(type='password', ng-model='confirmPassword', name='confirmPassword', id='confirmPassword', placeholder='confirm password', required, ng-minlength=5)
|
|
||||||
.col-sm-6.col-sm-offset-3(ng-cloak, ng-show="(confirmPassword !== password) && !signupForm.confirmPassword.$pristine")
|
|
||||||
alert(type='danger')
|
|
||||||
span.ion-close-circled
|
|
||||||
| Passwords must match.
|
|
||||||
.form-group
|
|
||||||
.col-sm-6.col-sm-offset-3
|
|
||||||
button.btn.btn-success(type='submit', ng-disabled='signupForm.$invalid')
|
|
||||||
span.ion-person-add
|
|
||||||
| Signup
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
br
|
|
||||||
script.
|
|
||||||
var challengeName = 'Email Signup'
|
|
||||||
|
@ -3,14 +3,13 @@ extends ../layout
|
|||||||
block content
|
block content
|
||||||
.col-sm-8.col-sm-offset-2.jumbotron
|
.col-sm-8.col-sm-offset-2.jumbotron
|
||||||
form(method='POST', action="/forgot")
|
form(method='POST', action="/forgot")
|
||||||
h1 Forgot Password
|
h2.text-center Forgot Password Reset
|
||||||
input(type='hidden', name='_csrf', value=_csrf)
|
input(type='hidden', name='_csrf', value=_csrf)
|
||||||
.form-group
|
.form-group
|
||||||
p Enter your email address below and we will send you password reset instructions.
|
p Enter your email address. We'll send you password reset instructions.
|
||||||
label.control-label(for='email') Email
|
input.form-control.input-lg(type='email', name='email', id='email', placeholder='Email', autofocus=true required)
|
||||||
input.form-control(type='email', name='email', id='email', placeholder='Email', autofocus=true)
|
|
||||||
.form-group
|
.form-group
|
||||||
button.btn.btn-primary(type='submit')
|
button.btn.btn-primary.btn-lg.btn-block(type='submit')
|
||||||
i.fa.fa-key
|
i.fa.fa-key
|
||||||
| Reset Password
|
| Reset Password
|
||||||
|
|
||||||
|
@ -19,6 +19,6 @@ block content
|
|||||||
| Sign in with LinkedIn
|
| Sign in with LinkedIn
|
||||||
br
|
br
|
||||||
p
|
p
|
||||||
a(href="/email-signup") Or sign up using your email address here.
|
a(href="/email-signin") Or sign in to your existing account with your email address and password here.
|
||||||
p
|
p
|
||||||
a(href="/email-signin") Sign in to your existing account with your email address here.
|
a(href="/email-signup") Or sign up using your email address here (you'll need to remember a password).
|
||||||
|
Reference in New Issue
Block a user