def METHOD_NAME(self) -> str:
    file_path = Extension.get_data_dir(self.config) / "cookie_secret"
    if not file_path.is_file():
        cookie_secret = secrets.token_hex(32)
        file_path.write_text(cookie_secret)
    else:
        cookie_secret = file_path.read_text().strip()
        if not cookie_secret:
            logging.error(
                f"HTTP server could not find cookie secret in {file_path}"
            )
    return cookie_secret