Вопрос

I want to authenticate a user using google oauth2.

I followed the instructions and I arrived to this point:

https://developers.google.com/accounts/docs/OAuth2Login#exchangecode

Am I supposed to use this gem for that? https://github.com/google/google-api-ruby-client

Or should I make the post using plain ruby?

Это было полезно?

Решение

The google-api-ruby-client gem is designed to work with various Google APIs and takes care of the protocol stuff automatically. If you’re going through the steps in that link you have to keep going, the code-for-tokens step requires an HTTP POST. The code in https://github.com/google/favcolor-server/blob/master/rp.rb might be useful.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top