Omniauth回调超时



我使用https://github.com/igaiga/omniauth-sample的样本,它只是停留在回调阶段。我还测试了其他一些样品,结果是一样的。

Started GET "/auth/facebook/callback?state=118c21d7ea5675990e0a5e8a876f041f59dbc9a925f94754&code=AQDp93hH-WQor4ZQ8S_ZIGw0dTARw5vPMmkNAiRW9Ql8n7-fny0R5Du88InAILPbXUmdwWh_MyMpZzHzhO2YSlDXeMclSdyDfQQbtlFqixnYgpFt_3Sx5DETKIAYj2amRhK6JaNvxT1ffXgJ6qbMfHUbXlaerFWep60RVHBqwdA6tS-AoPQBNbKSA52-YAhj9-McGoEl4LQi4PGkIpVZu9IV" for 127.0.0.1 at 2013-04-07 16:51:24 +0800
Errno::ETIMEDOUT (Operation timed out - SSL_connect):
  /Users/mac/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb:799:in `connect'
  /Users/mac/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb:799:in `block in connect'
  /Users/mac/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
  /Users/mac/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
  /Users/mac/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb:799:in `connect'
  /Users/mac/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
  /Users/mac/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb:744:in `start'
  /Users/mac/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/net/http.rb:1284:in `request'
  faraday (0.8.7) lib/faraday/adapter/net_http.rb:75:in `perform_request'
  faraday (0.8.7) lib/faraday/adapter/net_http.rb:38:in `call'
  faraday (0.8.7) lib/faraday/request/url_encoded.rb:14:in `call'
  faraday (0.8.7) lib/faraday/connection.rb:247:in `run_request'
  oauth2 (0.8.1) lib/oauth2/client.rb:88:in `request'
  oauth2 (0.8.1) lib/oauth2/client.rb:131:in `get_token'
  oauth2 (0.8.1) lib/oauth2/strategy/auth_code.rb:29:in `get_token'
  omniauth-oauth2 (1.1.1) lib/omniauth/strategies/oauth2.rb:99:in `build_access_token'
  omniauth-facebook (1.4.1) lib/omniauth/strategies/facebook.rb:73:in `block in build_access_token'
  omniauth-facebook (1.4.1) lib/omniauth/strategies/facebook.rb:174:in `with_authorization_code!'
  omniauth-facebook (1.4.1) lib/omniauth/strategies/facebook.rb:73:in `build_access_token'
  omniauth-oauth2 (1.1.1) lib/omniauth/strategies/oauth2.rb:74:in `callback_phase'
  omniauth (1.1.3) lib/omniauth/strategy.rb:219:in `callback_call'
  omniauth (1.1.3) lib/omniauth/strategy.rb:175:in `call!'
  omniauth (1.1.3) lib/omniauth/strategy.rb:157:in `call'
  omniauth (1.1.3) lib/omniauth/strategy.rb:177:in `call!'
  omniauth (1.1.3) lib/omniauth/strategy.rb:157:in `call'
  omniauth (1.1.3) lib/omniauth/builder.rb:48:in `call'
  actionpack (3.2.13) lib/action_dispatch/middleware/best_

原因是我支持中国的GFW。出于某种原因,goagent在这个问题上没有帮助,vpn只在facebook的情况下有帮助。好消息是,当我将代码部署到heroku时,它可以同时用于facebook和twitter。

相关内容

  • 没有找到相关文章

最新更新