{"id":16000093,"url":"https://github.com/yunusga/bs-auth","last_synced_at":"2025-05-03T14:32:09.959Z","repository":{"id":70085635,"uuid":"97945607","full_name":"yunusga/bs-auth","owner":"yunusga","description":"Browsersync basic authorization middleware plugin","archived":false,"fork":false,"pushed_at":"2021-09-17T14:56:23.000Z","size":14,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T20:07:19.404Z","etag":null,"topics":["authorization","authorization-middleware","browser-sync","browsersync","browsersync-plugin","middleware","plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yunusga.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-21T12:31:10.000Z","updated_at":"2021-09-17T14:56:05.000Z","dependencies_parsed_at":"2023-03-01T18:31:02.336Z","dependency_job_id":null,"html_url":"https://github.com/yunusga/bs-auth","commit_stats":null,"previous_names":["tazau/bs-auth"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunusga%2Fbs-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunusga%2Fbs-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunusga%2Fbs-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunusga%2Fbs-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yunusga","download_url":"https://codeload.github.com/yunusga/bs-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252203307,"owners_count":21710938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authorization","authorization-middleware","browser-sync","browsersync","browsersync-plugin","middleware","plugin"],"created_at":"2024-10-08T09:01:53.755Z","updated_at":"2025-05-03T14:32:09.426Z","avatar_url":"https://github.com/yunusga.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bs-auth \u003csup\u003e[1.1.6](https://github.com/tazau/bs-auth/blob/master/CHANGELOG.md)\u003c/sup\u003e\n\n[![npm](https://img.shields.io/npm/v/bs-auth.svg)](https://www.npmjs.com/package/bs-auth) [![npm](https://img.shields.io/npm/l/bs-auth.svg)](https://www.npmjs.com/package/bs-auth) [![npm](https://img.shields.io/npm/dm/bs-auth.svg)](https://www.npmjs.com/package/bs-auth)\n\n\u003e [Browsersync](https://browsersync.io/) basic authorization middleware plugin\n\n## Install\n`npm i browser-sync bs-auth`\n\n## Usage\n```javascript\nconst bs = require('browser-sync').create();\n\nbs.use(require('bs-auth'), {\n    user: 'user',\n    pass: 'password'\n});\n```\n\nor\n\n```javascript\nconst bs = require('browser-sync').create();\n\nbs.init({\n    ... some options\n    plugins: [\n        {\n            module: 'bs-auth',\n            options: {\n                user: 'user',\n                pass: 'password'\n            }\n        }\n    ]\n}, () =\u003e {\n    bs.getOption('bsAuth'); // get plugin current options\n});\n```\n\nBrowsersync [plugins configure](https://browsersync.io/docs/options#option-plugins)\n\n## Default plugin options\n```javascript\ngeneratePassword: {\n    length: 7,\n    numbers: true\n},\nuser: 'browsersync',\npass: false, // if not set or false, plugin generate random password\nuse: true\n```\n`generatePassword` options from [generate-password](https://www.npmjs.com/package/generate-password)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunusga%2Fbs-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyunusga%2Fbs-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunusga%2Fbs-auth/lists"}