Added support for two-step authentication. The login function will

now email a 6-digit code to users if the user is part of a group
with role 'web2py TWo-Step Authentication'.
This commit is contained in:
ortgit
2014-04-27 01:39:51 -04:00
parent 53ecc17b57
commit 87edbccf5b
2 changed files with 233 additions and 126 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
<div id="web2py_user_form">
{{
if request.args(0)=='login':
if request.args(0)=='login' and not session.auth_2_factor_user:
if not 'register' in auth.settings.actions_disabled:
form.add_button(T('Register'),URL(args='register', vars={'_next': request.vars._next} if request.vars._next else None),_class='btn')
pass