Notify the user after three failed login attempts

This commit is contained in:
kolaente 2021-07-30 15:01:04 +02:00
parent 220f43331f
commit d746c1bede
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
4 changed files with 84 additions and 10 deletions

View file

@ -92,6 +92,9 @@ func Login(c echo.Context) error {
if err := keyvalue.Del(user.GetFailedTOTPAttemptsKey()); err != nil {
return err
}
if err := keyvalue.Del(user.GetFailedPasswordAttemptsKey()); err != nil {
return err
}
if err := s.Commit(); err != nil {
_ = s.Rollback()