Skip to content

Commit 5e07e4e

Browse files
committed
feat: add throttle usage for magic link login endpoint
1 parent 20b5c99 commit 5e07e4e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/auth/auth.controller.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { AuthGuard } from '@nestjs/passport';
1212
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
1313
import type { Request, Response } from 'express';
1414

15+
import { UseThrottle } from '@server/Throttle/Throttles';
1516
import { AuthService } from './auth.service';
1617
import { MagicLinkEmailStrategy } from './strategies/magicLinkEmail.strategy';
1718

@@ -26,6 +27,7 @@ export class AuthController {
2627
private readonly magicLinkEmailStrategy: MagicLinkEmailStrategy,
2728
) {}
2829

30+
@UseThrottle('very-long')
2931
@Post('login/magic-link')
3032
@ApiOperation({
3133
summary:

0 commit comments

Comments
 (0)