Well, I'm developing a puppeteer app that accepts two parameters: url and cookies. The application's strategy is when the user logs into a site "x", it sends a request to the puppeteer app passing the url and all the cookies on the page, so the puppeteer sets the cookies and goes to the url provided by the parameter and does some automations.
The question here is, how to know when the user is logged into the site to send the request passing the valid cookies?
ps: I've thought of several ways to do this, like waiting for some selector that only appears when the user is logged in. But I don't think that's the professional way to do it, and it only works for a specific site. I'm looking for something dynamic that will work for any website.
Thanks advanced!!