0

根据这个railscast,我已经在我的rails应用程序中使用devise和omniauth实现了facebook身份验证:http ://railscasts.com/episodes/236-omniauth-part-2我的问题是如何处理身份验证对象。

如果我理解正确,当我使用 facebook 登录时,令牌会在一段时间内有效并保存到身份验证表中。过期是怎么处理的?更重要的是,如果我注销身份验证将保留在表中。所以当我再次登录时,它会找到旧的身份验证模型。如果用户发出声音,不应该清除身份验证表吗?

4

1 回答 1

0

The facebook is the one who handles the expiration of authentication in the facebook.

What you can control in your rails applicaitons is how devise will expire your authentication. When this happen the user will be prompted to login in facebook again, if it is already logged then he will be redirected authenticated back to your page.

So what you have to control is your settings in devise.

If you want to access the facebook graph, here is a good tutorial to do that: Facebook Integration With Omniauth and Devise on Rails 3

Regards, Felipe Lopes.

于 2012-11-14T15:40:50.207 回答