Reputation: 5882
I'm simply just trying to disable the feature that requires me to login after inactivity in my development environment. To configure this, I have the following set:
# config/initializers/devise.rb
Devise.setup do |config|
...
config.timeout_in = 30.minutes if Rails.env.production?
...
end
However, every time I'm inactive for 30 minutes, I look up and realize I have to login again.
Any suggestions on how to turn this off? Quite surprised that this isn't working since this seems to do the trick for most of other non-devise features.
Upvotes: 0
Views: 138
Reputation: 1786
config.timeout_in has a default value, so if you don't assign it, it will default to 30 minutes. Try this:
config.timeout_in = 1440.minutes if Rails.env.development?
This will give you 24h. I don't know if there is any timeout limit, but you can try 1.year :)
Another option could be to activate the remember me.
Upvotes: 1