使用Clearance的Rails应用程序的Facebook身份验证? [英] Facebook auth for a Rails app using Clearance?

查看:64
本文介绍了使用Clearance的Rails应用程序的Facebook身份验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个Rails 3.1应用程序,使用Clearance进行身份验证.我想添加标准的Facebook身份验证:允许用户继续直接(使用Clearance)或通过FB向我们注册/身份验证;如果他们通过FB登录/注册,并且我们已经有一个用于关联电子邮件地址的帐户,请合并这些帐户.

I'm writing a Rails 3.1 app, using Clearance for auth. I want to add standard Facebook auth: allow users to continue to register/authenticate with us directly (using Clearance) or via FB; if they sign in/register via FB and we already have an account for the associated email address, merge the accounts.

有很多关于使用OmniAuth/Devise的文档,但是我没有找到与Clearance类似的东西.是否有(积极维护的)gem在这里提供帮助,甚至只是教程?到目前为止,我发现的最好的是BlueLightSpecial,但是它或它用于FB Connect的宝石似乎都没有被主动维护.

There's good documentation out there for using OmniAuth/Devise, but i haven't found anything similar for Clearance. Are there (actively maintained) gems out there to help here, or even just tutorials? Best i've found so far is BlueLightSpecial, but neither it nor the gem it uses for FB Connect appear to be actively maintained any longer.

推荐答案

Devise/OmniAuth的优点在于它与其他API(Twitter,Facebook等)的无缝集成.

The good thing about Devise/OmniAuth is its seamless integration with other API's (Twitter, Facebook, etc).

您可以尝试使用现有的gem来制作自己与Clearance的自定义集成.例如: https://github.com/nsanta/fbgraph (尽管尚未维护此gem等一下).仍然运作良好.

You could try to use existing gems to cook up your own custom integration with Clearance. For example: https://github.com/nsanta/fbgraph (Although this gem hasn't been maintained in a while). Still works well.

还有Koala https://github.com/arsduo/koala -使用OAuth身份验证和Facebook Graph API.

There is also Koala https://github.com/arsduo/koala - works with OAuth authentication and Facebook Graph API.

这篇关于使用Clearance的Rails应用程序的Facebook身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆