Devise - Timeout not working

倖福魔咒の 提交于 2019-12-12 13:13:16

问题


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 !


回答1:


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.



来源:https://stackoverflow.com/questions/17510959/devise-timeout-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!