mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
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:
16
app/main/views/new_password.py
Normal file
16
app/main/views/new_password.py
Normal 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'
|
||||
Reference in New Issue
Block a user