# nuxt-basic-auth

> ## Installation

Latest version **1.0.2** (published 2022-11-07) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install nuxt-basic-auth
pnpm add nuxt-basic-auth
yarn add nuxt-basic-auth
bun add nuxt-basic-auth
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-11-07 |
| First published | 2022-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | dipeshawe |
| Keywords | nuxt, basic auth |

## Links

- npm: https://www.npmjs.com/package/nuxt-basic-auth
- Homepage: https://github.com/xtranophilist/nuxt-basic-auth
- npm.io page: https://npm.io/package/nuxt-basic-auth

## Dependencies (2)

- [@nuxt/kit](https://npm.io/package/@nuxt/kit.md) ^3.0.0-rc.12
- [basic-auth](https://npm.io/package/basic-auth.md) ^2.0.1

## Alternatives

- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads
- [escher-request](https://npm.io/package/escher-request.md) — 545 weekly downloads

## Recent versions

- 1.0.2 (latest) — 2022-11-07
- 1.0.1 — 2022-11-07

## README

# Basic auth module for Nuxt.js

## Installation

```bash
yarn add nuxt-basic-auth
```

## Usage

In your nuxt config:

```js
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

---
_Source: https://npm.io/package/nuxt-basic-auth · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
