Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I connect to Google using oauth with Ruby?

Tags:

ruby

oauth

there are oauth and oauth2 gems, but I have not found an example to connect to google with oauth

like image 556
rtacconi Avatar asked Dec 02 '10 16:12

rtacconi


2 Answers

The officially supported method is to use Signet. The README contains the example code required to authenticate against the Google OAuth endpoints. See also the Google API Client for Ruby. If you have any questions on either, don't hesitate to ping me. I'm supporting both libraries.

Signet will also work for other OAuth providers. An official OmniAuth plugin is also available.

like image 184
Bob Aman Avatar answered Oct 03 '22 21:10

Bob Aman


Try omniauth instead.

https://github.com/intridea/omniauth

Here's An excellent screencast showing how its used: http://railscasts.com/episodes/241-simple-omniauth

like image 40
yahya Avatar answered Oct 03 '22 22:10

yahya