mirror of
https://github.com/bitwarden/server.git
synced 2024-11-25 12:45:18 +01:00
Fix null email parameter from missing email claim (#993)
This commit is contained in:
parent
fefa0e2dea
commit
80f2bf9260
@ -56,7 +56,7 @@ namespace Bit.Core.IdentityServer
|
||||
{
|
||||
var email = context.Result.ValidatedRequest.Subject?.GetDisplayName()
|
||||
?? context.Result.ValidatedRequest.ClientClaims?.FirstOrDefault(claim => claim.Type == JwtClaimTypes.Email)?.Value;
|
||||
var user = await _userManager.FindByEmailAsync(email);
|
||||
var user = string.IsNullOrWhiteSpace(email) ? null : await _userManager.FindByEmailAsync(email);
|
||||
return (user, user != null);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user