Dan
Dan

Reputation: 1697

Authenticating Heroku app with Google

I'm trying to set up a Rails app on Heroku to access Google data. I'm new to the process but it looks like I need to register an authentication certificate with Google in order to use Google services (using either OAuth or AuthSub). End game: I need persistent access to Google calendar data.

Google's Manage Domain site provides a way to upload an X.509 certificate, but for development purposes I'm just using Heroku's Piggyback SSL to get access to the heroku.com certificate. Assuming I'm on the right path, how do I provide the Heroku certificate to Google so I can continue?

It's also quite possible that I've gone down a rabbit hole; if that's the case, any advice re: authenticating Heroku with Google would be much appreciated.

Upvotes: 1

Views: 897

Answers (1)

Bob Aman
Bob Aman

Reputation: 33239

You're making it way too hard on yourself. Either use OAuth 1 with the HMAC-SHA1 signature method or use OAuth 2. Preferably OAuth 2, though I'm not sure if that's compatible with the old GData libraries that the current version of the Calendar API uses. But honestly, even if it's not compatible, the advantages of OAuth 2 might make it worth hacking something together. You can use Signet to do OAuth 2 — that's the Google-supported OAuth client for Ruby. Don't use AuthSub unless you've got a really good reason. There should be no certificates involved at all.

Upvotes: 1

Related Questions