相关疑难解决方法(0)

在默认MVC5应用程序中的帐户关联步骤中从外部提供商Google和Facebook获取电子邮件

显然,您可以通过在以下FacebookAuthenticationOptions对象中添加范围来向Facebook提供商执行此操作Startup.Auth.cs:

http://blogs.msdn.com/b/webdev/archive/2013/10/16/get-more-information-from-social-providers-used-in-the-vs-2013-project-templates.aspx

List<string> scope = new List<string>() { "email" };
var x = new FacebookAuthenticationOptions();
x.Scope.Add("email");
...
app.UseFacebookAuthentication(x);
Run Code Online (Sandbox Code Playgroud)

如何与Google提供商进行相同的操作?类/对象没有x.Scope属性GoogleAuthenticationOptions!

asp.net-mvc-5 asp.net-identity asp.net-identity-2

25
推荐指数
2
解决办法
2万
查看次数