feat: start using refresh tokens and better session handler

This commit is contained in:
canove
2020-09-29 20:30:02 -03:00
parent 3a777dec39
commit c8b4b5bdfe
16 changed files with 209 additions and 46 deletions

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 not provided.", 403);
throw new AppError("Token was not provided.", 403);
}
const [, token] = authHeader.split(" ");