2015-01-15 3 views
0

LinkedIn Omniauth는 Chrome과 Firefox에서 작동하지만 Safari에서 실행하려고 할 때마다 작동하지 않습니다. 이 앱은 로컬에서 작동하지만 프로덕션에서만 중단됩니다. 이 앱은 Heroku에 배포됩니다.Linkedin Omniauth는 Safari에서 작동하지 않습니다.

낯선 사람이라도 Airbrake와 New Relic을 모두 설정했으며 오류를 기록하지 않습니다.

나는 heroku에게 배포 된 Ruby on Rails 응용 프로그램을 가지고 있습니다. 다음은 로그입니다.

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:[email protected]/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

오류가 '인증 실패!'와 관련이있는 것 같습니다. invalid_credentials : OAuth :: Problem, parameter_absent'. 아마도이 문제는 http://stackoverflow.com/a/3039620/1949363과 관련이 있으며 아마도 https://github.com/intridea/omniauth/issues/622 또는 https://github.com/decioferreira/omniauth가 해결할 수 있습니다. -linkedin-oauth2? – srt32

답변

1

응용 프로그램에 기본 HTTP 인증을 가지고 있었기 때문에 Safari는 Chrome이나 Firefox와 다르게 취급합니다. 일단 http auth를 해제하면 omniauth linkedin이 Safari에서 정상적으로 작동합니다.

관련 문제