Configured Devise to lock accounts for a certain time
This commit is contained in:
parent
b1bd655998
commit
927fa71266
1 changed files with 17 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ Devise.setup do |config|
|
|||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||
# note that it will be overwritten if you use your own mailer class
|
||||
# with default "from" parameter.
|
||||
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
||||
config.mailer_sender = 'webmaster@screenshots.debian.net'
|
||||
|
||||
# Configure the class responsible to send e-mails.
|
||||
# config.mailer = 'Devise::Mailer'
|
||||
|
|
@ -165,6 +165,22 @@ Devise.setup do |config|
|
|||
|
||||
# Defines which key will be used when locking and unlocking an account
|
||||
# config.unlock_keys = [:email]
|
||||
# Defines which strategy will be used to lock an account.
|
||||
config.lock_strategy = :failed_attempts
|
||||
|
||||
# Defines which key will be used when locking and unlocking an account
|
||||
config.unlock_keys = [ :time ]
|
||||
|
||||
# Defines which strategy will be used to unlock an account.
|
||||
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
||||
config.unlock_strategy = :time
|
||||
|
||||
# Number of authentication tries before locking an account if lock_strategy
|
||||
# is failed attempts.
|
||||
config.maximum_attempts = 10
|
||||
|
||||
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
||||
config.unlock_in = 1.hours
|
||||
|
||||
# Defines which strategy will be used to unlock an account.
|
||||
# :email = Sends an unlock link to the user email
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue