【发布时间】:2011-07-22 22:30:26
【问题描述】:
我正在尝试使用 Omniauth 针对 Google Apps 提供简单的基本身份验证。在本地一切正常(即使在生产模式下),但在 Heroku 我得到以下信息:
app[web.1]: Started GET "/auth/admin" for 24.155.228.161 at Fri Jul 22 15:10:26 -0700 2011
heroku[router]: Error H12 (Request timeout) -> GET example.com/auth/admin dyno=web.1 queue= wait= service=30000ms status=503 bytes=
heroku[router]: Error H12 (Request timeout) -> GET example.com/ dyno=web.1 queue= wait= service=30000ms status=503 bytes=0
app[web.1]: Generated checkid_setup request to https://www.google.com/a/example.com/o8/ud?be=o8 with assocication AOQobUegRUNfEpz1JOO2bZe0zXrjkdIvdsjpVyCh3rtbL_s-GSfhQ_zY
我的设置如下;
# initializers/omniauth.rb
require "openid/fetchers"
OpenID.fetcher.ca_file = "#{Rails.root}/cacert.crt"
require 'openid/store/filesystem'
Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_apps, OpenID::Store::Filesystem.new('./tmp')
use OmniAuth::Strategies::GoogleApps, OpenID::Store::Filesystem.new('./tmp'), :name => 'admin', :domain => 'bcarc.com' #, :client_options => {:ssl => {:ca_file => './cacert.crt'}}
end
我已经尝试切换到 memcached,但我无法让 memcached-northscale 或 dalli 工作,而且无论如何我已经验证了随机数正确保存在 ./tmp 中,所以我没有'认为这不是问题。
我收到有关 CA 证书的错误,但将证书文件指定给 fetcher 解决了这个问题,但我仍然遇到超时。
有什么建议吗?
更新: 我已经将此追踪到 OmniAuth 的回调处理程序。请求被发送到 Google Apps,但在回调控制器有机会做任何事情之前回调超时。
【问题讨论】:
-
您可能想尝试使用 2 个测功机。
标签: ruby-on-rails openid heroku google-docs omniauth