@nauth-toolkit/core 0.2.1 → 0.2.2
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 +287 -17
- package/dist/bootstrap.d.ts +3 -0
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +7 -0
- package/dist/bootstrap.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,30 +1,300 @@
|
|
|
1
1
|
# @nauth-toolkit/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The authentication engine behind nauth-toolkit. All auth business logic lives here — signup, login, MFA, social OAuth, sessions, JWT lifecycle, and more. Runs inside your server process, stores all data in your own database, makes zero external API calls.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**[Documentation](https://nauth.dev)** · **[Quick Start](https://nauth.dev/docs/quick-start/nestjs)** · **[API Reference](https://nauth.dev/docs/api/overview)** · **[Live Demo](https://demo.nauth.dev)** · **[GitHub](https://github.com/noorixorg/nauth)**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
---
|
|
8
8
|
|
|
9
|
-
## What
|
|
9
|
+
## What it includes
|
|
10
10
|
|
|
11
|
-
- **Auth flows** — signup, login, email/phone verification, forgot
|
|
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
|
|
11
|
+
- **Auth flows** — signup, login, email/phone verification, forgot password, change password, account lockout
|
|
12
|
+
- **Social OAuth** — Google, Apple, Facebook with web redirect and native mobile token flows, automatic account linking
|
|
13
|
+
- **Multi-factor auth** — TOTP, SMS OTP, email OTP, WebAuthn passkeys, recovery codes, adaptive MFA by login risk
|
|
14
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,
|
|
17
|
-
- **
|
|
15
|
+
- **Sessions** — concurrent session limits, device tracking, IP geolocation, trusted devices, session revocation
|
|
16
|
+
- **Security** — Argon2id password hashing, CSRF protection, per-IP and per-user rate limiting, account lockout
|
|
17
|
+
- **Audit trail** — structured event log for logins, MFA, password changes, and security incidents
|
|
18
|
+
- **Challenge-based flows** — verification, MFA, and password steps return challenge states, not hard errors
|
|
18
19
|
- **Single config** — one TypeScript object defines your entire auth policy; everything bootstraps from it
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
---
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
## Install
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
- **Express** — [`@nauth-toolkit/express`](https://www.npmjs.com/package/@nauth-toolkit/express)
|
|
26
|
-
- **Fastify** — [`@nauth-toolkit/fastify`](https://www.npmjs.com/package/@nauth-toolkit/fastify)
|
|
25
|
+
**Express or Fastify** — adapters (`ExpressAdapter`, `FastifyAdapter`) are included in this package:
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
```bash
|
|
28
|
+
npm install @nauth-toolkit/core @nauth-toolkit/database-typeorm-postgres @nauth-toolkit/storage-database @nauth-toolkit/email-console @nauth-toolkit/sms-console
|
|
29
|
+
# Or for MySQL: replace database-typeorm-postgres with database-typeorm-mysql
|
|
30
|
+
```
|
|
29
31
|
|
|
30
|
-
**
|
|
32
|
+
**NestJS** — install both core and the NestJS module:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install @nauth-toolkit/core @nauth-toolkit/nestjs @nauth-toolkit/database-typeorm-postgres @nauth-toolkit/storage-database @nauth-toolkit/email-console @nauth-toolkit/sms-console
|
|
36
|
+
# Or for MySQL: replace database-typeorm-postgres with database-typeorm-mysql
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Quick start
|
|
42
|
+
|
|
43
|
+
### Express
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import express from 'express';
|
|
47
|
+
import { DataSource } from 'typeorm';
|
|
48
|
+
import { NAuth, ExpressAdapter, NAuthConfig } from '@nauth-toolkit/core';
|
|
49
|
+
// PostgreSQL:
|
|
50
|
+
import { getNAuthEntities } from '@nauth-toolkit/database-typeorm-postgres';
|
|
51
|
+
// MySQL: import { getNAuthEntities } from '@nauth-toolkit/database-typeorm-mysql';
|
|
52
|
+
|
|
53
|
+
const app = express();
|
|
54
|
+
app.use(express.json());
|
|
55
|
+
|
|
56
|
+
// Database
|
|
57
|
+
const dataSource = new DataSource({
|
|
58
|
+
type: 'postgres', // or 'mysql'
|
|
59
|
+
url: process.env.DATABASE_URL,
|
|
60
|
+
entities: getNAuthEntities(),
|
|
61
|
+
synchronize: true, // dev only
|
|
62
|
+
});
|
|
63
|
+
await dataSource.initialize();
|
|
64
|
+
|
|
65
|
+
// Bootstrap
|
|
66
|
+
const nauth = await NAuth.create({
|
|
67
|
+
config: {
|
|
68
|
+
jwt: { secret: process.env.JWT_SECRET },
|
|
69
|
+
signup: { requireEmailVerification: false },
|
|
70
|
+
tokenDelivery: { mode: 'json' },
|
|
71
|
+
},
|
|
72
|
+
dataSource,
|
|
73
|
+
adapter: new ExpressAdapter(),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// Middleware — order matters
|
|
77
|
+
app.use(nauth.middleware.clientInfo); // MUST be first — initializes context
|
|
78
|
+
app.use(nauth.middleware.csrf); // CSRF validation
|
|
79
|
+
app.use(nauth.middleware.auth); // JWT validation
|
|
80
|
+
app.use(nauth.middleware.tokenDelivery); // Cookie delivery interceptor
|
|
81
|
+
|
|
82
|
+
// Routes
|
|
83
|
+
app.post('/auth/signup', nauth.helpers.public(), async (req, res, next) => {
|
|
84
|
+
try {
|
|
85
|
+
res.status(201).json(await nauth.authService.signup(req.body));
|
|
86
|
+
} catch (err) {
|
|
87
|
+
next(err);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
app.post('/auth/login', nauth.helpers.public(), async (req, res, next) => {
|
|
92
|
+
try {
|
|
93
|
+
res.json(await nauth.authService.login(req.body));
|
|
94
|
+
} catch (err) {
|
|
95
|
+
next(err);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
app.get('/auth/me', nauth.helpers.requireAuth(), (req, res, next) => {
|
|
100
|
+
try {
|
|
101
|
+
res.json(nauth.helpers.getCurrentUser());
|
|
102
|
+
} catch (err) {
|
|
103
|
+
next(err);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
app.listen(3000);
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Full guide: [nauth.dev/docs/quick-start/express](https://nauth.dev/docs/quick-start/express)
|
|
111
|
+
|
|
112
|
+
### Fastify
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import { NAuth, FastifyAdapter } from '@nauth-toolkit/core';
|
|
116
|
+
|
|
117
|
+
const nauth = await NAuth.create({
|
|
118
|
+
config: authConfig,
|
|
119
|
+
dataSource,
|
|
120
|
+
adapter: new FastifyAdapter(),
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Hooks — order matters
|
|
124
|
+
fastify.addHook('preHandler', nauth.middleware.clientInfo); // MUST be first
|
|
125
|
+
fastify.addHook('preHandler', nauth.middleware.csrf);
|
|
126
|
+
fastify.addHook('preHandler', nauth.middleware.auth);
|
|
127
|
+
fastify.addHook('onSend', nauth.middleware.tokenDelivery);
|
|
128
|
+
|
|
129
|
+
// Routes — wrap handlers with nauth.adapter.wrapRouteHandler for context access
|
|
130
|
+
fastify.post(
|
|
131
|
+
'/auth/signup',
|
|
132
|
+
{ preHandler: nauth.helpers.public() },
|
|
133
|
+
nauth.adapter.wrapRouteHandler(async (req) => nauth.authService.signup(req.body)),
|
|
134
|
+
);
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Full guide: [nauth.dev/docs/quick-start/fastify](https://nauth.dev/docs/quick-start/fastify)
|
|
138
|
+
|
|
139
|
+
### NestJS
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
// auth.module.ts
|
|
143
|
+
import { Module } from '@nestjs/common';
|
|
144
|
+
import { AuthModule as NAuthModule } from '@nauth-toolkit/nestjs';
|
|
145
|
+
|
|
146
|
+
@Module({
|
|
147
|
+
imports: [NAuthModule.forRoot(authConfig)],
|
|
148
|
+
controllers: [AuthController],
|
|
149
|
+
})
|
|
150
|
+
export class AuthModule {}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
// auth.controller.ts
|
|
155
|
+
import { AuthService, SignupDTO, LoginDTO, AuthGuard, Public, CurrentUser, IUser } from '@nauth-toolkit/nestjs';
|
|
156
|
+
|
|
157
|
+
@UseGuards(AuthGuard)
|
|
158
|
+
@Controller('auth')
|
|
159
|
+
export class AuthController {
|
|
160
|
+
constructor(private authService: AuthService) {}
|
|
161
|
+
|
|
162
|
+
@Public()
|
|
163
|
+
@Post('signup')
|
|
164
|
+
@HttpCode(201)
|
|
165
|
+
signup(@Body() dto: SignupDTO) {
|
|
166
|
+
return this.authService.signup(dto);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@Public()
|
|
170
|
+
@Post('login')
|
|
171
|
+
login(@Body() dto: LoginDTO) {
|
|
172
|
+
return this.authService.login(dto);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@Get('me')
|
|
176
|
+
profile(@CurrentUser() user: IUser) {
|
|
177
|
+
return user;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Full guide: [nauth.dev/docs/quick-start/nestjs](https://nauth.dev/docs/quick-start/nestjs)
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Example apps
|
|
187
|
+
|
|
188
|
+
Full working examples with Docker, database setup, and frontend integration:
|
|
189
|
+
|
|
190
|
+
| Example | Description |
|
|
191
|
+
| ------------------------------------------------------------------------ | ------------------------------------------- |
|
|
192
|
+
| [Express](https://github.com/noorixorg/nauth/tree/main/examples/express) | Express + TypeORM + PostgreSQL |
|
|
193
|
+
| [Fastify](https://github.com/noorixorg/nauth/tree/main/examples/fastify) | Fastify + TypeORM + PostgreSQL |
|
|
194
|
+
| [NestJS](https://github.com/noorixorg/nauth/tree/main/examples/nestjs) | NestJS + TypeORM + PostgreSQL |
|
|
195
|
+
| [React](https://github.com/noorixorg/nauth/tree/main/examples/react) | React frontend with `@nauth-toolkit/client` |
|
|
196
|
+
|
|
197
|
+
**Repository:** [github.com/noorixorg/nauth](https://github.com/noorixorg/nauth)
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Package ecosystem
|
|
202
|
+
|
|
203
|
+
nauth-toolkit is modular. Start with this package plus a database adapter, then add providers for MFA, social, email, and SMS as needed.
|
|
204
|
+
|
|
205
|
+
### Framework adapter
|
|
206
|
+
|
|
207
|
+
| Package | Purpose |
|
|
208
|
+
| ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
|
209
|
+
| [`@nauth-toolkit/nestjs`](https://www.npmjs.com/package/@nauth-toolkit/nestjs) | NestJS DynamicModule with `AuthModule.forRoot()`, guards, decorators, and interceptors |
|
|
210
|
+
|
|
211
|
+
### Frontend SDKs
|
|
212
|
+
|
|
213
|
+
| Package | Purpose |
|
|
214
|
+
| ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
215
|
+
| [`@nauth-toolkit/client`](https://www.npmjs.com/package/@nauth-toolkit/client) | Framework-agnostic client SDK — React, Vue, Svelte, vanilla JS |
|
|
216
|
+
| [`@nauth-toolkit/client-angular`](https://www.npmjs.com/package/@nauth-toolkit/client-angular) | Angular SDK with `NAuthModule`, `AuthService`, HTTP interceptor, and route guards |
|
|
217
|
+
|
|
218
|
+
### Database
|
|
219
|
+
|
|
220
|
+
Pick one. Provides TypeORM entity definitions for your database.
|
|
221
|
+
|
|
222
|
+
| Package | Purpose |
|
|
223
|
+
| -------------------------------------------------------------------------------------------------------------------- | ------------------- |
|
|
224
|
+
| [`@nauth-toolkit/database-typeorm-postgres`](https://www.npmjs.com/package/@nauth-toolkit/database-typeorm-postgres) | PostgreSQL entities |
|
|
225
|
+
| [`@nauth-toolkit/database-typeorm-mysql`](https://www.npmjs.com/package/@nauth-toolkit/database-typeorm-mysql) | MySQL entities |
|
|
226
|
+
|
|
227
|
+
### Storage
|
|
228
|
+
|
|
229
|
+
Used for rate limiting, token blacklisting, account lockout, and distributed locks.
|
|
230
|
+
|
|
231
|
+
| Package | Purpose |
|
|
232
|
+
| -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
233
|
+
| [`@nauth-toolkit/storage-database`](https://www.npmjs.com/package/@nauth-toolkit/storage-database) | Database-backed storage — no Redis required |
|
|
234
|
+
| [`@nauth-toolkit/storage-redis`](https://www.npmjs.com/package/@nauth-toolkit/storage-redis) | Redis — recommended for production and multi-instance deployments |
|
|
235
|
+
|
|
236
|
+
### MFA providers
|
|
237
|
+
|
|
238
|
+
Each method is a separate package. Install only what you need.
|
|
239
|
+
|
|
240
|
+
| Package | Method |
|
|
241
|
+
| ---------------------------------------------------------------------------------------- | ------------------------------------------------ |
|
|
242
|
+
| [`@nauth-toolkit/mfa-totp`](https://www.npmjs.com/package/@nauth-toolkit/mfa-totp) | TOTP — Google Authenticator, Authy |
|
|
243
|
+
| [`@nauth-toolkit/mfa-sms`](https://www.npmjs.com/package/@nauth-toolkit/mfa-sms) | SMS OTP |
|
|
244
|
+
| [`@nauth-toolkit/mfa-email`](https://www.npmjs.com/package/@nauth-toolkit/mfa-email) | Email OTP |
|
|
245
|
+
| [`@nauth-toolkit/mfa-passkey`](https://www.npmjs.com/package/@nauth-toolkit/mfa-passkey) | WebAuthn / passkeys — Face ID, Touch ID, YubiKey |
|
|
246
|
+
|
|
247
|
+
### Social OAuth
|
|
248
|
+
|
|
249
|
+
Each provider is a separate package with web redirect and native mobile token support.
|
|
250
|
+
|
|
251
|
+
| Package | Provider |
|
|
252
|
+
| ------------------------------------------------------------------------------------------------ | ------------------ |
|
|
253
|
+
| [`@nauth-toolkit/social-google`](https://www.npmjs.com/package/@nauth-toolkit/social-google) | Google OAuth 2.0 |
|
|
254
|
+
| [`@nauth-toolkit/social-apple`](https://www.npmjs.com/package/@nauth-toolkit/social-apple) | Sign in with Apple |
|
|
255
|
+
| [`@nauth-toolkit/social-facebook`](https://www.npmjs.com/package/@nauth-toolkit/social-facebook) | Facebook Login |
|
|
256
|
+
|
|
257
|
+
### Email providers
|
|
258
|
+
|
|
259
|
+
Required if you enable email verification, email OTP, or password reset emails.
|
|
260
|
+
|
|
261
|
+
| Package | Purpose |
|
|
262
|
+
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
|
|
263
|
+
| [`@nauth-toolkit/email-nodemailer`](https://www.npmjs.com/package/@nauth-toolkit/email-nodemailer) | Nodemailer — SMTP, AWS SES, SendGrid, and any transport |
|
|
264
|
+
| [`@nauth-toolkit/email-console`](https://www.npmjs.com/package/@nauth-toolkit/email-console) | Log emails to console — development use |
|
|
265
|
+
|
|
266
|
+
### SMS providers
|
|
267
|
+
|
|
268
|
+
Required if you enable phone verification or SMS MFA.
|
|
269
|
+
|
|
270
|
+
| Package | Purpose |
|
|
271
|
+
| ---------------------------------------------------------------------------------------- | ------------------------------------ |
|
|
272
|
+
| [`@nauth-toolkit/sms-aws-sns`](https://www.npmjs.com/package/@nauth-toolkit/sms-aws-sns) | AWS SNS |
|
|
273
|
+
| [`@nauth-toolkit/sms-console`](https://www.npmjs.com/package/@nauth-toolkit/sms-console) | Log SMS to console — development use |
|
|
274
|
+
|
|
275
|
+
### Other
|
|
276
|
+
|
|
277
|
+
| Package | Purpose |
|
|
278
|
+
| ------------------------------------------------------------------------------------ | -------------------------------- |
|
|
279
|
+
| [`@nauth-toolkit/recaptcha`](https://www.npmjs.com/package/@nauth-toolkit/recaptcha) | reCAPTCHA v2, v3, and Enterprise |
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Documentation
|
|
284
|
+
|
|
285
|
+
| Resource | Link |
|
|
286
|
+
| ----------------------- | -------------------------------------------------------------------------------------- |
|
|
287
|
+
| Full documentation | [nauth.dev](https://nauth.dev) |
|
|
288
|
+
| Quick Start — NestJS | [nauth.dev/docs/quick-start/nestjs](https://nauth.dev/docs/quick-start/nestjs) |
|
|
289
|
+
| Quick Start — Express | [nauth.dev/docs/quick-start/express](https://nauth.dev/docs/quick-start/express) |
|
|
290
|
+
| Quick Start — Fastify | [nauth.dev/docs/quick-start/fastify](https://nauth.dev/docs/quick-start/fastify) |
|
|
291
|
+
| Configuration reference | [nauth.dev/docs/concepts/configuration](https://nauth.dev/docs/concepts/configuration) |
|
|
292
|
+
| Auth flows guide | [nauth.dev/docs/guides/basic-auth](https://nauth.dev/docs/guides/basic-auth) |
|
|
293
|
+
| API reference | [nauth.dev/docs/api/overview](https://nauth.dev/docs/api/overview) |
|
|
294
|
+
| Frontend SDK | [nauth.dev/docs/frontend-sdk/overview](https://nauth.dev/docs/frontend-sdk/overview) |
|
|
295
|
+
| Example apps | [github.com/noorixorg/nauth](https://github.com/noorixorg/nauth/tree/main/examples) |
|
|
296
|
+
| Live demo | [demo.nauth.dev](https://demo.nauth.dev) |
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
Free to use. See [license](https://nauth.dev/docs/license).
|
package/dist/bootstrap.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ import { NAuthServices } from './utils/setup/init-services';
|
|
|
35
35
|
import { NAuthSocialProviders } from './utils/setup/init-social';
|
|
36
36
|
import { ClientInfo } from './interfaces/client-info.interface';
|
|
37
37
|
import { IUser } from './interfaces/entities.interface';
|
|
38
|
+
import { SocialRedirectHandler } from './services/social-redirect.handler';
|
|
38
39
|
/**
|
|
39
40
|
* Options for NAuth initialization
|
|
40
41
|
*/
|
|
@@ -100,6 +101,8 @@ export interface NAuthInstance<TMiddleware = unknown, THelper = unknown> extends
|
|
|
100
101
|
logger: NAuthLogger;
|
|
101
102
|
/** CSRF service (if enabled) */
|
|
102
103
|
csrfService?: CsrfService;
|
|
104
|
+
/** Social OAuth redirect handler — start, callback, and exchange flows */
|
|
105
|
+
socialRedirect?: SocialRedirectHandler;
|
|
103
106
|
}
|
|
104
107
|
/**
|
|
105
108
|
* NAuth Bootstrap
|
package/dist/bootstrap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAA+B,MAAM,uBAAuB,CAAC;AASlF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAKtD,OAAO,EAAgB,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAkB,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjF,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAA+B,MAAM,uBA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,OAAO,CAAC;QACrD,+CAA+C;QAC/C,aAAa,EAAE,MAAM,OAAO,CAAC;QAC7B,kDAAkD;QAClD,gBAAgB,EAAE,MAAM,OAAO,CAAC;QAChC,qCAAqC;QACrC,cAAc,EAAE,MAAM,KAAK,GAAG,SAAS,CAAC;QACxC,6BAA6B;QAC7B,iBAAiB,EAAE,MAAM,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;QACrD,sBAAsB;QACtB,aAAa,EAAE,MAAM,UAAU,GAAG,SAAS,CAAC;KAC7C,CAAC;IAEF,6BAA6B;IAC7B,OAAO,EAAE,YAAY,CAAC;IAEtB,oBAAoB;IACpB,MAAM,EAAE,WAAW,CAAC;IAEpB,sBAAsB;IACtB,MAAM,EAAE,WAAW,CAAC;IAEpB,gCAAgC;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,0EAA0E;IAC1E,cAAc,CAAC,EAAE,qBAAqB,CAAC;CACxC;AAMD;;;;GAIG;AACH,qBAAa,KAAK;IAChB;;;;;;;;;;;;;;OAcG;WACU,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC;CAwUnE"}
|
package/dist/bootstrap.js
CHANGED
|
@@ -49,6 +49,7 @@ const init_social_1 = require("./utils/setup/init-social");
|
|
|
49
49
|
const run_nauth_migrations_1 = require("./utils/setup/run-nauth-migrations");
|
|
50
50
|
const internal_1 = require("./internal");
|
|
51
51
|
const social_auth_state_store_service_1 = require("./services/social-auth-state-store.service");
|
|
52
|
+
const social_redirect_handler_1 = require("./services/social-redirect.handler");
|
|
52
53
|
// ============================================================================
|
|
53
54
|
// NAuth Bootstrap Class
|
|
54
55
|
// ============================================================================
|
|
@@ -113,6 +114,11 @@ class NAuth {
|
|
|
113
114
|
await (0, register_mfa_1.registerMFAProviders)(config, services.mfaService, repos.mfaDeviceRepository, repos.userRepository, logger, services.passwordService, services.emailVerificationService, services.phoneVerificationService, services.challengeService, services.auditService, services.clientInfoService);
|
|
114
115
|
}
|
|
115
116
|
const socialProviders = await (0, init_social_1.initSocialAuth)(config, services.socialProviderRegistry, services.authService, services.socialAuthService, services.jwtService, services.sessionService, services.authChallengeHelperService, services.clientInfoService, logger, socialAuthStateStore, repos.userRepository, services.phoneVerificationService, services.auditService, services.trustedDeviceService, repos.socialProviderSecretRepository, services.hookRegistry);
|
|
117
|
+
// Build SocialRedirectHandler when any social provider is enabled
|
|
118
|
+
const hasSocial = config.social?.google?.enabled || config.social?.apple?.enabled || config.social?.facebook?.enabled;
|
|
119
|
+
const socialRedirectHandler = hasSocial
|
|
120
|
+
? new social_redirect_handler_1.SocialRedirectHandler(config, services.socialProviderRegistry, socialAuthStateStore, storage, logger)
|
|
121
|
+
: undefined;
|
|
116
122
|
// ========================================================================
|
|
117
123
|
// 4b. Validate reCAPTCHA Provider (if enabled)
|
|
118
124
|
// ========================================================================
|
|
@@ -297,6 +303,7 @@ class NAuth {
|
|
|
297
303
|
logger,
|
|
298
304
|
socialAuthService: services.socialAuthService,
|
|
299
305
|
csrfService,
|
|
306
|
+
socialRedirect: socialRedirectHandler,
|
|
300
307
|
};
|
|
301
308
|
}
|
|
302
309
|
}
|
package/dist/bootstrap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;AAIH,uDAAmD;AACnD,kEAA8D;AAC9D,+DAAyD;AAEzD,gEAA4D;AAC5D,6DAAyD;AAEzD,WAAW;AACX,wEAAmE;AACnE,0DAAsD;AACtD,8EAAyE;AACzE,0DAAsD;AACtD,0DAAsD;AAEtD,gBAAgB;AAChB,qEAAiE;AACjE,6DAAyD;AACzD,+DAA0E;AAC1E,6DAAkE;AAClE,2DAAiF;AACjF,6EAAiF;AACjF,yCAAiF;AAGjF,gGAAkF;
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","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,MAAM,CAAC,GAAG,CAAC,uCAAuC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAElE,OAAO;YACL,GAAG,cAAc;YACjB,GAAG,eAAe;YAClB,UAAU;YACV,OAAO;YACP,OAAO;YACP,MAAM;YACN,MAAM;YACN,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB;YAC7C,WAAW;YACX,cAAc,EAAE,qBAAqB;SACtC,CAAC;IACJ,CAAC;CACF;AAxVD,sBAwVC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nauth-toolkit/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Embedded authentication engine for Node.js — NestJS, Express, Fastify",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.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.2.
|
|
52
|
+
"@nauth-toolkit/recaptcha": "^0.2.2",
|
|
53
53
|
"typeorm": "^0.3.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|