Ruby-on-rails – Ruby on Rails: Best way to add Facebook login, Twitter login, OpenID login, etc

authlogicruby-on-rails

I'm currently running on a Ruby on Rails app with Authlogic handling my authentication and user management.

I'm struggling to find up to date information on the best way to add 3rd party login methods to my site, supplementing the standard sign up and login. There are a number of tutorials out there, but all seem to be outdated or incomplete. Could I get some recommendations on the best way to add multiple 3rd party login methods to Authlogic?

Authlogic appears to be built from the ground up for this type of thing, but it's very poorly documented, and it's own page seems very outdated on this.

They seem to recommend for Facebook using authlogic_facebook_connect plugin, which in turn relies upon the outdated Facebooker gem, which has been replaced by Facebooker2. Is there a way to use Facebooker2 with Authlogic?

I have also found on Google authlogic_oauth2, which is a more modern plugin that can login using Facebook credentials using OAuth2. Unfortunately, the author states that this plugin cannot be used alongside Authlogic plugins for OAuth (Twitter) and OpenID due to conflicts.

What are the recommended gems or plugins I can use together to allow login to my site via Facebook, Twitter, and OpenID?

Best Answer

This looks interesting. Planning to give it a shot.

https://github.com/plataformatec/devise/wiki/Extensions

Edit:

I tried it and I am using devise and omniauth together to handle this:

Check out these links:

http://railscasts.com/episodes/209-introducing-devise

http://railscasts.com/episodes/210-customizing-devise

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

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

It is a very good solution

Related Topic