DEV Community

Cover image for Run Google's Lighthouse under authenticated websites

Run Google's Lighthouse under authenticated websites

olavoparno profile image Olavo Parno ・2 min read

Have you ever run into a situation where your website demands some performance tweaks so you think of Google's Lighthouse and faces this problem:

Alt Text

Fear not, my friend, for there are multiple solutions for this. See the links below for more info:

In this article I am covering the Option 4 from the Auth Docs: Open a debug instance of Chrome and manually log in

Alt Text

Personal Notes

  • The application must be served either on a server or locally e.g.: or http://localhost:port (seems obvious, doesn't it?)
  • Run chrome-debug so that the debugging browser is opened and the debugging port is shown
  • If the opened window closes before being able to login, use the --max-wait-for-load 15000 for 15 seconds or so (time in milliseconds)
  • Say the application is behind SSL certificates, auto-signed ones, and there is a need to accept the risk everytime one runs it, bypass it by using the --chrome-flags="--ignore-certificate-errors" flag
  • There are a bunch of other flags listed here Lighthouse CLI Flags

  • Final command with the beforementioned flags:

lighthouse http://localhost:3000 --disable-storage-reset --chrome-flags="--ignore-certificate-errors" --max-wait-for-load 15000 --port 45457

Thats it, a short and direct approach. There are multiple ways described in their docs but this is the most straighforward I could find.

Discussion (4)

Editor guide
kontrollanten profile image

Thanks for sharing!

olavoparno profile image
wakeupmh profile image
Marcos Henrique

awesome dude

olavoparno profile image
Olavo Parno Author

You're awesome!