我正在尝试使用 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会自动嵌入它。
你的意见?