Linkedin Omniauth赢得了Safari的工作

时间:2015-01-15 22:36:52

标签: heroku safari linkedin omniauth

LinkedIn Omniauth正在开发chrome和firefox,但每次我尝试在Safari中运行它时,它都无法运行。该应用程序在本地工作,但仅在生产中断。该应用程序已部署到Heroku。

更奇怪的是,我设置了Airbrake和New Relic,他们没有记录错误。

我有一个Ruby on Rails应用程序已部署到heroku。这是日志:

2015-01-15T22:34:37.545497+00:00 app[web.1]: I, [2015-01-15T22:34:37.545399 #6]  INFO -- omniauth: (linkedin) Callback phase initiated.
2015-01-15T22:34:37.537878+00:00 app[web.1]: Started GET "/auth/linkedin/callback?oauth_token=XXX&oauth_verifier=XXX" for 50.161.71.219 at 2015-01-15 22:34:37 +0000
2015-01-15T22:34:38.164715+00:00 heroku[router]: at=info method=GET path="/auth/linkedin/callback?oauth_token=XXX&oauth_verifier=XXX" host=glassbreakers-prototype.herokuapp.com request_id=8b48a139-4dd4-4b70-b665-bba8e92162f7 fwd="50.161.71.219" dyno=web.1 connect=2ms service=621ms status=401 bytes=912
2015-01-15T22:34:38.150147+00:00 app[web.1]: Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms)
2015-01-15T22:34:38.149476+00:00 app[web.1]: Processing by SessionsController#create as HTML
2015-01-15T22:34:38.149487+00:00 app[web.1]:   Parameters: {"oauth_token"=>"XXX, "oauth_verifier"=>"XXX", "provider"=>"linkedin"}
2015-01-15T22:34:38.150006+00:00 app[web.1]: Filter chain halted as #<Proc:0x007fab17cc76c0@/app/vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.4/lib/action_controller/metal/http_authentication.rb:71> rendered or redirected
2015-01-15T22:34:38.151927+00:00 app[web.1]: source=rack-timeout id=8b48a139-4dd4-4b70-b665-bba8e92162f7 wait=3ms timeout=5000ms service=615ms state=completed
2015-01-15T22:34:38.520198+00:00 heroku[router]: at=info method=GET path="/auth/linkedin/callback?oauth_token=XXX&oauth_verifier=XXX" host=glassbreakers-prototype.herokuapp.com request_id=68e1211b-a48c-4b99-9d81-48fb9cc9de0c fwd="50.161.71.219" dyno=web.1 connect=2ms service=62ms status=302 bytes=771
2015-01-15T22:34:38.461750+00:00 app[web.1]: source=rack-timeout id=68e1211b-a48c-4b99-9d81-48fb9cc9de0c wait=9ms timeout=5000ms state=ready
2015-01-15T22:34:38.465810+00:00 app[web.1]: I, [2015-01-15T22:34:38.465701 #14]  INFO -- omniauth: (linkedin) Callback phase initiated.
2015-01-15T22:34:38.518223+00:00 app[web.1]: source=rack-timeout id=68e1211b-a48c-4b99-9d81-48fb9cc9de0c wait=9ms timeout=5000ms service=57ms state=completed
2015-01-15T22:34:38.462592+00:00 app[web.1]: Started GET "/auth/linkedin/callback?oauth_token=XXX&oauth_verifier=XXX" for 50.161.71.219 at 2015-01-15 22:34:38 +0000
2015-01-15T22:34:38.515655+00:00 app[web.1]: E, [2015-01-15T22:34:38.515527 #14] ERROR -- omniauth: (linkedin) Authentication failure! invalid_credentials: OAuth::Problem, parameter_absent
2015-01-15T22:34:38.759075+00:00 heroku[router]: at=info method=GET path="/auth/failure?message=invalid_credentials&strategy=linkedin" host=glassbreakers-prototype.herokuapp.com request_id=325b4bc6-4127-40b6-b693-5df84fc17bbf fwd="50.161.71.219" dyno=web.1 connect=2ms service=9ms status=301 bytes=467

2015-01-15T22:34:38.995281+00:00 app[web.1]: source=rack-timeout id=767d5c33-4dc3-42ff-bdf6-b318b8dba784 wait=20ms timeout=5000ms service=13ms state=completed
2015-01-15T22:34:38.752063+00:00 app[web.1]: Started GET "/auth/failure?message=invalid_credentials&strategy=linkedin" for 50.161.71.219 at 2015-01-15 22:34:38 +0000
2015-01-15T22:34:38.981976+00:00 app[web.1]: source=rack-timeout id=767d5c33-4dc3-42ff-bdf6-b318b8dba784 wait=20ms timeout=5000ms state=ready

1 个答案:

答案 0 :(得分:1)

我的应用程序上有基本的HTTP身份验证,出于某种原因,Safari对待它的方式与Chrome或Firefox不同。一旦我关闭了http auth,omniauth linkedin在Safari上运行良好。