I am using the default code from ASP.NET Web api for facebook authentication. The facebook cookie is being passed to my ExternalLogin endpoint. However the claims about Email is not available.
User.Identity doesnt have a value for Email or a Claim for Email.
How can I get that additional information?
app.UseOAuthBearerTokens(OAuthOptions);
app.UseCookieAuthentication(new CookieAuthenticationOptions());
facebookAuthOptions = new FacebookAuthenticationOptions()
{
AppId = "xx",
AppSecret = "xxx"
// Provider = new FacebookAuthProvider()
};
facebookAuthOptions.Scope.Add("email");
facebookAuthOptions.Scope.Add("public_profile");
// facebookAuthOptions.SignInAsAuthenticationType = Microsoft.AspNet.Identity.DefaultAuthenticationTypes.ExternalCookie;
app.UseFacebookAuthentication(facebookAuthOptions);
FacebookAuthenticatedContext.User
doesnt only contains id
and name
Using the FB SDK I can see my email..