【发布时间】:2015-01-17 20:49:56
【问题描述】:
我想在我的 rails 应用程序中使用 oauth 和 stackexchange。我使用 oauth 宝石。我从我的主页应用程序中获取数据:https://stackapps.com/apps/oauth/view/XXX
Rails.application.config.middleware.use OmniAuth::Builder do
provider :stackexchange, 'Client_Id', 'client_secret', public_key: 'key', site: 'stackoverflow', provider_ignores_state: true
end
我使用路由/auth/stackexchange/callback,但出现错误:
OAuth2::Error
: {"error":{"type":"0","message":"code is invalid"}}
什么代码在谈论?如何调试?
【问题讨论】:
标签: ruby-on-rails oauth stack-overflow