@maximemrf/adonisjs-jwt 0.8.0-alpha.0 → 0.8.0
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 +16 -1
- package/build/src/types.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
|
|
12
12
|
> AdonisJS package to authenticate users using JWT tokens.
|
|
13
13
|
|
|
14
|
+
## Compatibility & Versions
|
|
15
|
+
|
|
16
|
+
| Package Version | AdonisJS Version | Node.js Required |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| `v0.7.x` | `AdonisJS v6` | `>= 20.6.0` |
|
|
19
|
+
| **`v0.8.x`** | **`AdonisJS v7`** | **`>= 24.0.0`** |
|
|
20
|
+
|
|
14
21
|
## Prerequisites
|
|
15
22
|
|
|
16
23
|
You have to install the auth package from AdonisJS
|
|
@@ -19,7 +26,7 @@ You have to install the auth package from AdonisJS
|
|
|
19
26
|
node ace add @adonisjs/auth
|
|
20
27
|
```
|
|
21
28
|
|
|
22
|
-
## Setup
|
|
29
|
+
## Setup (AdonisJS v7)
|
|
23
30
|
|
|
24
31
|
Install the package:
|
|
25
32
|
|
|
@@ -27,6 +34,14 @@ Install the package:
|
|
|
27
34
|
npm i @maximemrf/adonisjs-jwt
|
|
28
35
|
```
|
|
29
36
|
|
|
37
|
+
## Setup for AdonisJS v6
|
|
38
|
+
|
|
39
|
+
If you are using AdonisJS v6, you have to install the `v0.7.x` version of the package:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm i @maximemrf/adonisjs-jwt@0.7.1
|
|
43
|
+
```
|
|
44
|
+
|
|
30
45
|
## Usage
|
|
31
46
|
|
|
32
47
|
Go to `config/auth.ts` and add the following configuration:
|
package/build/src/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { symbols } from '@adonisjs/auth';
|
|
2
2
|
import type { StringValue } from 'ms';
|
|
3
3
|
import type { AccessTokensUserProviderContract } from '@adonisjs/auth/types/access_tokens';
|
|
4
4
|
import type { Options } from 'jwks-rsa';
|