feat(login): add code login limit (#1442)

This commit is contained in:
Ngọc Long
2023-01-06 17:51:43 +07:00
committed by GitHub
parent b525210835
commit 1d8b0a264e
12 changed files with 60 additions and 38 deletions

View File

@ -147,7 +147,7 @@ func checkSigninErrorTimes(user *User, lang string) string {
// deny the login if the error times is greater than the limit and the last login time is less than the duration
if seconds > 0 {
return fmt.Sprintf(i18n.Translate(lang, "check:You have entered the wrong password too many times, please wait for %d minutes %d seconds and try again"), seconds/60, seconds%60)
return fmt.Sprintf(i18n.Translate(lang, "check:You have entered the wrong password or code too many times, please wait for %d minutes %d seconds and try again"), seconds/60, seconds%60)
}
// reset the error times