【发布时间】:2012-10-28 15:32:54
【问题描述】:
我正在尝试使用 Rack + omniauth(实际上 - omniauth-ebay)通过 eBay 进行身份验证。我有一个正确的配置(而不是“111”,“222”......有真正的价值):
#config.rb
use OmniAuth::Builder do
provider :ebay, "111", "222", "333", "4444", "0", "https://api.sandbox.ebay.com/wsapi"
end
当我转到 localhost:9292/auth/ebay 时,我收到以下错误:
NoMethodError at /auth/ebay
undefined method `[]' for nil:NilClass
file: ebay_api.rb location: generate_session_id line: 21
#....
omniauth.error - <NoMethodError: undefined method `[]' for nil:NilClass>
omniauth.error.strategy - #<OmniAuth::Strategies::Ebay>
omniauth.error.type - "Failed to retrieve session id from ebay"
omniauth.strategy - <OmniAuth::Strategies::Ebay>
我想知道如何调试它?特别是 localhost:9292/auth/ebay 的路径,因为我没有在我的应用程序中定义它,因为 Omniauth 嵌入它会自动。
你的想法?
【问题讨论】: