Skip to content

Commit

Permalink
Bring back auth/signup-specific rate limiters
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuan Dang committed Nov 21, 2022
1 parent 5db5c64 commit 518872d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions backend/src/routes/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ router.post(

router.post(
'/login1',
// loginLimiter,
loginLimiter,
body('email').exists().trim().notEmpty(),
body('clientPublicKey').exists().trim().notEmpty(),
validateRequest,
Expand All @@ -22,7 +22,7 @@ router.post(

router.post(
'/login2',
// loginLimiter,
loginLimiter,
body('email').exists().trim().notEmpty(),
body('clientProof').exists().trim().notEmpty(),
validateRequest,
Expand Down
8 changes: 4 additions & 4 deletions backend/src/routes/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import { signupLimiter } from '../helpers/rateLimiter';

router.post(
'/email/signup',
// signupLimiter,
signupLimiter,
body('email').exists().trim().notEmpty().isEmail(),
validateRequest,
signupController.beginEmailSignup
);

router.post(
'/email/verify',
// signupLimiter,
signupLimiter,
body('email').exists().trim().notEmpty().isEmail(),
body('code').exists().trim().notEmpty(),
validateRequest,
Expand All @@ -24,7 +24,7 @@ router.post(

router.post(
'/complete-account/signup',
// signupLimiter,
signupLimiter,
requireSignupAuth,
body('email').exists().trim().notEmpty().isEmail(),
body('firstName').exists().trim().notEmpty(),
Expand All @@ -42,7 +42,7 @@ router.post(

router.post(
'/complete-account/invite',
// signupLimiter,
signupLimiter,
requireSignupAuth,
body('email').exists().trim().notEmpty().isEmail(),
body('firstName').exists().trim().notEmpty(),
Expand Down

0 comments on commit 518872d

Please sign in to comment.