2016-11-23 3 views
2

안녕하세요 여러분 안녕하세요. Google 인증을 위해 Xamarin.OAuth2를 사용하여 이상한 문제가 있습니다. 로그인은 인증 할 수 있지만 Xamarin.Auth는 Google로부터 잘못된 응답을받는 것 같습니다. Google 크롬 https://accounts.google.com/o/oauth2/auth에서이 URL을 사용하여 테스트하면 페이지가 mysite URL로 리디렉션되지만 앱을 사용하면 redirect_uri_mismatch 오류가 발생합니다. 내가 라이브 웹 사이트를 사용하는 리디렉션 URL에 대한Google 인증 오류를 사용하는 Xamarin.Auth2 redirect_uri_mismatch

enter image description here

.

답변

1

Xamarin Auth 초기화에 제공하는 리디렉션 URI가 Google 개발자 콘솔에 추가 한 리디렉션 URI와 일치하는지 확인하십시오. 승인 된 리디렉션 URI?

예를 들어, 아래 https://mysite.domain.net/는해야한다 동일 공인 리디렉션 된 URI에 나와있는 URI를 리디렉션 구글 개발자 콘솔 사이트에서 필드 :

Xamarin.Auth.OAuth2Authenticator auth = new Xamarin.Auth.OAuth2Authenticator(
    "560741372047-t00000000000v4vf0nvp0o7aqbu94.apps.googleusercontent.com", 
    "sHqEPlKg0000000000iP1x", 
    "openid email", 
    new System.Uri("https://accounts.google.com/o/oauth2/auth"), 
    new System.Uri("https://mysite.domain.net/"), 
    new System.Uri("https://accounts.google.com/o/oauth2/token")); 
+0

얍 당신이 못해 경우 인증 화면을 얻을 수있다 일치하지 않습니다. –

+0

로그인이 성공했습니다. DisplayAlert가 해당 오류와 함께 팝업되도록 허용하면 DENY 또는 ALLOW로 리디렉션됩니다. –