0
我刚刚(终于!)更新我的应用程序到Rails 5.0.1,我得到一个Omniauth Facebook登录通知错误,我没有得到。消息说 -Rails 5.0.1 - Facebook的Omniauth错误 - '无法验证/无效的凭据'
'无法从Facebook验证你,因为“凭证无效”。
在开发日志有到Omniauth控制器的引用,这是代码 -
def all
user = User.from_omniauth(request.env["omniauth.auth"])
if user.persisted?
flash.notice = "Signed in!"
sign_in_and_redirect user
else
session["devise.user_attributes"] = user.attributes
redirect_to new_user_registration_url
end
end
alias_method :twitter, :all
alias_method :facebook, :all
omniauth工作绝对没和登录不是问题,只是Facebook登录Twitter的。我使用的宝石版本是3.0,所以不要以为就是这样。令牌是否需要刷新时间?
你可以举一个你正在发送到Facebook的'user.attributes'内容的例子吗? –
我想,只是名字和电子邮件。 –
好的。这似乎值得研究。 –