Socket
Book a DemoInstallSign in
Socket

bs-auth

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bs-auth

Middleware for Browsersync basic authorization

1.2.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

bs-auth 1.1.6

npm npm npm

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

Keywords

browsersync

FAQs

Package last updated on 17 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.