나는 *와 비슷한 몇 가지 주제를 찾았지만 현재 나에게 맞는 답변은 없습니다. 나는 "http://zen.example.com"에 실행되도록/etc/hosts 파일을 사용하여 내 로컬 레일 서버를 설정 한 내 구글 리디렉션 URI의 목록에 다음 항목을 추가 한Google OAuth 로컬 리디렉션 URI
:
zen.example.com
zen.example.com/users/auth/google_oauth2/callback
*.example.com/*
(이 고안 사용 + omniauth 및 google oauth2 전략). * : 나는 구글에서 다음과 같은 오류와 끝까지
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=596705606035.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Fzen.example.com%2Fusers%2Fauth%2Fgoogle_oauth2%2Fcallback&state=ba07e128aea49aeb2443711336d5af6cc711a341f609a48a&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar&access_type=offline&approval_prompt=force
:
Error: redirect_uri_mismatch
The redirect URI in the request: http://zen.example.com/users/auth/google_oauth2/callback did not match a registered redirect URI
참조 지금은 이런 짓을했는지 나는 나를 여기에 소요 내 OAuth는 링크를 따라 Why is Google Oauth returning `invalid redirect_urI` in my Rails app?
기본 Google oauth와 어떻게 다른가요? – cjm2671
Rails 4와 같은 최신 루비와 상호 작용할 때 도움이되는 업데이트 된 버전입니다. – T145