1.0.2 • Published 3 years ago
nuxt-basic-auth
Licence
MIT
Version
1.0.2
Deps
2
Size
4 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated
Basic auth module for Nuxt.js
Installation
yarn add nuxt-basic-auth
Usage
In your nuxt config:
export default defineNuxtConfig({
modules: ['nuxt-basic-auth'],
basicAuth: {
username: 'theUsername',
password: 'thePassword',
// enabled: true // true by default
},
Configuration
The configuration should be obvious from the usage. You can set username and password through basicAuth object key on nuxt configuration file (nuxt.config.ts or nuxt.config.js). The enabled configuration key can be set to false to disable basic authentication.
TODO
- Add Nuxt 2 support
- Add tests