Problem trying to use Buffer (base64 encoding) for authentication

This issue has been tracked since 2022-12-11.

Describe the bug
I am a novice programmer, so maybe there is a problem with my understanding. I am sorry if this is the case.
I am trying to use Buffer to get browserless to encode string in base64 for authentication purposes like this:
const encoded = Buffer.from('username:password', 'utf8').toString('base64')
There are no warnings, and nothing is output in debugging window. If I comment this line, it works.

To Reproduce
Steps to reproduce the behavior:

  1. Simply try to prepare authentication string with command above.

Desktop (please complete the following information):

  • OS: docker on Unraid
  • Browser: debugger
  • Version: latest

Additional context
Node version: v16.18.1
Npm version: 9.2.0

andyMrtnzP wrote this answer on 2022-12-17

Sorry, are you trying to authenticate a proxy? I assume that you want to add the encoded string to the HTTP headers. You can use Page.setExtraHTTPHeaders() for that

await page.setExtraHTTPHeaders({
  Authorization: `Basic ${encoded}`,
});

Though it can vary depending on what you're authenticating

andyMrtnzP wrote this answer on 2023-02-02

Closing this for lack of activity. Let us know if we should reconsider this,

More Details About Repo
Owner Name browserless
Repo Name chrome
Full Name browserless/chrome
Language TypeScript
Created Date 2017-11-17
Updated Date 2023-03-22
Star Count 5309
Watcher Count 47
Fork Count 516
Issue Count 29

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date