【发布时间】:2015-02-15 20:11:21
【问题描述】:
我正在尝试使用 google 登录验证我的 android 应用程序:
var auth = new OAuth2Authenticator (
clientId: CLIENTID,
scope: "https://www.googleapis.com/auth/userinfo.email",
authorizeUrl: new Uri ("https://accounts.google.com/o/oauth2/auth"),
redirectUrl: new Uri ("http://localhost"));
auth.Completed += (object sender, AuthenticatorCompletedEventArgs eventArgs) => {
if (eventArgs.IsAuthenticated) {
App.SuccessfulLoginAction.Invoke ();
App.SaveToken (eventArgs.Account.Properties["access_token"],App.Log_type.google);
} else {
////Cancelled
}
};
在 google 开发者控制台中没有 android 的客户端密码。在登录页面之后,它会显示一个带有错误 *unsupported_response_type 的屏幕。我正在努力解决这个错误,即使经过大量的谷歌搜索和搜索,我也不知道该怎么做。你能指出我正确的方向并告诉我我错过了什么吗?
谢谢
【问题讨论】:
标签: android oauth-2.0 xamarin google-api google-oauth