Linkedin Omniauth 无法在 Safari 上运行

Linkedin Omniauth Won't Work on Safari

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

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

我在 Rails 应用程序上有一个 Ruby 已部署到 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

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