本文介绍了关闭浏览器时,Omniauth会话到期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Rails 3应用程序中,我将Omniauth用于用户身份验证部分(fb/twitter).

In my rails 3 app I use Omniauth for the user authentication part (fb/twitter).

实际上,我遵循此原则:

Actually I follow this:

https://github.com/RailsApps/rails3-mongoid-omniauth

https://github.com/RailsApps/rails3-mongoid-omniauth/Wiki/教程

但是,当我关闭浏览器会话时,我需要再次登录.如何保留回头用户会话?

But,when I close the browser session expires and I need to login again.How can I keep the session for returning users?

任何帮助将不胜感激!

推荐答案

Devise 通过其功能提供了此功能记忆模块. OmniAuth通过(您永远不会猜到)OmniAuth模块轻松地与它集成.您发布的第二个链接中甚至提到了它!

Devise offers this functionality through its Rememberable module. OmniAuth integrates easily with it through the (you'd never guess it) OmniAuth module. It's even mentioned in the second link you posted!

这篇关于关闭浏览器时,Omniauth会话到期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-21 07:25