如何使用带有 Ruby 的 oauth 连接到 Google? [英] How can I connect to Google using oauth with Ruby?

查看:50
本文介绍了如何使用带有 Ruby 的 oauth 连接到 Google?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有 oauth 和 oauth2 gems,但我还没有找到使用 oauth 连接到 google 的示例

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

推荐答案

官方支持的方法是使用Signet.README 包含针对 Google OAuth 端点进行身份验证所需的示例代码.另请参阅 适用于 Ruby 的 Google API 客户端.如果您对其中任何一个有任何疑问,请随时联系我.我支持这两个库.

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 也适用于其他 OAuth 提供商.官方 OmniAuth 插件也可用.

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

这篇关于如何使用带有 Ruby 的 oauth 连接到 Google?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆