diff --git a/apps/audits/signal_handlers.py b/apps/audits/signal_handlers.py index 86a593c41..902c0896e 100644 --- a/apps/audits/signal_handlers.py +++ b/apps/audits/signal_handlers.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- # +import time + from django.db.models.signals import ( post_save, m2m_changed, pre_delete ) @@ -275,6 +277,7 @@ def on_user_auth_success(sender, user, request, login_type=None, **kwargs): check_different_city_login_if_need(user, request) data = generate_data(user.username, request, login_type=login_type) request.session['login_time'] = data['datetime'].strftime("%Y-%m-%d %H:%M:%S") + request.session["MFA_VERIFY_TIME"] = int(time.time()) data.update({'mfa': int(user.mfa_enabled), 'status': True}) write_login_log(**data)