How to log in to Google with Puppeteer

Today we talk about how to log in to Google with Puppeteer.

Sample code here

Stealth Plugin

Generally I would say that you want to use Google’s API, which is pretty powerful, to do most of what you are trying to do.

Should you need to log in to Google with Puppeteer, however, this should help you overcome the “This browser or app is not secure” error that pops up.


Hello there I’m Jordan Hanson talking about, um, had a question about how to log into Google with E puppeteer. I don’t know. There’s probably reasons, right. There always can be weird reasons. I’ll let you can do a lot via the API in Google. So you don’t really have to log in puppet together that often, but maybe for some, for some reason, whatever the point is, can we do it?

And that’s what I wanted to try. Now. I am in a incognito. I just went and found this URL here. I just went incognito Cognito and got here and they got this. And that’s what we’re doing. We’re going to do, I’m going to show what it looks like without this solution. And then with the solution, we’re going to go here to this page and then email, and then we’ll type it out, username in this field, click the button, wait just for whatever, you can fix this to be a correct thing for whenever you’re in production or whatever, then it’s like, wait for a selector or whatever.

But anyway, this is what it looks like with out our solution. You go out like this. And I don’t know why it does this. It comes over here and it says this browser or app may not be secure and says, so this is what the person wants reporting that they saw this. And I’m not sure why it must maybe, maybe it’s an older version of Chrome that it would be surprised, I guess.

Maybe that’s why. And so it knows there’s an issue there. And, uh, let’s try it with, uh, the solution, which is actually just this, we’ve talked about it before the puppet here, stealth, if you come over here and it’s really simple, you just installed this package puppet or extra and the stealth plug-in and then you just use it.

And what it does is it updates a lot of them. It just reports differently to the. The server, it just says, Hey, I have these things, these plugins, all this different stuff that makes it seem like I’m more, I’m more likely to be a user, uh, scraping instead of just a whatever someone else. And then we run it.

You can see the signs in there. I see looks a lot better now done. Just like that. So, uh, puppetry or stealth was the solution for me. Um, I pretty sure this will address it for that user. I think it was called borough or something. Anyway, here’s your video? This should help, uh, good luck.