# @netsells/nuxt-auth-v4

> Enhanced @nuxtjs/auth module with runtime config (v4 only)

Latest version **1.0.1** (published 2022-04-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install @netsells/nuxt-auth-v4
pnpm add @netsells/nuxt-auth-v4
yarn add @netsells/nuxt-auth-v4
bun add @netsells/nuxt-auth-v4
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-04-06 |
| First published | 2022-02-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Sam Turrell |
| Maintainers | rebeccaanderton, samturrell, martin91s, spamoom, jakub.gawron |

## Links

- npm: https://www.npmjs.com/package/@netsells/nuxt-auth-v4
- Repository: https://github.com/netsells/nuxt-auth/tree/v4/
- npm.io page: https://npm.io/package/@netsells/nuxt-auth-v4

## Dependencies (4)

- [consola](https://npm.io/package/consola.md) ^2.15.3
- [lodash.uniq](https://npm.io/package/lodash.uniq.md) ^4.5.0
- [@nuxtjs/auth](https://npm.io/package/@nuxtjs/auth.md) ^4.9.1
- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.2

## Recent versions

- 1.0.1 (latest) — 2022-04-06
- 1.0.0 — 2022-02-09

## README

# @netsells/nuxt-auth-v4

This package simply builds on the official `@nuxtjs/auth` module, and adds in runtime config functionality. 

**NOTE:** This package is for v4.x of `@nuxtjs/auth`, for v5.x please see [@netsells/nuxt-auth](https://www.npmjs.com/package/@netsells/nuxt-auth).

## Installation

```sh
$ yarn add @netsells/nuxt-auth-v4
```

## Usage

### Setup

Add the module to your nuxt config:

```js
module.exports = {
    modules: [
        '@netsells/nuxt-auth-v4',
    ],
};
```

### Runtime Config

You can then define your config in your `publicRuntimeConfig` and `privateRuntimeConfig` respectively. The config follows the same structure as the config you would provide to the module directly, but nested under the `auth` key. For example:

```js
module.exports = {
    publicRuntimeConfig: {
        auth: {
            strategies: {
                local: {
                    endpoints: {
                        login: {
                            url: `${ process.env.APP_URL }/api/auth/login`,
                        },
                    },
                },
            },
        },
    },
};
```

Any values in here will be merged with the config passed to the `@nuxtjs/auth` module.

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