设计 - 超时不起作用 [英] Devise - Timeout not working

查看:146
本文介绍了设计 - 超时不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在以下情况下,Devise不会超出用户:

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

用户登录,关闭选项卡,然后重新访问URL超时+ X分钟。用户仍然登录。

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

如果该选项卡已打开,并且稍后进行刷新/单击,超时工作正常。这意味着 timeoutable 模块在这种情况下正常工作。

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.

这个问题在之前也已经在Devise小组上被问过了,没有答案。

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

版本:

Devise 2.2.4

Devise 2.2.4

Rails 3.2.13

Rails 3.2.13

任何帮助将非常感谢!

推荐答案

我设法解决这个问题,取消注释 config.timeout_in = 30.minutes in devise.yml 。它说默认是30分钟,但是只有在配置中显式地将超时设置为30分钟,如果窗口/选项卡关闭,我可以使其工作。

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.

这篇关于设计 - 超时不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆