nuxt-auther 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<h1 align="center">
|
|
2
|
-
<p align="center">
|
|
1
|
+
<h1 align="center">Nuxt-Auther</h1>
|
|
2
|
+
<p align="center">Authentication module for Nuxt.JS</p>
|
|
3
3
|
|
|
4
4
|
<p align="center">
|
|
5
|
-
<a href="https://www.npmjs.com/package
|
|
6
|
-
<img alt="" src="https://img.shields.io/npm/v
|
|
5
|
+
<a href="https://www.npmjs.com/package/nuxt-auther">
|
|
6
|
+
<img alt="" src="https://img.shields.io/npm/v/nuxt-auther.svg?style=flat&colorA=18181B&colorB=28CF8D">
|
|
7
7
|
</a>
|
|
8
|
-
<a href="https://www.npmjs.com/package
|
|
9
|
-
<img alt="" src="https://img.shields.io/npm/dt
|
|
8
|
+
<a href="https://www.npmjs.com/package/nuxt-auther">
|
|
9
|
+
<img alt="" src="https://img.shields.io/npm/dt/nuxt-auther.svg?style=flat&colorA=18181B&colorB=28CF8D">
|
|
10
10
|
</a>
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
## Info
|
|
14
14
|
|
|
15
|
-
This module is meant as an alternative to @nuxtjs/auth, except this is for
|
|
15
|
+
This module is meant as an alternative to @nuxtjs/auth, except this is for Nuxt 3 only with no backwards compatibility support.
|
|
16
16
|
|
|
17
17
|
## Setup
|
|
18
18
|
|
|
19
|
-
1. Add
|
|
19
|
+
1. Add `nuxt-auther` and `@nuxt-alt/http` dependency to your project
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
yarn add
|
|
22
|
+
yarn add nuxt-auther @nuxt-alt/http
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
2. Add
|
|
25
|
+
2. Add `nuxt-auther` and `@pinia/nuxt` to the `modules` section of `nuxt.config.ts`
|
|
26
26
|
|
|
27
27
|
**Note:** you dont need to specify `@nuxt-alt/http`, it will automatically be added but if you want to manually add it, make sure it is below the auth module (and above the proxy module if you are using it). It also doesn't need pinia
|
|
28
28
|
it will use nuxt's `useState` by default.
|
|
@@ -30,7 +30,7 @@ it will use nuxt's `useState` by default.
|
|
|
30
30
|
```ts
|
|
31
31
|
export default defineNuxtConfig({
|
|
32
32
|
modules: [
|
|
33
|
-
'
|
|
33
|
+
'nuxt-auther'
|
|
34
34
|
],
|
|
35
35
|
auth: {
|
|
36
36
|
/* module options */
|
|
@@ -40,7 +40,7 @@ export default defineNuxtConfig({
|
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
## Documentation
|
|
43
|
-
[Read Documentation](https://nuxt-
|
|
43
|
+
[Read Documentation](https://nuxt-auther.vercel.app)
|
|
44
44
|
|
|
45
45
|
## Changes
|
|
46
46
|
|
|
@@ -168,7 +168,7 @@ auth: {
|
|
|
168
168
|
## TypeScript (2.6.0+)
|
|
169
169
|
The user information can be edited like so for TypeScript:
|
|
170
170
|
```ts
|
|
171
|
-
declare module '
|
|
171
|
+
declare module 'nuxt-auther' {
|
|
172
172
|
interface UserInfo {
|
|
173
173
|
email: string
|
|
174
174
|
name: string
|