【问题标题】:Google OAuth 2 authorization in android application - Error: unsupportedt_response_typeandroid 应用程序中的 Google OAuth 2 授权 - 错误:unsupportedt_response_type
【发布时间】: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


    【解决方案1】:

    这个错误很简单。您对请求的响应类型错误。它应该是该特定 URL 的“令牌”。如果您使用的是隐式授权流程。更多信息here

    【讨论】:

      猜你喜欢
      • 2012-07-14
      • 1970-01-01
      • 1970-01-01
      • 2021-10-14
      • 2020-02-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多