I'm trying to retrieve date of birth from google account after user sign in with google but i'm unable to get dateofbirth. I'm using Microsoft.AspNetCore.Authentication.Google Nuget Package to authenticate google user
Here is my code
// Startup file to authenticate user
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie()
.AddGoogle(options =>
{
options.ClientId = _configuration["GoogleLogin:ClientId"];
options.ClientSecret = _configuration["GoogleLogin:ClientSecret"];
options.AccessDeniedPath = "/login";
options.Scope.Add("https://www.googleapis.com/auth/plus.login");
options.Scope.Add("https://www.googleapis.com/auth/userinfo.email");
options.Scope.Add("https://www.googleapis.com/auth/userinfo.profile");
options.Scope.Add("https://www.googleapis.com/auth/user.birthday.read");
});
// Here is my controller
var externalLoginInfo = await HttpContext.AuthenticateAsync(CookieAuthenticationDefaults.AuthenticationScheme);
this doesn't get any dob only name identifier, Display name, name, surname and email but birthday.