Akshay Rawat
Akshay Rawat

Reputation: 4784

Devise - Timeout not working

Devise does not time out a user in the following scenario:

A user logs in, closes the tab, and then re-visits the URL in timeout + X minutes. The user is still logged in.

Timeouts work properly if the tab is already open, and is refreshed/clicked later. Which means the timeoutable module is working properly for this scenario.

Also so far, I've only been able to reproduce this in non localhost environments.

This question has also been asked before on the Devise groups, with no answer.

Versions:

Devise 2.2.4

Rails 3.2.13

Any help would be much appreciated !

Upvotes: 3

Views: 367

Answers (1)

Simon
Simon

Reputation: 1736

I managed to fix this by uncommenting config.timeout_in = 30.minutes in devise.yml. It says that the default is 30 minutes but it was only by explicitly setting the timeout to 30 minutes in the config that I could make it work if the window/tab was closed.

Upvotes: 2

Related Questions