죄송합니다.이 질문은 여러 번 물어 보았습니다. 여러 답변을 보았지만 답을 찾아 보았지만 행운은 없습니다. 다음 절차 내가) Google Oauth의 redirect_uri 불일치
1
을 따라 구글 개발자 콘솔에 갔다 한 것입니다2) 자격 증명을
3) OAuth 클라이언트 ID를 만들 클릭
4) 웹 appplication은 authorsied 리디렉션 URI 년대
나는
https://www.example.com/home
했다
클라이언트 ID 인 클라이언트 비밀번호가 나타납니다. 여기에서 나는 다음과 같은 코드를 사용하여 구글의 OAuth를 호출하고 이제 그들에게
Spree::AuthenticationMethod.where(environment: Rails.env, provider: 'google_oauth2').first_or_create do |auth_method|
auth_method.api_key = ENV['GOOGLE_ID']
auth_method.api_secret = ENV['GOOGLE_SECRET']
auth_method.active = true
end
을 추가 한
<a href="https://www.example.com/users/auth/google_oauth2">
<div>
Sign up with google
</div>
</a>
편집 :
이 내가
The redirect URI in the request, https://www.example.com/users/auth/google_oauth2/callback, does not match the ones authorized for the OAuth client. Visit https://console.developers.google.com/apis/credentials/oauthclient/490969266456-ki43pu8ejosstkuv01jadmmmt1o33the.apps.googleusercontent.com?project=490969266456 to update the authorized redirect URIs.
무엇입니까 오류가
다음은 요청입니다
Request Details
access_type=offline
scope=email
response_type=code
redirect_uri=https://www.example.com/users/auth/google_oauth2/callback
state=31ad247324b285fdf6102e931707e041770a85990050eb40
client_id=490969266456-ki43pu8ejosstkuv01jadmmmt1o33the.apps.googleuserc
위의 메시지를보고 나서 콘솔에 들어가서 리디렉션 URI를 https://www.example.com/users/auth/google_oauth2/callback으로 업데이트했습니다. 여전히 동일한 오류가 발생합니다.
오류가 발생합니까? –
예 제목은 내가 받고있는 오류입니다 – gates
URL에 클라이언트 ID를 보내겠습니까? – gates