记住我和restful_authentication

发布于 2024-07-24 04:47:28 字数 231 浏览 3 评论 0原文

我有一个使用restful_authentication 插件的rails 应用程序。 我已经激活了“记住我”功能,但我时不时就会注销。 问题是我看不到它发生时的模式。

有时它在开发环境中有效,但在生产环境中无效。 有时它在 Firefox 中有效,但在 Safari 中无效。

有人遇到过类似的问题吗? 另外,关于如何以合理的方式测试这一点的建议将不胜感激(无需一直关闭并重新打开浏览器)。

I have a rails application which uses the restful_authentication plugin. I have activated the "remember me" functionality but every now and then I am getting logged out. The problem is I can't see the pattern for when it happens.

Sometimes it works in the development environment but not in production. Sometimes it works in Firefox but not in Safari.

Has anyone had similar problems? Also advice on how to test this in a reasonable way would be appreciated (without closing down and reopen the browser all the time).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不交电费瞎发啥光 2024-07-31 04:47:28

您是否使用多台电脑/浏览器登录?

上次我使用restful_authentication(那是不久前)它使用用户表中的一列来存储“记住我”令牌。 在另一个浏览器上选中“记住我”的情况下登录将覆盖该令牌,从而有效地使其在您的第一个浏览器中的使用无效。

设置起来有点复杂,但我强烈建议尝试 AuthLogic

Are you logging in with multiple PCs/browsers?

The last time I used restful_authentication (which was a while ago) it used a column in your users table to store a remember me token. Logging in with "Remember me" checked on another browser would overwrite the token, effectively invalidating its usage in your first browser.

It's a bit more complicated to set up, but I highly recommend trying out AuthLogic instead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文