Skip to content

Commit 52ead55

Browse files
fix: apply authLimiter to OTP and password reset routes (#264)
* fix: apply authLimiter to OTP and password reset routes * refactor: isolate auth routes from dashboard limiter
1 parent ed66a6c commit 52ead55

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

  • apps/dashboard-api/src/routes

apps/dashboard-api/src/routes/auth.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ const dashboardLimiter = rateLimit({
3131
router.post('/register', authLimiter, register);
3232

3333
router.post('/login', authLimiter, login);
34+
35+
router.post('/send-otp', authLimiter, sendOtp);
36+
router.post('/verify-otp', authLimiter, verifyOtp);
37+
38+
router.post('/forgot-password', authLimiter, forgotPassword);
39+
router.post('/reset-password', authLimiter, resetPassword);
40+
3441
router.get('/github/start', startGithubAuth);
3542
router.get('/github/callback', handleGithubCallback);
3643

@@ -40,12 +47,6 @@ router.put('/change-password', authorization, changePassword);
4047

4148
router.delete('/delete-account', authorization, deleteAccount);
4249

43-
router.post('/send-otp', sendOtp);
44-
router.post('/verify-otp', verifyOtp);
45-
46-
router.post('/forgot-password', forgotPassword);
47-
router.post('/reset-password', resetPassword);
48-
4950
router.post('/refresh-token', refreshToken);
5051
router.post('/logout', authorization, logout);
5152

0 commit comments

Comments
 (0)