Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/registration-rate-limit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'seamless-auth-api': patch
---

Rate limit the `POST /registration/register` endpoint.

Registration now applies the same per-IP and per-identity limiters already used by
the OTP and phone-registration routes. This closes an unthrottled path that allowed
registration/OTP spam and account enumeration against the endpoint.
1 change: 1 addition & 0 deletions src/routes/registration.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ registrationRouter.post(
{
summary: 'Register a new user',
tags: ['Registration'],
middleware: [otpIpLimiter, otpIdentityLimiter],

schemas: {
body: RegistrationRequestSchema,
Expand Down
Loading