Saturday, July 2, 2022

Staying logged into a web site when using puppeteer

Do you want to stay logged into a site after manually logging in with puppeteer?

This task is not as easy as just specifying the user data directory based on feedback from the following Github thread.

The work around is to save cookies after logging in and then load those cookies in subsequent sessions. Here is the answer from Github.