【发布时间】:2014-04-28 17:43:45
【问题描述】:
我正在尝试使用 OWIN Security 从 google OAuth 握手中检索其他信息。
我有以下要求向 Google 请求用户个人资料声明,并且 google 权限页面反映了此声明已请求。
var googleConfig = new Microsoft.Owin.Security.Google.GoogleOAuth2AuthenticationOptions
{
ClientId = ClientId",
ClientSecret = "Secret"
};
googleConfig.Scope.Add("https://www.googleapis.com/auth/userinfo.profile");
app.UseGoogleAuthentication(googleConfig);
但是,当我使用 AuthenticationManager.GetExternalLoginInfoAsync(); 收到回复时,用户只有一个名称声明。
我需要做什么才能在登录时从谷歌取回用户配置文件数据?
【问题讨论】:
标签: c# oauth-2.0 google-oauth owin