mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Validate email access based on code_type anot auth_type
when verifying the code is correct. This way if user has sms_auth and we send them verification code to validate their email access, and they click the link in the email, their access will be validated correctly.
This commit is contained in:
@@ -197,7 +197,7 @@ def verify_user_code(user_id):
|
||||
|
||||
user_to_verify.current_session_id = str(uuid.uuid4())
|
||||
user_to_verify.logged_in_at = datetime.utcnow()
|
||||
if user_to_verify.auth_type == 'email_auth':
|
||||
if data['code_type'] == 'email':
|
||||
user_to_verify.email_access_validated_at = datetime.utcnow()
|
||||
user_to_verify.failed_login_count = 0
|
||||
save_model_user(user_to_verify)
|
||||
|
||||
Reference in New Issue
Block a user