Skip to content

Commit

Permalink
add devise autolock logic to dockerfile (#3724)
Browse files Browse the repository at this point in the history
* add devise autolock logic to dockerfile

* rubocop fix
  • Loading branch information
jacobkagon committed May 15, 2024
1 parent 8070615 commit aaebe6b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .docker/config/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,10 @@
# When using omniauth, Devise cannot automatically set Omniauth path,
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = '/my_engine/users/auth'
user_account_lock_period = 60
unless ENV['DEVISE_USER_INACTIVITY_LOCK_PERIOD_IN_DAYS'].blank?
period_in_days_env = ENV['DEVISE_USER_INACTIVITY_LOCK_PERIOD_IN_DAYS']
user_account_lock_period = period_in_days_env.to_i
end
config.expire_after = user_account_lock_period.days
end

0 comments on commit aaebe6b

Please sign in to comment.