C# Windows Phone上的Google OAuth失败

C# Windows Phone上的Google OAuth失败,c#,windows-phone-8.1,google-calendar-api,azure-mobile-services,google-api-dotnet-client,C#,Windows Phone 8.1,Google Calendar Api,Azure Mobile Services,Google Api Dotnet Client,我有一个windows phone 8.1应用程序,我正在尝试使用Azure Mobile Services Auth或Google Auth library进行Google Auth,但使用这两种方法都失败,返回400错误。我进入登录页面,登录后返回400,不带我进入同意页面 以下是我的谷歌认证代码: IConfigurableHttpClientInitializer credential; var clientSecrets = new Uri(Setti

我有一个windows phone 8.1应用程序,我正在尝试使用Azure Mobile Services Auth或Google Auth library进行Google Auth,但使用这两种方法都失败,返回400错误。我进入登录页面,登录后返回400,不带我进入同意页面

以下是我的谷歌认证代码:

        IConfigurableHttpClientInitializer credential; 
        var clientSecrets = new Uri(Settings.GoogleClientSecretsUri, UriKind.Absolute);
        var scopes = new[] {CalendarService.Scope.Calendar};

        credential = await GoogleWebAuthorizationBroker
            .AuthorizeAsync(
                clientSecrets,
                scopes, 
                "user", 
                CancellationToken.None
           );

        Initializer = new BaseClientService.Initializer{
            HttpClientInitializer = credential,
            ApplicationName = Settings.ApplicationName
Azure Auth是非常直接的单行代码

        azureClient.LoginAsync(MobileServiceAuthenticationProvider.Google);
我的Azure身份验证代码在Facebook和Microsoft帐户上运行良好。 我在谷歌开发者控制台上的重定向Uri是一种格式,我也尝试过。
有人在Windows Phone上成功地使用过Google Auth吗?

你可以试着把Google.net客户端库分开,看看他们是怎么做的。400错误表示您的请求有严重错误。可以是客户端id或客户端机密的格式。为什么不使用谷歌的客户端库呢?我发布的谷歌认证代码使用的是谷歌.net库。对于客户端机密,我下载了google生成的json文件。Google library正在读取Google生成的json文件查看示例: