Fix blocking call in FindByEmailAsync (#24116)
This commit is contained in:
parent
95c3bd5426
commit
e7b55df6c5
|
|
@ -322,7 +322,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
return UserLogins.SingleOrDefaultAsync(userLogin => userLogin.LoginProvider == loginProvider && userLogin.ProviderKey == providerKey, cancellationToken);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Adds the given <paramref name="normalizedRoleName"/> to the specified <paramref name="user"/>.
|
||||
/// </summary>
|
||||
|
|
@ -637,7 +636,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
cancellationToken.ThrowIfCancellationRequested();
|
||||
ThrowIfDisposed();
|
||||
|
||||
return Task.FromResult(Users.Where(u => u.NormalizedEmail == normalizedEmail).SingleOrDefault());
|
||||
return Users.SingleOrDefaultAsync(u => u.NormalizedEmail == normalizedEmail);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -719,7 +718,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Remove a new user token.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue