Initially I was using:
var user = await _userManager.FindByEmailAsync(email);
and now I’m using:
var user = await _userManager.Users
.Include(p => p.TokensPoints)
.Include(p => p.UserRoles)
.ThenInclude(r => r.Role)
.SingleOrDefaultAsync(x => x.NormalizedEmail == email);
In terms of security for logging into a user account like this:
var result = await _signInManager.CheckPasswordSignInAsync(user, password, false);
Is there any difference between the two calls to fetch the user? Pro’s vs Con’s