设置多个提供商色器件:omniauthable [英] Setup multiple providers with devise :omniauthable

查看:95
本文介绍了设置多个提供商色器件:omniauthable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚设计1.2支持与OmniAuth教程一体化工作但我像设置多个供应商是指在同一用户。我在寻找一些好的样品code可以关注一下。

I just got "Devise 1.2 supports integration with OmniAuth tutorial" working but I'd like to setup multiple providers to refer the same user. I'm looking for some good sample code to look at.

我也不能肯定多个供应商有可能与默认色器件:omniauthable的实施,我想达到一个用户的许多供应商的效果,像瑞安·贝茨的 235 omniauth部分-1 ,的 236 omniauth部分-2 但我问一个更清洁的方式,少砍死混合模型,可以在你看来可能的,可能是,如果你已经知道的一些例子。

I'm also not sure "multiple providers" is possible with default "devise :omniauthable" implementation and I'd like to reach the "one user many providers" effect, like described by Ryan Bates 235-omniauth-part-1, 236-omniauth-part-2 but I'm asking if a cleaner way, less hacked mixed models, could be possible in your opinion and may be, if you already know some examples.

在此先感谢
卢卡

thanks in advance luca

推荐答案

正如你所要求的code:我已经写在设计+ Omniauth一篇文章,那是相当长,包括源代码和解释相关的。它位于: http://www.communityguides.eu/articles/11 。采取的方法是可比你提到他的Railscasts。

As you are asking for code: I have written an article on Devise+Omniauth, that is quite long and consists of source and explainations. It is located here: http://www.communityguides.eu/articles/11. The approach taken is comparable to the Railscasts you mention.

我的实现设计与功能Omnitauth多个提供商,谷歌,Facebook,Twitter和Github上。但是,我没有设计1.2测试这一点,我仍然运行1.1.7。如果你觉得它有用,请让我知道,如果它的工作原理为设计1.2。

My implementation of Devise with Omnitauth features multiple providers, Google, Facebook, Twitter and Github. However, I did not test this with Devise 1.2, I am still running 1.1.7. If you find it useful please let me know, if it works for Devise 1.2.

已更新2011年6月14日:
另请参见, Omniauth纯:身份验证与Facebook,谷歌,谷歌企业应用套件,微博,Github上,AOL,myOpenID来说,... 这篇文章将演示如何使用仅向Omniauth建立一个多供应商的认证。

UPDATED jun 14 2011: ... see also, Omniauth pure: Authentication with Facebook, Google, Google Apps, Twitter, Github, AOL, MyOpenID, ... This article will demonstrate how to set up a multi-provider authentication using Omniauth only.

这篇关于设置多个提供商色器件:omniauthable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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