OmniAuth无效响应错误 [英] OmniAuth Invalid Response Error

查看:197
本文介绍了OmniAuth无效响应错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用OmniAuth与Devise,允许用户使用Facebook登录或使用用户名和密码创建一个普通帐户。当我最初设置完毕后,我使用了铁路档案的优秀方向。一切都在2个月以上的工作非常好,但只是在Facebook的登录停止工作的另一天。 OmniAuth通过Facebook发送给您的认证,然后返回: http:// localhost:3000 / auth / failure?message = invalid_response



Google没有建议什么导致此错误或如何解决它,OmniAuth文档也没有。我已经尝试挖掘他们的代码,但唯一提到这个错误,我发现这是,在 /oa-oauth/lib/omniauth/strategies/oauth.rb

  rescue :: MultiJson :: DecodeError => e 
失败!(:invalid_response,e)
end

看到这个错误!知道它是什么或如何解决它?这是阻止我启动这个应用程序,所以任何帮助将非常感谢!



谢谢,
JG

解决方案

/ p>

我不知道为什么这是有效的,但它已经这样我会发布在这里努力帮助别人最终解决这个问题。



我升级了我的应用程序,使用ruby 1.9.2(未来的方式)和bang,它只是再次工作。不知道为什么,但嘿,有时这只是它的方式。



升级是非常容易的。我被 dhh tweet & amp;发现这个这个是确保您的1.8.7代码在1.9.2中工作的真正有用的资源。支持英雄,以及如何轻松升级应用程序。


I'm using OmniAuth with Devise to allow users to login with facebook or to create a normal account with a username and password. When I originally set it all up I used the excellent directions from Railscasts. Everything was working very nicely for 2+ months but just the other day the facebook login stopped working. OmniAuth sends you away to the authentication with facebook and then returns with: http://localhost:3000/auth/failure?message=invalid_response

Google has no suggestions on what causes this error or how to fix it and the OmniAuth docs don't either. I've tried digging through their code as well but the only mention of this error I've found is this, in /oa-oauth/lib/omniauth/strategies/oauth.rb:

rescue ::MultiJson::DecodeError => e
  fail!(:invalid_response, e)
end

Has anyone ever seen this error!? Know what it is or how to fix it?! This is keeping me from launching this application so any help would be very very appreciated!

Thanks, JG

解决方案

Ok,

I'm not sure why this has worked but it has so I'll post here in the effort to help someone else that ends up with this issue.

I upgraded my app to use ruby 1.9.2 (way of the future!) and bang, it just worked again. No idea why but hey sometimes that's just the way it goes.

Upgrading was really easy though. I was sparked into upgrade action by this dhh tweet & found this and this to be really helpful resources in making sure your 1.8.7 code will work in 1.9.2. Props to heroku as well for making it so easy to upgrade an app.

这篇关于OmniAuth无效响应错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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