I would like to connect to those applications which provided OAuth API (such as fb, twitter).
Is there a relatively easier way to integrate those APIs?
I have successfully used linkedin gem which can connect to LinkedIn OAuth API. But I really don't want to install a gem for dealing with a single application, where those applications provided similar OAuth APIs.
Since Oct 2010, someone has come up with a gem called OmniAuth. It packages together a number of different identity providers into a Rack middleware. It specifically does not handle authorization or persistence -- that is left up to you. It's probably the best option out right now, especially if you don't plan on using classic username/password authentication (though OmniAuth can handle it).
OmniAuth will handle identification from Facebook, Twitter, Google, LinkedIn, 37Signals, and Github. See below for a complete list as of this posting.
Since this is a Rack middleware, it is possible to use this with Devise and AuthLogic. Because of its modularity, it should be easy to use this with pure-Restful-API Rails/Sinatra apps (no direct HTML rendering) that talk to mobile apps that is gaining in popularity without pulling in the extra code from Devise and AuthLogic.
The best tutorial for getting started is the blog post written for Rails Rumble on getting authentication up and running quickly: http://blog.railsrumble.com/blog/2010/10/08/intridea-omniauth
Ryan Bates also has a few Railscasts about OmniAuth:
As of this posting, these are the following providers coming out of the box (based on https://github.com/intridea/omniauth/tree/dc44c54d80ca0b49d1f63bbbf21165a7515fd41d)
OAuth/OAuth2:
OpenId:
HTTP Basic:
Enterprise:
Other:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With