@nauth-toolkit/core 0.1.133 → 0.2.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 +24 -4
- package/package.json +34 -9
package/README.md
CHANGED
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
# @nauth-toolkit/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Authentication that lives in your codebase.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The platform-agnostic engine behind nauth-toolkit. All authentication business logic lives here — no framework-specific code. Runs inside your server process, stores data in your own database, makes zero external API calls.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Free to use. NestJS, Express, and Fastify all run the same core.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## What's inside
|
|
10
|
+
|
|
11
|
+
- **Auth flows** — signup, login, email/phone verification, forgot/change password, account lockout
|
|
12
|
+
- **Social OAuth** — Google, Apple, Facebook with web and native mobile flows, automatic account linking
|
|
13
|
+
- **Multi-factor auth** — TOTP, SMS, email OTP, WebAuthn passkeys, recovery codes, adaptive MFA by login risk
|
|
14
|
+
- **JWT lifecycle** — access + refresh tokens, rotation with reuse detection, cookie or JSON delivery
|
|
15
|
+
- **Sessions** — concurrent limits, device tracking, IP geolocation, trusted devices, revocation
|
|
16
|
+
- **Security** — Argon2id hashing, CSRF protection, rate limiting, audit trail for every event
|
|
17
|
+
- **Challenge-based architecture** — multi-step flows (verification, MFA, password changes) return challenge states, not errors
|
|
18
|
+
- **Single config** — one TypeScript object defines your entire auth policy; everything bootstraps from it
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
For most setups, install the adapter for your framework:
|
|
23
|
+
|
|
24
|
+
- **NestJS** — [`@nauth-toolkit/nestjs`](https://www.npmjs.com/package/@nauth-toolkit/nestjs)
|
|
25
|
+
- **Express / Fastify** — install this package directly and call `NAuth.create()`
|
|
26
|
+
|
|
27
|
+
Then add storage, MFA, social, and email/SMS providers as needed. Each is a separate package you opt into.
|
|
28
|
+
|
|
29
|
+
**Docs:** [nauth.dev](https://nauth.dev) · **Examples:** [github.com/noorixorg/nauth](https://github.com/noorixorg/nauth) · **Live demo:** [demo.nauth.dev](https://demo.nauth.dev)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nauth-toolkit/core",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Embedded authentication engine for Node.js — NestJS, Express, Fastify",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
|
-
"build": "
|
|
35
|
+
"build": "pnpm run clean && tsc -b && node dist/openapi/generate-openapi.js",
|
|
36
36
|
"clean": "rm -rf dist *.tsbuildinfo",
|
|
37
37
|
"test": "jest",
|
|
38
38
|
"lint": "eslint src --ext .ts",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@maxmind/geoip2-node": "^4.0.0 || ^5.0.0 || ^6.0.0",
|
|
52
|
-
"@nauth-toolkit/recaptcha": "^0.
|
|
52
|
+
"@nauth-toolkit/recaptcha": "^0.2.0",
|
|
53
53
|
"typeorm": "^0.3.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
@@ -76,12 +76,36 @@
|
|
|
76
76
|
"access": "public",
|
|
77
77
|
"tag": "latest"
|
|
78
78
|
},
|
|
79
|
-
"license": "SEE LICENSE
|
|
79
|
+
"license": "SEE LICENSE",
|
|
80
80
|
"keywords": [
|
|
81
|
-
"
|
|
81
|
+
"nauth",
|
|
82
82
|
"authentication",
|
|
83
|
+
"auth",
|
|
84
|
+
"nodejs",
|
|
85
|
+
"typescript",
|
|
83
86
|
"jwt",
|
|
84
|
-
"
|
|
87
|
+
"oauth",
|
|
88
|
+
"mfa",
|
|
89
|
+
"2fa",
|
|
90
|
+
"totp",
|
|
91
|
+
"passkey",
|
|
92
|
+
"webauthn",
|
|
93
|
+
"social-login",
|
|
94
|
+
"session-management",
|
|
95
|
+
"express",
|
|
96
|
+
"fastify",
|
|
97
|
+
"nestjs",
|
|
98
|
+
"email-verification",
|
|
99
|
+
"phone-verification",
|
|
100
|
+
"magic-link",
|
|
101
|
+
"password-reset",
|
|
102
|
+
"refresh-token",
|
|
103
|
+
"adaptive-security",
|
|
104
|
+
"rate-limiting",
|
|
105
|
+
"account-lockout",
|
|
106
|
+
"audit-log",
|
|
107
|
+
"recaptcha",
|
|
108
|
+
"security"
|
|
85
109
|
],
|
|
86
110
|
"files": [
|
|
87
111
|
"dist",
|
|
@@ -91,6 +115,7 @@
|
|
|
91
115
|
"sideEffects": false,
|
|
92
116
|
"repository": {
|
|
93
117
|
"type": "git",
|
|
94
|
-
"url": "https://github.com/noorixorg/nauth
|
|
95
|
-
}
|
|
118
|
+
"url": "https://github.com/noorixorg/nauth"
|
|
119
|
+
},
|
|
120
|
+
"homepage": "https://nauth.dev"
|
|
96
121
|
}
|