fix: user keep getting refresh tokens after logout

This commit is contained in:
canove
2021-01-12 20:13:30 -03:00
parent f36f20e89c
commit 96e92e6079

View File

@@ -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(" ");