Model:
devise :database_authenticatable, :registerable,:timeoutable, :recoverable, :rememberable, :trackable, :validatable,:timeout_in => 10.seconds
development.rb:
config.timeout_in = 10.seconds
devise.rb:
config.timeout_in = 10.seconds
Also it's possible to set timeout_in option dynamically
class User < ActiveRecord::Base
devise (...), :timeoutable
def timeout_in
if self.admin?
1.year
else
2.days
end
end
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With