我的.NET Core RC1应用程序中有一个ServiceAccount连接可以正常工作。但是,现在“ServiceAccountCredential”不再存在于“Google.APIs.Auth.OAuth2”中。整个库似乎都缺少RTM版Core中的大量类。当使用ASP.NET核心(RTM)时,Google OAuth2“ServiceAccountCredential”不存在
下面是相关的包在我project.json
"Google.Apis.Core": "1.14.0",
"Google.Apis.Auth": "1.14.0",
"Google.Apis.Oauth2.v2": "1.14.0.540"
我甚至使用RC1包试过,但我不断收到同样的事情。是否仅仅因为Google Auth在Core中没有完全支持?
您是否尝试过使用'Microsoft.AspNetCore.Authentication.Google'软件包? https://github.com/aspnet/Security/tree/1.0.0/src/Microsoft.AspNetCore.Authentication.Google来源。 https://docs.asp.net/en/latest/security/authentication/sociallogins.html是facebook的一个例子。谷歌是类似的,但还没有在文档中。从上面检查GitHub存储库 – Tseng
直接链接到示例:P https://github.com/aspnet/Security/blob/1.0.0/samples/SocialSample/Startup.cs#L107-L121 – Tseng
@Tseng即关于身份验证通过谷歌。 OP希望使用Google API来使用服务帐户访问Google服务。 –