I'm trying to scrape a website that needs login. The code snippet below works by saving username and password in a config JSON file. If someone gets access to the config file, the login information will be leaked out. Is there a better way to enhance security, say encrypting the username and password? Thanks in advance!
await page.goto("https://www.facebook.com/", { waitUntil: "networkidle0" });
await page.type("#email", config.username, { delay: 30 });
await page.type("#pass", config.password, { delay: 30 });