From 96e92e60796f1c89915e36d0eb94c971f0b464c9 Mon Sep 17 00:00:00 2001 From: canove Date: Tue, 12 Jan 2021 20:13:30 -0300 Subject: [PATCH] fix: user keep getting refresh tokens after logout --- backend/src/middleware/isAuth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/middleware/isAuth.ts b/backend/src/middleware/isAuth.ts index ae70f05..83cae2a 100644 --- a/backend/src/middleware/isAuth.ts +++ b/backend/src/middleware/isAuth.ts @@ -16,7 +16,7 @@ const isAuth = (req: Request, res: Response, next: NextFunction): void => { const authHeader = req.headers.authorization; if (!authHeader) { - throw new AppError("Token was not provided.", 403); + throw new AppError("ERR_SESSION_EXPIRED", 401); } const [, token] = authHeader.split(" ");