Provide basic authentication to your Nuxt.js application
https://www.npmjs.com/package/nuxt-basic-auth-module
$ yarn add nuxt-basic-auth-module # or npm install
Edit your nuxt.config.js
module.exports = {
// ...
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)
},
// ...
}
MIT
https://github.com/potato4d/nuxt-basic-auth-module/blob/master/LICENSE