mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
Update two-factor to use new update password endpoint and refactor tests
This commit is contained in:
@@ -29,9 +29,7 @@ def two_factor():
|
||||
services = service_api_client.get_active_services({'user_id': str(user_id)}).get('data', [])
|
||||
# Check if coming from new password page
|
||||
if 'password' in session['user_details']:
|
||||
user.set_password(session['user_details']['password'])
|
||||
user.reset_failed_login_count()
|
||||
user_api_client.update_user(user)
|
||||
user_api_client.update_password(user.id, password=session['user_details']['password'])
|
||||
if user.is_locked():
|
||||
form.sms_code.errors.append('Code not found')
|
||||
return render_template('views/two-factor.html', form=form)
|
||||
|
||||
Reference in New Issue
Block a user