validateSessionMiddleware = async (req, res, next) => {
  let session = await validateSession(req, res);
  if (!session) {
    return;
  }

  res.locals = session;
  next();
}
@param {import('express').Request} req
@param {import('express').Response} res
@param {import('express').NextFunction} next