bs-auth
v1.2.0
Published
Middleware for Browsersync basic authorization
Downloads
444
Maintainers
Readme
bs-auth 1.1.6
Browsersync basic authorization middleware plugin
Install
npm i browser-sync bs-auth
Usage
const bs = require('browser-sync').create();
bs.use(require('bs-auth'), {
user: 'user',
pass: 'password'
});
or
const bs = require('browser-sync').create();
bs.init({
... some options
plugins: [
{
module: 'bs-auth',
options: {
user: 'user',
pass: 'password'
}
}
]
}, () => {
bs.getOption('bsAuth'); // get plugin current options
});
Browsersync plugins configure
Default plugin options
generatePassword: {
length: 7,
numbers: true
},
user: 'browsersync',
pass: false, // if not set or false, plugin generate random password
use: true
generatePassword
options from generate-password