Authentication 用于身份验证的Google.api.Auth.1.8.1示例(WP8、WP8.1和Windows应用商店应用程序)

Authentication 用于身份验证的Google.api.Auth.1.8.1示例(WP8、WP8.1和Windows应用商店应用程序),authentication,windows-phone-8,windows-store-apps,google-api-dotnet-client,Authentication,Windows Phone 8,Windows Store Apps,Google Api Dotnet Client,我正在尝试在Windows Phone和Windows应用商店应用程序中使用nuget包Google.api.Auth.1.8.1进行身份验证 我找到了这个 还有这个 但是我不想使用日历服务 我的问题是: 哪一个对我来说是最好的样本?我只想验证一下?这是(注意:这是针对Windows应用商店应用的) client_secrets.json的格式是什么?是这个吗 { "clientid ": "the client id here", "clientsecret ": "the clie

我正在尝试在Windows Phone和Windows应用商店应用程序中使用nuget包Google.api.Auth.1.8.1进行身份验证

我找到了这个 还有这个 但是我不想使用日历服务

我的问题是:

  • 哪一个对我来说是最好的样本?我只想验证一下?这是(注意:这是针对Windows应用商店应用的)

  • client_secrets.json的格式是什么?是这个吗

    {
      "clientid ": "the client id here",
      "clientsecret ": "the client secret here",
    }
    

  • CalendarService只是Google API服务的一个例子(任何Google服务,例如YouTubeService、DriveService都可以为您服务)

    你想干什么?如果你想使用谷歌服务,你应该从网站下载正确的服务

    如果您只想进行身份验证,请使用刚才提到的AuthorizeAsync方法。 此处介绍了Windows应用商店应用程序验证:

    请在此处阅读有关客户端机密以及如何下载它们的更多信息:


    祝你好运

    我只想创建一个带有使用谷歌认证按钮的应用程序,对我来说,使用日历或驱动器等服务没有意义,因为我不需要它,我不会使用它。只需要验证。。。AuthorizeAsync方法的作用域是否可以为null?我想您应该使用以下作用域“”。我找到了我的解决方案:_credential=wait GoogleWebAuthorizationBroker.AuthorizeAsync(新ClientSecrets{ClientId=Constants.GoogleClientId,ClientSecret=Constants.GoogleClientSecret},新[]{Oauth2Service.Scope.UserinfoEmail,Oauth2Service.Scope.UserinfoProfile},“用户”,CancellationToken.None);
    {
      "clientid ": "the client id here",
      "clientsecret ": "the client secret here",
    }