node-auth-kit 1.0.3 β†’ 1.0.4

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.
Files changed (2) hide show
  1. package/README.md +20 -20
  2. package/package.json +18 -10
package/README.md CHANGED
@@ -1,33 +1,33 @@
1
- πŸ” # Device Auth
1
+ # node-auth-kit
2
2
 
3
- Device Auth is a **Devise-inspired authentication and authorization library for Node.js**.
3
+ node-auth-kit is a **Devise-inspired authentication and authorization library for Node.js**.
4
4
 
5
- It gives you:
5
+ It provides **JWT authentication**, **role-based authorization**, and an **adapter-based architecture** so you can plug in MongoDB (Mongoose), Prisma, or other databases without rewriting auth logic.
6
6
 
7
- - **Config-driven auth** (email + password, roles, JWT, password rules)
8
- - **Plug-and-play Express routes** via `createAuthRouter`
9
- - **JWT-based security** with `authenticate` middleware
10
- - **Role-based authorization** with `authorize`
11
- - **Database-agnostic adapter system** (`mongooseAdapter`, future Prisma, etc.)
12
- - **Lifecycle hooks** (before/after register/login) for side effects
13
-
14
- You bring your framework (Express) and database (Mongo, Prisma, SQL). Device Auth handles the rest.
7
+ If you’re tired of rebuilding authentication for every Express app, **node-auth-kit gives you clean defaults with full control**.
15
8
 
16
9
  ---
17
10
 
18
- ## ✨ Features
11
+ ## Why node-auth-kit?
12
+
13
+ Most Node.js authentication libraries are either:
14
+ - too low-level, or
15
+ - tightly coupled to a specific ORM
16
+
17
+ node-auth-kit is inspired by Ruby on Rails **Devise** and focuses on:
19
18
 
20
- - **βœ… JWT Authentication (Access Tokens)**
21
- - **πŸ”‘ Role-based Authorization**
22
- - **🧩 Adapter Pattern (DB-agnostic)**
23
- - **πŸš€ Ready-to-use Express routes** via `createAuthRouter`
24
- - **πŸ”’ Secure password hashing**
25
- - **πŸ“¦ Mongoose adapter (Stable)**
26
- - **πŸ§ͺ Prisma adapter (In progress – V2)**
27
- - **🧠 Inspired by Ruby on Rails Devise**
19
+ - πŸ” JWT-based authentication for Express
20
+ - 🧩 Adapter-based database support (DB-agnostic core)
21
+ - πŸ”‘ Role-based authorization
22
+ - βš™οΈ Config-driven setup with sensible defaults
23
+ - 🧠 Extensible hooks for real-world needs
24
+
25
+ You bring **Express** and your **database**.
26
+ node-auth-kit handles authentication, authorization, and security patterns.
28
27
 
29
28
  ---
30
29
 
30
+
31
31
  ## πŸ“¦ Installation
32
32
 
33
33
  ```bash
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-auth-kit",
3
- "version": "1.0.3",
4
- "description": "Device-based authentication and authorization for Node.js with Prisma and Mongoose adapters",
3
+ "version": "1.0.4",
4
+ "description": "Devise-inspired JWT authentication and authorization for Node.js and Express with adapter-based support for MongoDB (Mongoose) and Prisma",
5
5
  "author": "Yogendra Prajapati",
6
6
  "license": "MIT",
7
7
  "main": "dist/index.js",
@@ -17,29 +17,37 @@
17
17
  "prepublishOnly": "npm run build"
18
18
  },
19
19
  "keywords": [
20
+ "node-auth-kit",
21
+ "node auth",
22
+ "node authentication",
20
23
  "authentication",
21
24
  "authorization",
22
- "device-auth",
25
+ "jwt authentication",
23
26
  "jwt",
24
- "nodejs",
25
- "express",
26
- "prisma",
27
- "mongoose"
27
+ "express auth",
28
+ "express authentication",
29
+ "device authentication",
30
+ "devise",
31
+ "devise-like",
32
+ "security",
33
+ "mongoose auth",
34
+ "prisma auth"
28
35
  ],
29
36
  "repository": {
30
37
  "type": "git",
31
- "url": "git+https://github.com/learningyogendra-netizen/device_auth.git"
38
+ "url": "https://github.com/learningyogendra-netizen/device_auth.git"
32
39
  },
40
+ "homepage": "https://github.com/learningyogendra-netizen/device_auth#readme",
33
41
  "bugs": {
34
42
  "url": "https://github.com/learningyogendra-netizen/device_auth/issues"
35
43
  },
36
44
  "dependencies": {
37
45
  "bcrypt": "^6.0.0",
38
46
  "express": "^4.19.2",
39
- "jsonwebtoken": "^9.0.3",
40
- "mongoose": "^9.0.2"
47
+ "jsonwebtoken": "^9.0.3"
41
48
  },
42
49
  "peerDependencies": {
50
+ "mongoose": "^7 || ^8 || ^9",
43
51
  "@prisma/client": "^4.7.1 || ^5.0.0"
44
52
  },
45
53
  "devDependencies": {