Skip to content

isDipesh/nuxt-basic-auth

Repository files navigation

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

About

Basic authentication module for Nuxt.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published