mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
adjust devise lock
This commit is contained in:
1 parent
800101f747
commit
a8433e9bd3
2 files changed
+3
-3
No files matched your search
@@ -33,7 +33,7 @@ class MfaSetupController < ApplicationController
|
||||
def destroy
|
||||
RateLimit.call("mfa-setup-otp-#{current_user.id}", limit: 5, ttl: 5.minutes, enabled: true)
|
||||
|
||||
if current_user.validate_and_consume_otp!(params[:otp_attempt])
|
||||
if current_user.valid_for_authentication? { current_user.validate_and_consume_otp!(params[:otp_attempt]) }
|
||||
current_user.update!(otp_required_for_login: false, otp_secret: nil)
|
||||
|
||||
redirect_to settings_profile_index_path, notice: I18n.t('2fa_has_been_removed')
|
||||
|
||||
Reference in new issue
Block a user