Skip to content

Commit de07f30

Browse files
fix: 토큰 에러 제거
1 parent af077f5 commit de07f30

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

apps/backend/src/auth/token/token.service.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Injectable } from '@nestjs/common';
22
import { JwtService } from '@nestjs/jwt';
33
import { Response } from 'express';
4-
import { InvalidTokenException } from '../../exception/invalid.exception';
54

65
const HOUR = 60 * 60;
76
const DAY = 24 * 60 * 60;
@@ -34,13 +33,9 @@ export class TokenService {
3433
}
3534

3635
verifyInviteToken(token: string): { workspaceId: string; role: string } {
37-
try {
38-
return this.jwtService.verify(token, {
39-
secret: process.env.JWT_SECRET,
40-
});
41-
} catch (error) {
42-
throw new InvalidTokenException();
43-
}
36+
return this.jwtService.verify(token, {
37+
secret: process.env.JWT_SECRET,
38+
});
4439
}
4540

4641
// 후에 DB 로직 (지금은 refreshToken이 DB로 관리 X)

0 commit comments

Comments
 (0)