mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Turn on redirects for check_and_resend_verification_code
This is part of the work to make sure user is redirected to the page they initially were meant to visit after they sign in.
This commit is contained in:
@@ -39,10 +39,11 @@ def check_and_resend_text_code():
|
||||
def check_and_resend_verification_code():
|
||||
user = User.from_email_address(session['user_details']['email'])
|
||||
user.send_verify_code()
|
||||
redirect_url = request.args.get('next')
|
||||
if user.state == 'pending':
|
||||
return redirect(url_for('main.verify'))
|
||||
return redirect(url_for('main.verify', next=redirect_url))
|
||||
else:
|
||||
return redirect(url_for('main.two_factor'))
|
||||
return redirect(url_for('main.two_factor', next=redirect_url))
|
||||
|
||||
|
||||
@main.route('/email-not-received', methods=['GET'])
|
||||
|
||||
Reference in New Issue
Block a user