OAuth2를 통해 Google에 연결하려고합니다. 다른 응용 프로그램에서 작동하는 코드를 사용하고 있으므로 Google의 구성에 문제가 있음을 확신합니다.OAuth를 통해 Google에 연결 중 2 "redirect_uri에 대한 매개 변수 값이 잘못되었습니다. 누락 된 권한 :"
내가 권한 설정에 추가 된 구글 콘솔에서 클라이언트 ID와 비밀 키 등록: I 버튼을 누를 때 불행하게도
var client = new GoogleOAuth2Client("[client id].apps.googleusercontent.com", "[secret key]");
var extraData = new Dictionary<string, object>();
OAuthWebSecurity.RegisterClient(client, "Google", extraData);
, 나는 다음과 같은 오류가 연결 :
본인은 기본 URL에
- That’s an error.
Error: invalid_request
Invalid parameter value for redirect_uri: Missing authority:
file:///Account/ExternalLoginCallback%3FReturnUrl=/
Request Details
scope= https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/userinfo.email
response_type=code
redirect_uri=file:///Account/ExternalLoginCallback%3FReturnUrl=/
state=provider=google&sid=[numbers] client_id=[client id].apps.googleuserconte
/etc/hosts
파일의 로컬 호스트 매개 변수를 변경 시도하고 다음과 같이 나는 구글 콘솔에서 URI를 리디렉션이 위치를 추가 한
:
http://localhost:8080/Account/ExternalLoginCallback%3FReturnUrl=/
http://localhost.example.com:8080/Account/ExternalLoginCallback
http://localhost.example.com:8080/Account/ExternalLoginCallback%3FReturnUrl=/
오류가 계속 발생합니다. 나는 그 문제가 무엇인지 알지 못한다. 나는 누군가가 나에게 어떤 지침을 줄 수 있기를 바란다. 감사합니다.