문제

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