potato4d/nuxt-basic-auth-module
소개
Provide basic auth your Nuxt.js application
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -2
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalNuxt.js basic auth module

Provide basic authentication to your Nuxt.js application
https://www.npmjs.com/package/nuxt-basic-auth-module
Installation
$ yarn add nuxt-basic-auth-module # or npm install
Usage
Edit your nuxt.config.js
export default {
// ...
modules: [
'nuxt-basic-auth-module'
],
basic: {
name: 'AUTH USER NAME HERE',
pass: 'AUTH PASSWORD HERE',
enabled: process.env.BASIC_ENABLED === 'true' // require boolean value(nullable)
},
// ...
}
Arguments
enabled
- type: Boolean
- default: false
- required: false
Whether to activate this module. If false, module registration is skipped.
name
- type: String | Function
- required: true
Basic Auth user name.
The function passes req as an argument and must return the username as string.
pass
- type: String | Function
- required: true
Basic Auth user password.
The function passes req as an argument and must return the password as string.
message
- type: String,
- default: 'Please enter username and password'
- required: false
Message to be displayed during basic authentication.
match
- type: String(regex literal) | Function
- required: false
The target path. This allows you to set up basic authentication that is limited to routes that match regular expression literals or where the function returns true.
The function passes req as an argument.
License
MIT
https://github.com/potato4d/nuxt-basic-auth-module/blob/master/LICENSE
Contributors
Thanks goes to these wonderful people (emoji key):
Takuma HANATANI 💻 🚧 📖 🐛 |
Anthony Fu 💻 |
Jleroy 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
관련 프로젝트 살펴보기
불러오는 중…