We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07319a5 commit 1b169c6Copy full SHA for 1b169c6
1 file changed
src/backend/src/utils/auth.utils.ts
@@ -37,8 +37,6 @@ export const requireJwtProd = (req: Request, res: Response, next: NextFunction)
37
38
if (!token) return res.status(401).json({ message: 'Authentication Failed: Cookie not found!' });
39
40
- //uses the VerifyCallback type in the index.d.ts file for err and decoded types.
41
- //Only jwtPayload of the decoded types has a userID, so other types throw an error
42
jwt.verify(token, TOKEN_SECRET, (err: VerifyErrors | null, decoded: string | JwtPayload | undefined) => {
43
if (err) return res.status(401).json({ message: 'Authentication Failed: Invalid JWT!' });
44
0 commit comments