나는 마지막 날에 twitter-omniauth
보석을 사용하여 사용자를 인증하려고했지만 아직 성공하지 못했습니다. (페이스 북 인증은 완벽하게 작동합니다.)OAuth :: Unauthorized 401 int twitter-omniauth gem
401 권한이없는 오류가 계속 발생합니다.
나는 stackoverflow를 통해 검색하지만 아무도 내 문제를 해결할 수 없습니다.
http://127.0.0.1/users/auth/twitter
을 시도하면 트위터에 접속합니다. 로그인 한 후 http://127.0.0.1/users/auth/twitter/callback
으로 리디렉션되며 승인되지 않은 오류가 발생합니다. 더 이상 정보가 필요하면 콜백 URL 아래
내가
http://127.0.0.1/users/auth/twitter/callback
rake routes
출력
new_user_session GET /users/sign_in(.:format) {:action=>"new", :controller=>"devise/sessions"}
user_session POST /users/sign_in(.:format) {:action=>"create", :controller=>"devise/sessions"}
destroy_user_session DELETE /users/sign_out(.:format) {:action=>"destroy", :controller=>"devise/sessions"}
user_omniauth_callback /users/auth/:action/callback(.:format) {:action=>/twitter|facebook/, :controller=>"users/omniauth_callbacks"}
user_password POST /users/password(.:format) {:action=>"create", :controller=>"devise/passwords"}
new_user_password GET /users/password/new(.:format) {:action=>"new", :controller=>"devise/passwords"}
edit_user_password GET /users/password/edit(.:format) {:action=>"edit", :controller=>"devise/passwords"}
PUT /users/password(.:format) {:action=>"update", :controller=>"devise/passwords"}
cancel_user_registration GET /users/cancel(.:format) {:action=>"cancel", :controller=>"devise/registrations"}
user_registration POST /users(.:format) {:action=>"create", :controller=>"devise/registrations"}
new_user_registration GET /users/sign_up(.:format) {:action=>"new", :controller=>"devise/registrations"}
edit_user_registration GET /users/edit(.:format) {:action=>"edit", :controller=>"devise/registrations"}
PUT /users(.:format) {:action=>"update", :controller=>"devise/registrations"}
DELETE /users(.:format) {:action=>"destroy", :controller=>"devise/registrations"}
login /login(.:format) {:action=>"login", :controller=>"home"}
root / {:controller=>"home", :action=>"index"}
트위터
에 입력 한, 내가 제공 할 수 있습니다. 이 문제를 해결하도록 도와주세요.
로버트 - 귀하의 응용 프로그램 ID와 응용 프로그램 비밀이 이니셜 라이저에서 올바른지 확인 했습니까? 트위터가 로컬 응용 프로그램에 대해 보여주는 것과 일치합니까? – TallGreenTree
또한 사용자/omniauth_callbacks 컨트롤러에 대한 코드를 게시 할 수 있습니까? – TallGreenTree
@TallGreenTree 나는 두 번 appification ID와 응용 프로그램 비밀을 여러 번 확인했습니다 .. 그것은 동일합니다 .... – robert