# nuxt-auth-wensaint

> Authentication module for Nuxt.js

Latest version **1.0.1** (published 2022-06-24) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-06-24 |
| First published | 2022-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 9 |
| Unpacked size | 256.7 KB |
| Known vulnerabilities | 0 (+25 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | wensaint |

## Links

- npm: https://www.npmjs.com/package/nuxt-auth-wensaint
- Repository: https://github.com/wensaint/auth-module
- npm.io page: https://npm.io/package/nuxt-auth-wensaint

## Dependencies (9)

- [defu](https://npm.io/package/defu.md) ^5.0.1
- [axios](https://npm.io/package/axios.md) ^0.26.1
- [hasha](https://npm.io/package/hasha.md) ^5.2.2
- [cookie](https://npm.io/package/cookie.md) ^0.4.2
- [requrl](https://npm.io/package/requrl.md) ^3.0.2
- [consola](https://npm.io/package/consola.md) ^2.15.3
- [jwt-decode](https://npm.io/package/jwt-decode.md) ^3.1.2
- [body-parser](https://npm.io/package/body-parser.md) ^1.19.2
- [@nuxtjs/axios](https://npm.io/package/@nuxtjs/axios.md) ^5.13.6

## Recent versions

- 1.0.1 (latest) — 2022-06-24
- 1.0.0 — 2022-06-24

## README

<h1 align="center" >🔑 Auth Module</h1>
<p align="center">Zero-boilerplate authentication support for Nuxt.js!</p>

<p align="center">
<a href="https://auth.nuxtjs.org">Refer to the document before usage(具体使用请参照官方文档)</a>
</p>

## Modify Remark
The origin proect cant't support auth runtimeConfig. 
So i have to build again and again when I deploy the site within different subdomains(eg https://xxx.com/a and https://xxx.com/b), what a waste of time!!!

本项目在原项目基础上实现了cookie与localStorage节点的runtime配置，从而实现“一套代码、多处部署”，即使在同一个域名下也不会互相干扰。
使用示例如下
```
publicRuntimeConfig: {
	auth: {
	  cookie: {
		prefix: 'test.',
		options: {
		  path: '/',
		  maxAge: 2 * 3600
		}
	  },
	  localStorage: {
		prefix: 'test.'
	  }
	}
}
```

## Development

Running demo for development:

```bash
$ yarn install
$ yarn dev
```

Running tests for development:

```bash
$ yarn build
$ yarn nuxt build test/fixture
$ yarn jest
```

## License

[MIT License](./LICENSE) - Copyright (c) Nuxt Community

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