109638656: Send sms code from sign-in post.

This commit is contained in:
Rebecca Law
2015-12-08 09:21:51 +00:00
parent eae2756a5e
commit c946f85f9d
5 changed files with 41 additions and 30 deletions

View File

@@ -1,4 +1,5 @@
from flask import render_template, redirect, jsonify
from flask_login import login_user
from app.main import main
from app.main.forms import TwoFactorForm
@@ -14,6 +15,7 @@ def process_two_factor():
form = TwoFactorForm()
if form.validate_on_submit():
login_user(user)
return redirect('/dashboard')
else:
return jsonify(form.errors), 400