Skip to content

Change log level from warning to debug in SignInManager #40179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Identity/Core/src/SignInManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,17 @@ public virtual async Task<bool> CanSignInAsync(TUser user)
{
if (Options.SignIn.RequireConfirmedEmail && !(await UserManager.IsEmailConfirmedAsync(user)))
{
Logger.LogWarning(EventIds.UserCannotSignInWithoutConfirmedEmail, "User cannot sign in without a confirmed email.");
Logger.LogDebug(EventIds.UserCannotSignInWithoutConfirmedEmail, "User cannot sign in without a confirmed email.");
return false;
}
if (Options.SignIn.RequireConfirmedPhoneNumber && !(await UserManager.IsPhoneNumberConfirmedAsync(user)))
{
Logger.LogWarning(EventIds.UserCannotSignInWithoutConfirmedPhoneNumber, "User cannot sign in without a confirmed phone number.");
Logger.LogDebug(EventIds.UserCannotSignInWithoutConfirmedPhoneNumber, "User cannot sign in without a confirmed phone number.");
return false;
}
if (Options.SignIn.RequireConfirmedAccount && !(await _confirmation.IsConfirmedAsync(UserManager, user)))
{
Logger.LogWarning(EventIds.UserCannotSignInWithoutConfirmedAccount, "User cannot sign in without a confirmed account.");
Logger.LogDebug(EventIds.UserCannotSignInWithoutConfirmedAccount, "User cannot sign in without a confirmed account.");
return false;
}
return true;
Expand Down Expand Up @@ -393,7 +393,7 @@ public virtual async Task<SignInResult> CheckPasswordSignInAsync(TUser user, str

return SignInResult.Success;
}
Logger.LogWarning(EventIds.InvalidPassword, "User failed to provide the correct password.");
Logger.LogDebug(EventIds.InvalidPassword, "User failed to provide the correct password.");

if (UserManager.SupportsUserLockout && lockoutOnFailure)
{
Expand Down Expand Up @@ -840,7 +840,7 @@ protected virtual async Task<bool> IsLockedOut(TUser user)
/// <returns>A locked out SignInResult</returns>
protected virtual Task<SignInResult> LockedOut(TUser user)
{
Logger.LogWarning(EventIds.UserLockedOut, "User is currently locked out.");
Logger.LogDebug(EventIds.UserLockedOut, "User is currently locked out.");
return Task.FromResult(SignInResult.LockedOut);
}

Expand Down