Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for http authentication #419

Open
pdaether opened this issue Jul 16, 2021 · 1 comment
Open

Option for http authentication #419

pdaether opened this issue Jul 16, 2021 · 1 comment

Comments

@pdaether
Copy link

I'm using minimalcss on a staging system which is protected with a basic http authentication.
At the moment this only works with minimalcss when giving the credentials as part of the URL wich is not perfect, because then you have the password in different logs.
It would be nice if it would be possible to give username and password as part of the options so that minimalcss can set the credentials on the puppeteer page object.

I know that I can pass a puppeteer browser instance, but the the credentials need to be given to the page object, so I guess best place would be somewhere in src/run.js

const page = await browser.newPage();
await page.authenticate({'username':options.auth.username, 'password': options.auth.password});

If you agree on a general approach, I'm also happy to provide a PR.

@peterbe
Copy link
Owner

peterbe commented Jul 16, 2021

If you agree on a general approach, I'm also happy to provide a PR.

Please go for it! Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants