Skip to content

Commit

Permalink
fix(doc): fix authenticate example in doc (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuigo authored Jan 14, 2025
1 parent 9b8fb07 commit d4da2ea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ const anotherBrowser = await launch({ wsEndpoint: browser.wsEndpoint() });

```ts
// Open a new page
const page = await browser.newPage(
"https://httpbin.org/basic-auth/user/passwd",
);
const page = await browser.newPage();

// Provide credentials for HTTP authentication.
await page.authenticate({ username: "user", password: "passwd" });
const url = "https://postman-echo.com/basic-auth";
await page.authenticate({ username: "postman", password: "password" });
await page.goto(url, { waitUntil: "networkidle2" });
```

## BYOB - Bring Your Own Browser
Expand Down Expand Up @@ -205,8 +205,8 @@ await browser.close();
> workarounds, see
> https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
The following shell can remove AppArmor restrictions on user namespaces so that
Puppeteer can launch Chrome without the "No usable sandbox!" error (Refer
The following command removes AppArmor restrictions on user namespaces, allowing
Puppeteer to launch Chrome without the "No usable sandbox!" error (see
[puppeteer#13196](https://github.com/puppeteer/puppeteer/pull/13196)):

echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns

0 comments on commit d4da2ea

Please sign in to comment.