Actually verify the password on login

This commit is contained in:
jvyden 2021-11-20 00:13:11 -05:00
commit bb4cecee2e
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -30,6 +30,8 @@ namespace LBPUnion.ProjectLighthouse.Pages.ExternalAuth
User? user = await this.database.Users.FirstOrDefaultAsync(u => u.Username == username);
if (user == null) return this.StatusCode(403, "");
if (!BCrypt.Net.BCrypt.Verify(password, user.Password)) return this.StatusCode(403, "");
Console.WriteLine(user.UserId);
}