Skip to content

Commit cd678f8

Browse files
authored
Change log level from warning to debug in SignInManager (#40179)
1 parent b0dfd1a commit cd678f8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Identity/Core/src/SignInManager.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,17 @@ public virtual async Task<bool> CanSignInAsync(TUser user)
142142
{
143143
if (Options.SignIn.RequireConfirmedEmail && !(await UserManager.IsEmailConfirmedAsync(user)))
144144
{
145-
Logger.LogWarning(EventIds.UserCannotSignInWithoutConfirmedEmail, "User cannot sign in without a confirmed email.");
145+
Logger.LogDebug(EventIds.UserCannotSignInWithoutConfirmedEmail, "User cannot sign in without a confirmed email.");
146146
return false;
147147
}
148148
if (Options.SignIn.RequireConfirmedPhoneNumber && !(await UserManager.IsPhoneNumberConfirmedAsync(user)))
149149
{
150-
Logger.LogWarning(EventIds.UserCannotSignInWithoutConfirmedPhoneNumber, "User cannot sign in without a confirmed phone number.");
150+
Logger.LogDebug(EventIds.UserCannotSignInWithoutConfirmedPhoneNumber, "User cannot sign in without a confirmed phone number.");
151151
return false;
152152
}
153153
if (Options.SignIn.RequireConfirmedAccount && !(await _confirmation.IsConfirmedAsync(UserManager, user)))
154154
{
155-
Logger.LogWarning(EventIds.UserCannotSignInWithoutConfirmedAccount, "User cannot sign in without a confirmed account.");
155+
Logger.LogDebug(EventIds.UserCannotSignInWithoutConfirmedAccount, "User cannot sign in without a confirmed account.");
156156
return false;
157157
}
158158
return true;
@@ -393,7 +393,7 @@ public virtual async Task<SignInResult> CheckPasswordSignInAsync(TUser user, str
393393

394394
return SignInResult.Success;
395395
}
396-
Logger.LogWarning(EventIds.InvalidPassword, "User failed to provide the correct password.");
396+
Logger.LogDebug(EventIds.InvalidPassword, "User failed to provide the correct password.");
397397

398398
if (UserManager.SupportsUserLockout && lockoutOnFailure)
399399
{
@@ -840,7 +840,7 @@ protected virtual async Task<bool> IsLockedOut(TUser user)
840840
/// <returns>A locked out SignInResult</returns>
841841
protected virtual Task<SignInResult> LockedOut(TUser user)
842842
{
843-
Logger.LogWarning(EventIds.UserLockedOut, "User is currently locked out.");
843+
Logger.LogDebug(EventIds.UserLockedOut, "User is currently locked out.");
844844
return Task.FromResult(SignInResult.LockedOut);
845845
}
846846

0 commit comments

Comments
 (0)