From 1ce8170ce175bcbbdef85322fd8b188924a9a715 Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Thu, 10 Dec 2015 16:38:34 +0000 Subject: [PATCH] 109526036:Mark the sms code as being used on the two-factor page --- app/main/views/two_factor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main/views/two_factor.py b/app/main/views/two_factor.py index 093bd6a51..dc01a722b 100644 --- a/app/main/views/two_factor.py +++ b/app/main/views/two_factor.py @@ -2,7 +2,7 @@ from flask import render_template, redirect, jsonify, session from flask_login import login_user from app.main import main -from app.main.dao import users_dao +from app.main.dao import users_dao, verify_codes_dao from app.main.forms import TwoFactorForm @@ -17,6 +17,7 @@ def process_two_factor(): if form.validate_on_submit(): user = users_dao.get_user_by_id(session['user_id']) + verify_codes_dao.use_code_for_user_and_type(user_id=user.id, code_type='sms') login_user(user) return redirect('/dashboard') else: