【发布时间】:2017-11-16 01:11:02
【问题描述】:
在我的 rails 应用程序中,我配置了omniauth-facebook,它工作得非常好。但是在将我的应用程序部署到 Heroku 之后,https://habitude-helper.herokuapp.com/,现在如果我尝试使用 Facebook 登录或注册,则会收到错误消息。
Sorry, something went wrong.
We're working on getting this fixed as soon as we can.
Go Back
我在 Facebook 应用程序上的网站 URL 是 https://habitude-helper.herokuapp.com/,与 Facebook 授权的链接是: https://www.facebook.com/v2.6/dialog/oauth?client_id=27910077666246&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Ffacebook%2Fcallback&response_type=code&scope=email&state=59471e0bc7f573b2a1aa55261768443384cbc16e38a73571
我在 Google 上搜索了很多关于这个问题的信息,并根据 stackoverflow 上的 answer 更改了我的 omniauth.rb 文件的来源。
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET'], scope: 'email', info_fields: 'email,name'
end
但没有帮助。我想澄清一下,我没有使用设计。我正在使用 Bcrypt 宝石。
有解决此错误的建议吗?
【问题讨论】:
标签: ruby-on-rails authentication heroku omniauth omniauth-facebook