fix: trim the variable to avoid the effects of whitespace characters

This commit is contained in:
Polianin Nikita 2024-12-25 05:53:59 +03:00
parent 2ab5dea8ba
commit 5fa545e981

View File

@ -175,7 +175,7 @@ public class AuthService(ICacheService cache, IAccessToken accessTokenService, I
public async Task<TwoFactorAuthenticator> LoginAsync(CookieOptionsParameters cookieOptions, User user, HttpContext context, string password, string username, CancellationToken cancellation = default)
{
var requestContext = new RequestContextInfo(context, cookieOptions);
username = username.Trim();
await VerifyUserOrThrowError(requestContext, user, password, username, cancellation);
if (user.TwoFactorAuthenticator == TwoFactorAuthenticator.None)