Can I use rails' devise to integrate linkedin connect to my site?

I have a Rails 3 application using Devise for authentication. In addition to the manual authentication using email, I also have a facebook connect that allows a single sign-in using facebook. The next step is linkedin connect. Is there a simple way to integrate linkedin API call to devise? (The naive approach of defining config.oauth :linkedin, 'MY_APP_ID','MY_APP_SECRET', :site => 'https://api.linkedin.com/', :authorize_path => '/uas/oauth/authorize', :access_token_path => '/uas/oauth/accessToken' in the config/initializers/devise.rb resulted in "An Authorization Token was not supplied" error message from linkedin).

Thanks!

Update: Thanks for the (incredibly) fast replies. I was hoping not to have to change my application to add the linkedin authentication, by using omniauth or a similiar solution. However, I now see that the linkedin response doesn't return the email - which is the used as the primary key for my users, and hence I cannot use the authentication the way I use facebook (In Ryan's solution he allows to define the email separately if not returned from twitter, but it's not good enough for my purposes).

Another Update: Devise now has omniauth support, and it is working nicely. Checkout this link.

Answers


look at this:

http://railscasts.com/episodes/235-omniauth-part-1

http://railscasts.com/episodes/236-omniauth-part-2

http://railscasts.com/episodes/241-simple-omniauth


Check out the OmniAuth railscast for an awesome tutorial on how to integrate Facebook Connect with devise. Good luck!


Need Your Help

OpenID, Facebook Connect and Twitter OAuth in ColdFusion 9

coldfusion oauth openid coldfusion-9

Can someone help me in implementing OpenID, Facebook Connect and Twitter OAuth in a ColdFusion 9 application as single signon. I have checked ColdFusion-based OpenID script on RiaForge and lost in ...

From XML to list of paths in Oracle PL/SQL environment

xml oracle plsql xmltype

Please suppose you have a XML file (stored, for example, in an Oracle table which has also a CLOB column):

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.