backend: Rate limit login attempts per email and IP

This commit is contained in:
GonnaHetzMe committed 2026-12-04 23:45:00 +01:00
1 parent 5470818841
commit 52fb8af684
18 files changed
+106 -116

No files matched your search

@@ -54,6 +54,8 @@ public sealed class EmailConfirmationTests(BackendFixture fixture) : IClassFixtu
var original = scope.ServiceProvider.GetRequiredService<ITokenService>().Issue(pending, TokenType.EmailConfirm);
db.AuthTokens.Add(original.Record);
await db.SaveChangesAsync(Cancellation);
await ExpectAsync(anonymous.PostAsJsonAsync(Login, new LoginRequest(address, oldPassword), Cancellation),
HttpStatusCode.Unauthorized);
await ExpectAsync(anonymous.PostAsJsonAsync(Register, new RegisterRequest(address, "Jiné", "Jméno"), Cancellation),
HttpStatusCode.Created);