Skip to content

Commit f556096

Browse files
committed
Doc: Fix errors in code
1 parent 714439d commit f556096

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

two_factor_authentication/twilio_verify_2fa.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,6 @@ from app.twilio_verify_api import check_verification_token
400400

401401

402402
@app.route('/verify-2fa', methods=['GET', 'POST'])
403-
@login_required
404403
def verify_2fa():
405404
"""
406405
Verify the token received
@@ -416,7 +415,7 @@ def verify_2fa():
416415
flash('You have enabled 2FA.', 'success')
417416
return redirect(url_for('user', username=current_user.username))
418417
else:
419-
username = session.get('username')
418+
username = session['username']
420419
del session['username']
421420
user = User.query.filter_by(username=username).first()
422421
next_page = request.args.get('next')

0 commit comments

Comments
 (0)