Rails 5设计omniauth-facebook错误:对不起,出了问题 [英] Rails 5 devise omniauth-facebook Error: Sorry, something went wrong

查看:302
本文介绍了Rails 5设计omniauth-facebook错误:对不起,出了问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注Devise的官方指南,从顶部到本节。我的 CALLBACK_URL http:// localhost:3000 / users / auth / facebook / callback ,我认为可能问题,但我不确定。当我点击使用Facebook登录时,我遇到了这个错误:

对不起,出现问题。

在此链接上:
$ a $ b ; response_type = code& scope = user%2Cpublic_repo& state = 3913c12e0e4ce8b422732c9159c0fb1fb7351d100487849d

I am following Devise's official guide from top to this section. My CALLBACK_URL is http://localhost:3000/users/auth/facebook/callback, which I think might be the problem but I'm not sure. When I click on Sign in with Facebook, I run into this error:
Sorry, something went wrong.
on this link:
https://www.facebook.com/v2.6/dialog/oauth?client_id=193217371133539&redirect_uri=https%3A%2F%2Flocalhost%3A3000%2Fusers%2Fauth%2Ffacebook%2Fcallback&response_type=code&scope=user%2Cpublic_repo&state=3913c12e0e4ce8b422732c9159c0fb1fb7351d100487849d

Rails版本:Rails 5.0.0.1

Ruby版本(使用rbenv):ruby 2.3.1p112(2016-04-26修订版54768)[x86_64-darwin16]

Rails version: Rails 5.0.0.1
Ruby version(using rbenv): ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]

推荐答案

对于仍然有这个问题的人,请检查您的范围,如上面的Akash和Bodacious状态,并修改为:

For anyone still having this issue, then check your scope, as Akash and Bodacious state above, and modify it to look like this:

scope: 'email', info_fields: 'email,name'

这将允许您电子邮件字段。

This will allow you to get the email field.

这篇关于Rails 5设计omniauth-facebook错误:对不起,出了问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆