Skip to content

Commit

Permalink
Change devise unlock strategy to :time
Browse files Browse the repository at this point in the history
Currently, we are using an unlock strategy of `:both`, which allows
both time based unlocking and email based unlocking. This leadds to
an email being sent to the user when their account is locked, which
us currently not intended.
  • Loading branch information
jayjay-w committed Jan 29, 2024
1 parent f5debd5 commit db7f042
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def http_auth_body

# Account lockout
config.lock_strategy = :failed_attempts
config.unlock_strategy = :both
config.unlock_strategy = :time
config.unlock_keys = [ :time ]
config.maximum_attempts = CheckConfig.get('devise_maximum_attempts', 5)
config.unlock_in = CheckConfig.get('devise_unlock_accounts_after', 1).hour
Expand Down

0 comments on commit db7f042

Please sign in to comment.