是否有任何运行的示例代码用于使用authlogic进行Google登录

时间:2011-06-21 07:49:44

标签: ruby-on-rails ruby-on-rails-3 authlogic google-openid

PS: - 请不要说使用这个设计,omniauth或任何其他你知道的插件/宝石。

我正在寻找一些示例代码,用于google登录,使用authlogic for ruby​​ on rails 3。

以下是我试过/检查的内容: -

任何人都知道任何正在运行的示例/示例代码,用于使用rails 3中的authlogic进行google登录

修改

您是否注意到这些警告,这是来自您的代码。您提供的代码在我的本地计算机上运行: -

 Attempting discovery to verify endpoint
 Performing discovery on https://www.google.com/accounts /o8/id?id=AItOawlFBZciVpNUBSlYbz0wHzTgmJWu9PpCvyk
  WARNING: making https request to https://www.google.com/accounts/o8/id?id=AItOawlFBZciVpNUBSlYbz0wHzTgmJWu9PpCvyk without verifying server certificate; no CA path was specified.
  Using 'check_authentication' with https://www.google.com/accounts/o8/ud
WARNING: making https request to https://www.google.com/accounts/o8/ud without verifying server certificate; no CA path was specified.

1 个答案:

答案 0 :(得分:1)

你激励我去解决这个问题。

此博客基本上适用于我http://blog.sethladd.com/2010/09/ruby-rails-openid-and-google.html

我的代码非常难看,因为它不是我尝试过的第一个代码 其他资源:

Ruby open_id_authentication with Google OpenID

http://toddsedano.blogspot.com/search?updated-max=2010-05-29T11%3A59%3A00-07%3A00&max-results=7

http://railscasts.com/episodes/170-openid-with-authlogic

Anywho,为我工作的粗略代码在这里:  https://github.com/softwaregravy/google_authlogic
here is the running code

它仍然是一个原型。希望它有所帮助。