我尝试自己解决问题,但是这个问题已经让我感觉最好,而且我正在接近我的办公桌。
这就是我的所作所为:
git:clone -a myapp
来获取本地源代码我不得不使用heroku回滚,以便我可以回到工作版本。我认为既然源代码是相同的,也许我使用的宝石已更新并破坏了某些东西。但我检查了oAuth宝石,但它们都没有改变一段时间。
这是我的日志,当它不起作用时:
2015-10-25T15:20:47.802222+00:00 app[web.1]: Started GET "/humans/auth/facebook?ip=123&loc=8&mac=123&var=11" for 162.158.38.218 at 2015-10-25 15:20:47 +0000
2015-10-25T15:20:47.804207+00:00 app[web.1]: I, [2015-10-25T15:20:47.804128 #3] INFO -- omniauth: (facebook) Request phase initiated.
2015-10-25T15:20:47.871762+00:00 heroku[router]: at=info method=GET path="/humans/auth/facebook?ip=123&loc=8&mac=123&var=11" host=yourhotspot.net request_id=9804b0a9-a190-4881-a64f-ff222aa216e3 fwd="82.34.163.154,162.158.38.218" dyno=web.1 connect=0ms service=75ms status=302 bytes=1916
2015-10-25T15:20:48.181538+00:00 app[web.1]: Started GET "/humans/auth/facebook/callback?ip=123&loc=8&mac=123&var=11&code=AQCqfCPHQUM_YzgXPJSUniVKumx6ii2fsQtgEw9Bc3B9MFwNyKmnRtdqZxCRWSl1bDxdZKIAgU_M_-DQGVedt7FRYsm8DxA7gPA8bky86H-jlaCaFQa1Gc2BRLxtuzEUPKtu3UPRmKjUpXBuJI0nHOmG4IF3WWjwRk1jtfvWvgHmEH5Q-h-JjoEgiTC5uqK6XN2E48hKqxYcqBVs-pDMLMp74WRmRCXN_R_R_RuAjyyj_9-GdNHhZ6uajuri_41AN5V8W9UqWPmtPHznL7ztNLzS9dDj7S9e25bINXUMneHVVNHwGpp5PWZULsN_hwJueUU4SFZlNgzrnupacHAXF9kU&state=1e8f5be4b10b96baedd6aab3cd2eb125b150e100c5a2c7bb" for 162.158.38.218 at 2015-10-25 15:20:48 +0000
2015-10-25T15:20:48.183305+00:00 app[web.1]: I, [2015-10-25T15:20:48.183218 #3] INFO -- omniauth: (facebook) Callback phase initiated.
2015-10-25T15:20:48.733053+00:00 app[web.1]: {"error":{"message":"Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request","type":"OAuthException","code":100,"fbtrace_id":"B8bmqcG7i6M"}}
2015-10-25T15:20:48.733049+00:00 app[web.1]: E, [2015-10-25T15:20:48.732948 #3] ERROR -- omniauth: (facebook) Authentication failure! invalid_credentials: OAuth2::Error, :
2015-10-25T15:20:48.735557+00:00 app[web.1]: Parameters: {"ip"=>"123", "loc"=>"8", "mac"=>"123", "var"=>"11", "code"=>"AQCqfCPHQUM_YzgXPJSUniVKumx6ii2fsQtgEw9Bc3B9MFwNyKmnRtdqZxCRWSl1bDxdZKIAgU_M_-DQGVedt7FRYsm8DxA7gPA8bky86H-jlaCaFQa1Gc2BRLxtuzEUPKtu3UPRmKjUpXBuJI0nHOmG4IF3WWjwRk1jtfvWvgHmEH5Q-h-JjoEgiTC5uqK6XN2E48hKqxYcqBVs-pDMLMp74WRmRCXN_R_R_RuAjyyj_9-GdNHhZ6uajuri_41AN5V8W9UqWPmtPHznL7ztNLzS9dDj7S9e25bINXUMneHVVNHwGpp5PWZULsN_hwJueUU4SFZlNgzrnupacHAXF9kU", "state"=>"1e8f5be4b10b96baedd6aab3cd2eb125b150e100c5a2c7bb"}
2015-10-25T15:20:48.735493+00:00 app[web.1]: Processing by Humans::OmniauthCallbacksController#failure as HTML
当它发生时:
2015-10-25T15:56:56.726873+00:00 heroku[router]: at=info method=GET path="/humans/auth/facebook?ip=123&loc=8&mac=123&var=11" host=yourhotspot.net request_id=1c01da5f-1bea-4dbb-9a1b-a80dcc442539 fwd="82.34.163.154,162.158.38.211" dyno=web.1 connect=1ms service=18ms status=302 bytes=1828
2015-10-25T15:56:56.714754+00:00 app[web.1]: I, [2015-10-25T15:56:56.714674 #3] INFO -- omniauth: (facebook) Request phase initiated.
2015-10-25T15:56:56.920771+00:00 app[web.1]: I, [2015-10-25T15:56:56.920692 #3] INFO -- omniauth: (facebook) Callback phase initiated.
2015-10-25T15:56:56.712897+00:00 app[web.1]: Started GET "/humans/auth/facebook?ip=123&loc=8&mac=123&var=11" for 162.158.38.211 at 2015-10-25 15:56:56 +0000
2015-10-25T15:56:56.919315+00:00 app[web.1]: Started GET "/humans/auth/facebook/callback?code=AQC7jHL3hk8TSP5F9lsDjzkyXlAIbk-Kf3027g3bU-9x0etBoOxUvHd6ofEIZjEolh-UajkUCS4WZ3z40q7tgrIYi8ZIy6fuhjRJwyqLhXBPfOnmL1LqCDlPFVIdizrHPUomZ5WZ-VLmFc7A1UsEUVpyW907LgoaL8S90Gukh9oGvykIcpc1tmHqpc-WaayJNCkTUPxaRtlEmuD5FTVUDoRAzFnVDYCURhNAZMs9eTk-O40_leapHbTX0Uz6sFC6RHn-qgien_diOJst2DlRvtKWCcfxXuoBZPFPa5BtRYg2_eP4K8zUxRtDeazwYsxJt7o1i9V93np56EABMMrfBmIK&state=952e4d3cbe773056b12f56d76b0a54c5ea841f51e61d5041" for 162.158.38.211 at 2015-10-25 15:56:56 +0000
2015-10-25T15:56:57.897756+00:00 app[web.1]: Processing by Humans::OmniauthCallbacksController#facebook as HTML
我无法理解这里发生的事情。我的代码,环境,配置变量和应用程序设置完全相同的事实让我感到很伤心。
如果有人能够对可能出现的问题有所了解,我会非常感激。
编辑:(使用的命令)
命令日志没有错误,命令按预期工作。然而,事情正在发生变化。
答案 0 :(得分:0)
部署中肯定会发生变化的是物理服务器('dyno')。我会检查以下内容:1)您的应用程序是否缓存由facebook发布的任何身份验证令牌,例如在配置? 2)这样的令牌是如何绑定到服务器的IP地址的?