puppeteer/docs/api/puppeteer.page.authenticate.md

57 lines
704 B
Markdown
Raw Normal View History

2022-07-05 13:41:43 +00:00
---
sidebar_label: Page.authenticate
---
# Page.authenticate() method
Provide credentials for `HTTP authentication`.
:::note
Request interception will be turned on behind the scenes to implement authentication. This might affect performance.
:::
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
class Page {
abstract authenticate(credentials: Credentials | null): Promise<void>;
2022-07-05 13:41:43 +00:00
}
```
## Parameters
<table><thead><tr><th>
2022-07-05 13:41:43 +00:00
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
credentials
</td><td>
[Credentials](./puppeteer.credentials.md) \| null
</td><td>
</td></tr>
</tbody></table>
2022-07-05 13:41:43 +00:00
**Returns:**
Promise&lt;void&gt;
## Remarks
To disable authentication, pass `null`.