Browse Source

[fix]Email being sent after each failed login

version-14
B H Boma 8 years ago
parent
commit
8f68d252f0
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      frappe/twofactor.py

+ 1
- 0
frappe/twofactor.py View File

@@ -38,6 +38,7 @@ def get_cached_user_pass():

def authenticate_for_2factor(user):
'''Authenticate two factor for enabled user before login.'''
if frappe.form_dict.get('otp'):return
otp_secret = get_otpsecret_for_(user)
verification_method = frappe.db.get_value('System Settings', None, 'two_factor_method')
token = int(pyotp.TOTP(otp_secret).now())


Loading…
Cancel
Save