Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🔒️ Harden rate limits on auth endpoints (#2193)

Luke Vellaa3f665d734e7
diff --git a/apps/web/src/lib/auth.ts b/apps/web/src/lib/auth.ts
index 34022571b..0480b12e0 100644
--- a/apps/web/src/lib/auth.ts
+++ b/apps/web/src/lib/auth.ts
@@ -224,6 +224,16 @@ export const authLib = betterAuth({
rateLimit: {
enabled: isRateLimitEnabled,
storage: isKvEnabled() ? "secondary-storage" : "memory",
+ customRules: {
+ "/sign-up/email": {
+ window: 60 * 60, // 1 hour
+ max: 5,
+ },
+ "/email-otp/send-verification-otp": {
+ window: 60 * 60, // 1 hour
+ max: 10,
+ },
+ },
},
account: {
accountLinking: {