Skip to content

Commit

Permalink
doc: improve authentication guide
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Jun 4, 2024
1 parent 11e0f79 commit c56eadf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
3 changes: 1 addition & 2 deletions docs/content/1.guide/guides/1.debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ title: Debugging
description: Steps to take when you need to debug Unlighthouse.
---


Unlighthouse is built with many edge-cases in mind, but can't always account for every website.
Unlighthouse is built with many edge-cases in mind, but can't always account for every website.

## Enable debugging logs

Expand Down
21 changes: 19 additions & 2 deletions docs/content/1.guide/guides/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,19 +148,36 @@ export default {
}
```

## Persisting Authentication

If you need to persist your authentication data and it's not working as expected, you can configure Unlighthouse as follows:

```ts [unlighthouse.config.ts]
export default {
// show the browser window
puppeteerOptions: {
userDataDir: './.puppeteer_data',
},
lighthouseOptions: {
disableStorageReset: true,
skipAboutBlank: true,
},
}
```

## Troubleshooting

If you're having trouble authenticating,
you can use the `debug: true` and `headless: false`,
flags to see what's happening.

```bash
// unlighthouse.config.ts
```ts [unlighthouse.config.ts]
export default {
debug: true,
// show the browser window
puppeteerOptions: {
headless: false,
slowMo: 100,
},
// only run a single scan at a time
puppeteerClusterOptions: {
Expand Down
2 changes: 1 addition & 1 deletion docs/content/1.guide/guides/chrome-dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ As a fallback, it will download a Chromium binary for you.

## Disabling system Chrome

You can disable the system chrome usage by modifying the `chrome.useSystem` flag.
You can disable the system chrome usage by modifying the `chrome.useSystem` flag.

This will make Unlighthouse download and use the latest Chrome binary instead.

Expand Down

0 comments on commit c56eadf

Please sign in to comment.