记住我和restful_authentication
我有一个使用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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否使用多台电脑/浏览器登录?
上次我使用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.