node-auth-kit 1.0.2 → 1.0.3
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 +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,16 +31,16 @@ You bring your framework (Express) and database (Mongo, Prisma, SQL). Device Aut
|
|
|
31
31
|
## 📦 Installation
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
npm
|
|
34
|
+
npm i node-auth-kit
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
or
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
yarn add
|
|
40
|
+
yarn add node-auth-kit
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
`
|
|
43
|
+
`node-auth-kit` itself is DB-agnostic. Database drivers / ORMs are **optional** and only required if you use the corresponding adapter:
|
|
44
44
|
|
|
45
45
|
- For Mongoose adapter: `mongoose`
|
|
46
46
|
- For Prisma adapter (V2): `@prisma/client`
|
|
@@ -221,7 +221,7 @@ The public exports you can use:
|
|
|
221
221
|
The central entry point is `deviceAuth`:
|
|
222
222
|
|
|
223
223
|
```ts
|
|
224
|
-
import { deviceAuth, defaultConfig } from '
|
|
224
|
+
import { deviceAuth, defaultConfig } from 'node-auth-kit';
|
|
225
225
|
|
|
226
226
|
deviceAuth.init({
|
|
227
227
|
...defaultConfig,
|
|
@@ -267,7 +267,7 @@ Supported hook names:
|
|
|
267
267
|
Register hooks on `deviceAuth`:
|
|
268
268
|
|
|
269
269
|
```ts
|
|
270
|
-
import { deviceAuth } from '
|
|
270
|
+
import { deviceAuth } from 'node-auth-kit';
|
|
271
271
|
|
|
272
272
|
deviceAuth
|
|
273
273
|
.registerHook('beforeRegister', async (createData) => {
|