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);
|
return UserLogins.SingleOrDefaultAsync(userLogin => userLogin.LoginProvider == loginProvider && userLogin.ProviderKey == providerKey, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds the given <paramref name="normalizedRoleName"/> to the specified <paramref name="user"/>.
|
/// Adds the given <paramref name="normalizedRoleName"/> to the specified <paramref name="user"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -637,7 +636,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
|
|
||||||
return Task.FromResult(Users.Where(u => u.NormalizedEmail == normalizedEmail).SingleOrDefault());
|
return Users.SingleOrDefaultAsync(u => u.NormalizedEmail == normalizedEmail);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -719,7 +718,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Remove a new user token.
|
/// Remove a new user token.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue