【问题标题】:GAE Golang - OAuth and OAuth2?GAE Golang - OAuth 和 OAuth2?
【发布时间】:2012-08-09 17:54:06
【问题描述】:

我正在尝试实现一个 Google App Engine Go 应用程序,该应用程序将使用 OAuth 和 OAuth2 供用户登录。我想知道这是否可能,如果可以,该怎么做?有人可以举个例子吗?

【问题讨论】:

  • 是否要使用 OAuth2 调用外部 API?或者为您的应用程序实现 OAuth2 提供程序?
  • @proppy 我想让用户使用 Facebook 等 OAuth 提供商登录我的网站。

标签: google-app-engine login oauth oauth-2.0 go


【解决方案1】:

您可以使用goauth2 在 App Engine 上实现 OAuth2 客户端

然后,您可以通过请求https://www.googleapis.com/auth/userinfo.profile 范围如Using OAuth 2.0 for Login 所示,使用他们的 Google 帐户登录您的用户

【讨论】:

    猜你喜欢
    • 2012-02-22
    • 2015-11-19
    • 2014-01-14
    • 2012-10-30
    • 1970-01-01
    • 2013-06-13
    • 1970-01-01
    • 1970-01-01
    • 2016-02-16
    相关资源
    最近更新 更多