Updated code used flow

This commit is contained in:
chrisw
2017-11-09 17:06:24 +00:00
parent 888ac5bf85
commit 04f6d0a5e0
2 changed files with 10 additions and 6 deletions

View File

@@ -56,8 +56,9 @@ def two_factor_email(token):
logged_in, msg = user_api_client.check_verify_code(user_id, token_data['secret_code'], "email")
if not logged_in:
flash("Theres something wrong with the code")
return redirect(url_for('.two_factor_email_sent'))
flash("This link has already been used")
session['user_details'] = {'id': user_id}
return redirect(url_for('.resend_email_link'))
return log_in_user(user_id)