Completion of forgot-password endpoints.

Start implementation for new-password endpoints.
Created PasswordResetToken model
ToDo: create and save token, send valid url to user,
check validity of token, update user's password, redirect to /two-factor.
This commit is contained in:
Rebecca Law
2016-01-05 17:52:09 +00:00
parent 6696426dbc
commit 2cb896fa81
15 changed files with 187 additions and 33 deletions

View File

@@ -0,0 +1,16 @@
from flask import request
from app.main import main
@main.route('/new-password/<token>', methods=['GET', 'POST'])
def new_password():
# Validate token
token = request.args.get('token')
# get password token (better name)
# is it expired
# add NewPasswordForm
# update password
# create password_token table (id, token, user_id, expiry_date
return 'Got here'