Need Recommendations for Twitter and Facebook Gems - ruby-on-rails

I'm building an app in Rails 3. I currently have a user model which is authenticated via devise (email + password auth). I want to be able to show connect to facebook, connect to twitter buttons to the users once they are logged in.
After obtaining the keys from Facebook and Twitter, I'd want to store it in the database for future requests.
Which Ruby Gems should I be using for this use case?
Thanks!

Instead of Facebooker, we just implemented a facebook-connect style login and application using mini_fb
Mini_fb uses the new graph API, which is cool, and was easy to implement. We used Rails3 and authlogic, but difference to devise should be negligible.
For twitter, this twitter gem is nice, but this devise-twitter gem looks nice for login.

Okay, still no answers. Please check out the Ruby Toolbox, I'm sure the answer is there. It will tell you what the most common gems are for your problem if you can figure out the categorization system. Also, facebooker is a nice gem but it's a little old.

Facebooker is deprecated in favour of mogli, which uses the Graph API. And for Twitter, I'd recommend John Nunemaker's twitter. Since you are already using Devise, you can use the devise-twitter as mentioned by Jesse Wolgamott.

Related

Which gem should I use to provide a login process for my social network app?

I am creating a social networking site for my university and I'm wondering which gem I should use for the login process, or if there is any other more secure way to implement a login process. Is there document or sample code which can guide me?
I've heard about the Devise gem but I am not sure that it will be work for us, or how to use it.
Definitely recommend devise. It's written by one of the top contributors to rails Jose Valim. It's pretty easy to use, especially if you just stick with the defaults which are very reasonable. And it's kept up to date - currently only has 7 outstanding issues. For a project with 6.4k watchers that's pretty amazing.
There's a getting started guide with everything you need to get started.
There's also a devise wiki with a lot of examples. Here's just a few:
How To: Disallow previously used passwords
How To: Display a custom sign_in form anywhere in your app
How To: Do not redirect to login page after session timeout
It largely depends on what features you're looking for. If you require a full-featured authentication solution (Registration, Forgot Password, Remember Me, Login) then either devise or Authlogic is recommended.
If you're just looking for a simple way to authenticate users (via login and password for example), you can just use the Rails built-in authentication via has_secure_password. Ryan Bates did a RailsCast on it not too long ago.
Whatever method you decide to go with just remember that without SSL its not secure.
Devise is very nice. However, I'm partial to using NoamB's Sorcery gem. Its like a balance between rolling your own and Authlogic.
Check it out here:
https://github.com/NoamB/sorcery
Also nice railscast on it:
http://railscasts.com/episodes/283-authentication-with-sorcery

Do you need omniauth to work with koala?

I am a rails newbie and I was wondering if you have to have omniauth in order to work with koala. For example, if I followed this sites code, http://udooz.net/blog/2011/02/facebook-app-using-rails-koala/, would I need omniauth already set up to do so?
No. In that particular example, everything there looks like it should work as is (disclaimer: I have not tried the example myself.) In general, Koala doesn't require OmniAuth.
What OmniAuth gives you is a single gem to let you easily authenticate users with your choice of third-party authentication systems. It would be useful if you are considering allowing your users to login with more than just their Facebook credentials, like Twitter or Open ID credentials.
For completeness, here's the source of most of the information of that blog post from the Koala wiki on Github: https://github.com/arsduo/koala/wiki/Koala-on-Rails
You don't need OmniAuth. I've used Koala only.

Which authentication gem would you use in Rails 3 to integrate with as many third party authentication providers

We need to have basic authentication in our Rails 3 app but the requirements are to also integrate with providers such as facebook, linked in, google apps, twitter, etc.
We are looking at:
Clearance
Divise
AuthLogic
... and others.
Any advice on which one to use that provides most of what we need?
OmniAuth is great for plugging in to third party authentication:
Code: https://github.com/intridea/omniauth
http://railscasts.com/episodes/235-omniauth-part-1
and
http://railscasts.com/episodes/236-omniauth-part-2
The above railscasts are great resources for a simple overview of using OmniAuth.
Devise is the current top dog, as it sets up sensible defaults, and makes it remarkably easy to override parts of the authentication system without affecting the rest.
It also has a branch and instructions to easily support OmniAuth for OAuth/OpenID authentication: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview
I'm not experienced with either of these gems but I came across this blog post that had some high level points comparing Devise and Authlogic. http://www.quora.com/Ruby-on-Rails/How-should-I-choose-an-authentication-gem
This one persuaded me to start with Authlogic:
When a user logs in I like to set a cookie that has the username so I can access it from JavaScript. I know how to do this with Authlogic: add a line of code to UserSessionsController#create. How do I do it with Devise? I can't see how. (I don't want to do it on every page request. Just when they authenticate.)
You can give a shot to Sorcery gem which nicely handle third party authentification.
I found it easy to learn and to implement, and it's well documented too.
I don't try the other gems but this one is growing very fast right now, despite the fact that it's not an very old project
Good luck!!!

How do I create a Stack Overflow-like registration process?

I am wondering how I can build the registration process like we have in Stack Overflow, where a user can login using one of several already existing accounts? I would prefer using Rails as a technology platform.
Are you looking for this?
http://testingauth.heroku.com/
I'm not sure this is exactly what you need, but the devise module, available on github, makes it very easy to build a authentication system in a rails application.
For authorization, another great module is called "cancan". You might need that too.
Check out OmniAuth. There are a few railscasts describing it.
You can use omniauth gem to implement openId auth. Also, it possible to extend your existing user auth systems. See great screencast about this at railscast: OmniAuth Part 1

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

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?
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
Devise now has built-in OAuth that you can use with Facebook, Github, Twitter, etc. The documentation is quite helpful.
I haven't used it yet, but this one looks promising:
http://github.com/viatropos/authlogic-connect
It seems you can handle multiple oauth logins in a single db table, and the example includes keys for facebook, twitter, google etc etc so looks promising on the multiple-applications front
Click on the below link to get the steps for social login.
This is my blog only..
https://rubysolutions.wordpress.com/2014/07/25/facebook-and-google-sign-in-integration-using-devise-and-omniauth-in-rails-4-app-ruby-2/

Resources