Devise lockable – How to unlock account using unlock_in

Let me post what I have done first:

config.lock_strategy = :failed_attempt
config.unlock_keys = [ :email ]
config.unlock_strategy = :both
config.maximum_attempts = 10
config.unlock_in = 30.minutes

I have added all the fields in the respective table and added: lockable in model as well.

The problem I am facing is, my account is getting locked upon 10 bad attempts, and Admin is able to log in and manually unlock it.

However my 2nd scenario is, I need the account to be unlocked after 30min as I have specified.

I need to know if I am supposed to be calling any separate method for unlock_in to work.

Leave a Comment

tech