开发者

How to create Rails app with Facebook single sign-on?

I am creating a rails application where I need to allow users to login to my site with their facebook IDs.

How do I do that. I don't under开发者_开发问答stand the facebook documentation much. Are there any other clear resources on the internet?

thanks


OmniAuth is a new kid on the block which looks promising. It's Rack-based and provides a common API for authentication via Twitter, Facebook, LinkedIn et al.


You should be able to do this using oauth, here's a ruby tutorial: http://stakeventures.com/articles/2008/02/23/developing-oauth-clients-in-ruby


Check the pallstrom's code: fonr.

Here the demo application.


There's a devise plugin too: http://github.com/grimen/devise_facebook_connectable


We just implemented a Facebook Connect using mini_fb -- it uses the new facebook graph api, which is cool to get data. And if all you're looking for is to login, it's create.

They have an example for facebook_connect and for authentication (to query for data).


For single sign on, you can get a simple copy/paste solution from LaunchBit. It's free.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜