【发布时间】:2017-11-28 20:27:02
【问题描述】:
我正在尝试使用 google 身份验证 API 在我的 Web API 项目上进行 google 登录。创建了OAuth
我启用了 Google+ API
在我的Startup.Auth 上添加了Client ID 和Client Secret
app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
{
ClientId = "497652290327-gd5h0lrheuqcrtccp2c4rqi8dt5vpfb8.apps.googleusercontent.com",
ClientSecret = "sPGGSo2d7VZX7YnRNGmCPQDv"
});
但是当我尝试登录 URI 时显示
http://localhost:54388/#error=access_denied
这让我很生气,因为我按照kudvenkat 教程中的每个步骤操作,但仍然遇到此错误。我是不是做错了什么
请注意,我在此 google 登录中使用的凭据在我的数据库中不存在(如果重要的话)
【问题讨论】:
标签: asp.net api asp.net-web-api google-authentication