Gagan
Gagan

Reputation: 4388

devise config.timeout_in not working

I am unable to timeout session with devise session timeout in initializers/devise.rb

I set

config.timeout_in = 1.minute

in initializers/devise.rb and i signin with one user and stayed idle for 2 minutes. This is suppose to invalidate current session and again prompt to ask for user credentials but the session never dies.

Am i doing something wrong or missing anything?

Thanks

Upvotes: 14

Views: 7451

Answers (2)

Sartaj Singh Sisodiya
Sartaj Singh Sisodiya

Reputation: 1143

The timeout_in and remember_me will not work together.

Timeoutable incompatible with the remember_me checkbox. You can have one, but not both.

Upvotes: 5

sumskyi
sumskyi

Reputation: 1835

You need to include :timeoutable in your Model, i.e.

devise :timeoutable

http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Timeoutable

Upvotes: 15

Related Questions