@nauth-toolkit/nestjs 0.1.62 → 0.1.63
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.
|
@@ -22,6 +22,17 @@ export declare class AuthGuard implements CanActivate {
|
|
|
22
22
|
private readonly _authService;
|
|
23
23
|
private readonly config;
|
|
24
24
|
canActivate(context: ExecutionContext): Promise<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Attempt to authenticate the request and attach `request.user` + ContextStorage.
|
|
27
|
+
*
|
|
28
|
+
* When `strict` is true: behaves like a traditional auth guard (throws on failures).
|
|
29
|
+
* When `strict` is false: best-effort only; failures are treated as "unauthenticated"
|
|
30
|
+
* and the request is allowed to proceed without a user context.
|
|
31
|
+
*
|
|
32
|
+
* @param context - Nest execution context
|
|
33
|
+
* @param options - Behavior options
|
|
34
|
+
*/
|
|
35
|
+
private tryAttachAuthContext;
|
|
25
36
|
/**
|
|
26
37
|
* Extract JWT token from request with strict source validation based on configuration
|
|
27
38
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.guard.d.ts","sourceRoot":"","sources":["../../src/guards/auth.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,gBAAgB,EAAU,MAAM,gBAAgB,CAAC;AAiBnF;;;;;;;;;;;;;;;GAeG;AACH,qBACa,SAAU,YAAW,WAAW;IAS3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAGxC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAG1C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAGlD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAG5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEhC,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.guard.d.ts","sourceRoot":"","sources":["../../src/guards/auth.guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,gBAAgB,EAAU,MAAM,gBAAgB,CAAC;AAiBnF;;;;;;;;;;;;;;;GAeG;AACH,qBACa,SAAU,YAAW,WAAW;IAS3C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAGxC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAG1C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;IAGlD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAG5C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEhC,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAiB9D;;;;;;;;;OASG;YACW,oBAAoB;IA0IlC;;;;;;;;;OASG;IACH,OAAO,CAAC,YAAY;CAwCrB"}
|
|
@@ -52,92 +52,144 @@ let AuthGuard = class AuthGuard {
|
|
|
52
52
|
context.getHandler(),
|
|
53
53
|
context.getClass(),
|
|
54
54
|
]);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
// Public routes can optionally accept authentication:
|
|
56
|
+
// - If a valid token is present, we attach user/context so `@CurrentUser()` works.
|
|
57
|
+
// - If token is missing/invalid/expired (or session is revoked/expired), we do NOT throw.
|
|
58
|
+
// This keeps public endpoints resilient while still enabling "optional auth" patterns.
|
|
59
|
+
await this.tryAttachAuthContext(context, { strict: !isPublic });
|
|
60
|
+
// if error is not thrown then it's valid tokens or public route
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Attempt to authenticate the request and attach `request.user` + ContextStorage.
|
|
65
|
+
*
|
|
66
|
+
* When `strict` is true: behaves like a traditional auth guard (throws on failures).
|
|
67
|
+
* When `strict` is false: best-effort only; failures are treated as "unauthenticated"
|
|
68
|
+
* and the request is allowed to proceed without a user context.
|
|
69
|
+
*
|
|
70
|
+
* @param context - Nest execution context
|
|
71
|
+
* @param options - Behavior options
|
|
72
|
+
*/
|
|
73
|
+
async tryAttachAuthContext(context, options) {
|
|
58
74
|
const request = context.switchToHttp().getRequest();
|
|
59
|
-
//
|
|
60
|
-
|
|
75
|
+
// ============================================================================
|
|
76
|
+
// Token extraction (delivery-mode aware)
|
|
77
|
+
// ============================================================================
|
|
78
|
+
let token = null;
|
|
79
|
+
try {
|
|
80
|
+
token = this.extractToken(context);
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
if (options.strict) {
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
return; // Optional auth: treat as unauthenticated
|
|
87
|
+
}
|
|
61
88
|
if (!token) {
|
|
62
|
-
|
|
89
|
+
if (options.strict) {
|
|
90
|
+
throw new core_2.NAuthException(core_2.AuthErrorCode.TOKEN_INVALID, 'No token provided');
|
|
91
|
+
}
|
|
92
|
+
return;
|
|
63
93
|
}
|
|
64
94
|
// Validate token
|
|
65
95
|
const validation = await this._jwtService.validateAccessToken(token);
|
|
66
96
|
if (!validation.valid) {
|
|
67
|
-
|
|
97
|
+
if (options.strict) {
|
|
98
|
+
throw new core_2.NAuthException(core_2.AuthErrorCode.TOKEN_INVALID, validation.error || 'Invalid token');
|
|
99
|
+
}
|
|
100
|
+
return;
|
|
68
101
|
}
|
|
69
102
|
// ============================================================================
|
|
70
|
-
//
|
|
103
|
+
// Session checks (revocation + expiry)
|
|
71
104
|
// ============================================================================
|
|
72
|
-
//
|
|
105
|
+
// WHY:
|
|
106
|
+
// - Even if the JWT is cryptographically valid, we must ensure the session
|
|
107
|
+
// hasn't been revoked/expired server-side.
|
|
73
108
|
const sessionId = validation.payload.sessionId;
|
|
74
109
|
const session = await this._sessionService.findByIdLight(sessionId);
|
|
75
110
|
if (!session) {
|
|
76
|
-
|
|
111
|
+
if (options.strict) {
|
|
112
|
+
throw new core_2.NAuthException(core_2.AuthErrorCode.SESSION_NOT_FOUND, 'Session not found');
|
|
113
|
+
}
|
|
114
|
+
return;
|
|
77
115
|
}
|
|
78
|
-
// Store initial version for optimistic locking check
|
|
116
|
+
// Store initial version for optimistic locking check (TOCTOU prevention)
|
|
79
117
|
const initialVersion = session.version;
|
|
80
118
|
if (session.isRevoked) {
|
|
81
|
-
|
|
119
|
+
if (options.strict) {
|
|
120
|
+
throw new core_2.NAuthException(core_2.AuthErrorCode.TOKEN_REUSE_DETECTED, 'Session has been revoked');
|
|
121
|
+
}
|
|
122
|
+
return;
|
|
82
123
|
}
|
|
83
|
-
// Check if session is expired
|
|
84
124
|
if (session.expiresAt < new Date()) {
|
|
85
|
-
|
|
125
|
+
if (options.strict) {
|
|
126
|
+
throw new core_2.NAuthException(core_2.AuthErrorCode.SESSION_EXPIRED, 'Session has expired');
|
|
127
|
+
}
|
|
128
|
+
return;
|
|
86
129
|
}
|
|
87
130
|
// ============================================================================
|
|
88
131
|
// Load user via AuthService (service-first architecture)
|
|
89
132
|
// ============================================================================
|
|
90
|
-
//
|
|
91
|
-
// - User lookup by sub
|
|
92
|
-
// - Active status check
|
|
93
|
-
// - Computing hasPasswordHash from passwordHash
|
|
94
|
-
// - Removing sensitive fields (passwordHash, totpSecret, backupCodes, passwordHistory)
|
|
95
|
-
//
|
|
96
|
-
// Wrap in context restoration to ensure ContextStorage.set() works
|
|
133
|
+
// Wrap in context restoration to ensure ContextStorage.set() works.
|
|
97
134
|
const store = (0, nauth_context_guard_1.getNAuthContextStore)(request);
|
|
98
135
|
if (!store) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return core_2.ContextStorage.enterStore(store, async () => {
|
|
103
|
-
const user = await this._authService.getUserForAuthContext(validation.payload.sub);
|
|
104
|
-
//
|
|
105
|
-
// ============================================================================
|
|
106
|
-
// Session-scoped auth method propagation
|
|
107
|
-
// ============================================================================
|
|
108
|
-
// WHY: NestJS `@CurrentUser()` often backs `/profile` and other "who am I" endpoints.
|
|
109
|
-
// Attaching session auth method allows frontends to show "Signed in with Google/Apple/etc."
|
|
110
|
-
// even after refresh or cookie-based OAuth redirects.
|
|
111
|
-
const sessionAuthMethod = session.authMethod ?? null;
|
|
112
|
-
user.sessionAuthMethod = sessionAuthMethod;
|
|
113
|
-
// SECURITY CRITICAL: Re-check session hasn't been modified (optimistic locking)
|
|
114
|
-
// Prevents TOCTOU (Time-of-Check-Time-of-Use) vulnerabilities
|
|
115
|
-
const revalidated = await this._sessionService.findByIdLight(sessionId);
|
|
116
|
-
if (!revalidated || revalidated.version !== initialVersion || revalidated.isRevoked) {
|
|
117
|
-
throw new core_2.NAuthException(core_2.AuthErrorCode.TOKEN_INVALID, 'Session was modified during request - possible security breach');
|
|
136
|
+
if (options.strict) {
|
|
137
|
+
// No context available - should not happen with proper setup
|
|
138
|
+
throw new core_2.NAuthException(core_2.AuthErrorCode.INTERNAL_ERROR, 'Context not initialized');
|
|
118
139
|
}
|
|
119
|
-
//
|
|
120
|
-
request
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
140
|
+
// Optional auth: still provide `@CurrentUser()` support by attaching user to the request,
|
|
141
|
+
// but skip ContextStorage because the request isn't context-initialized.
|
|
142
|
+
try {
|
|
143
|
+
const user = await this._authService.getUserForAuthContext(validation.payload.sub);
|
|
144
|
+
request.user = user;
|
|
145
|
+
request.token = validation.payload;
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
// Optional auth must not block public endpoints
|
|
149
|
+
}
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
try {
|
|
153
|
+
await core_2.ContextStorage.enterStore(store, async () => {
|
|
154
|
+
const user = await this._authService.getUserForAuthContext(validation.payload.sub);
|
|
155
|
+
// ============================================================================
|
|
156
|
+
// Session-scoped auth method propagation
|
|
157
|
+
// ============================================================================
|
|
158
|
+
const sessionAuthMethod = session.authMethod ?? null;
|
|
159
|
+
user.sessionAuthMethod = sessionAuthMethod;
|
|
160
|
+
// SECURITY CRITICAL: Re-check session hasn't been modified (optimistic locking)
|
|
161
|
+
const revalidated = await this._sessionService.findByIdLight(sessionId);
|
|
162
|
+
if (!revalidated || revalidated.version !== initialVersion || revalidated.isRevoked) {
|
|
163
|
+
throw new core_2.NAuthException(core_2.AuthErrorCode.TOKEN_INVALID, 'Session was modified during request - possible security breach');
|
|
133
164
|
}
|
|
134
|
-
|
|
135
|
-
|
|
165
|
+
// Attach user to request
|
|
166
|
+
request.user = user;
|
|
167
|
+
request.token = validation.payload;
|
|
168
|
+
// Store in ContextStorage for service access
|
|
169
|
+
core_2.ContextStorage.set('CURRENT_USER', user);
|
|
170
|
+
core_2.ContextStorage.set('JWT_PAYLOAD', validation.payload);
|
|
171
|
+
core_2.ContextStorage.set('CURRENT_SESSION', sessionId);
|
|
172
|
+
// Update CLIENT_INFO with sessionId and userId
|
|
173
|
+
const clientInfo = core_2.ContextStorage.get('CLIENT_INFO');
|
|
174
|
+
if (clientInfo) {
|
|
175
|
+
const sessionIdNumber = typeof sessionId === 'number' ? sessionId : parseInt(String(sessionId), 10);
|
|
176
|
+
const userIdNumber = typeof user.id === 'number' ? user.id : parseInt(String(user.id), 10);
|
|
177
|
+
if (!isNaN(sessionIdNumber) && sessionIdNumber > 0) {
|
|
178
|
+
clientInfo.sessionId = sessionIdNumber;
|
|
179
|
+
}
|
|
180
|
+
if (!isNaN(userIdNumber) && userIdNumber > 0) {
|
|
181
|
+
clientInfo.userId = userIdNumber;
|
|
182
|
+
}
|
|
183
|
+
core_2.ContextStorage.set('CLIENT_INFO', clientInfo);
|
|
136
184
|
}
|
|
137
|
-
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
catch (error) {
|
|
188
|
+
if (options.strict) {
|
|
189
|
+
throw error;
|
|
138
190
|
}
|
|
139
|
-
|
|
140
|
-
}
|
|
191
|
+
// Optional auth must not block public endpoints; treat as unauthenticated.
|
|
192
|
+
}
|
|
141
193
|
}
|
|
142
194
|
/**
|
|
143
195
|
* Extract JWT token from request with strict source validation based on configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.guard.js","sourceRoot":"","sources":["../../src/guards/auth.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAmF;AACnF,uCAAyC;AACzC,8CAS6B;AAC7B,2DAA0E;AAC1E,qEAA+D;AAC/D,qFAA2F;AAC3F,+DAA6D;AAE7D;;;;;;;;;;;;;;;GAeG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAS;IACpB,+EAA+E;IAC/E,wCAAwC;IACxC,+EAA+E;IAC/E,OAAO;IACP,4DAA4D;IAC5D,qGAAqG;IACrG,4FAA4F;IAE3E,UAAU,CAAa;IAGvB,WAAW,CAAc;IAGzB,eAAe,CAAkB;IAGjC,YAAY,CAAe;IAG3B,MAAM,CAAe;IAEtC,KAAK,CAAC,WAAW,CAAC,OAAyB;QACzC,2BAA2B;QAC3B,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAU,gCAAa,EAAE;YACzE,OAAO,CAAC,UAAU,EAAE;YACpB,OAAO,CAAC,QAAQ,EAAE;SACnB,CAAC,CAAC;QAEH,IAAI,QAAQ,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.guard.js","sourceRoot":"","sources":["../../src/guards/auth.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAmF;AACnF,uCAAyC;AACzC,8CAS6B;AAC7B,2DAA0E;AAC1E,qEAA+D;AAC/D,qFAA2F;AAC3F,+DAA6D;AAE7D;;;;;;;;;;;;;;;GAeG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAS;IACpB,+EAA+E;IAC/E,wCAAwC;IACxC,+EAA+E;IAC/E,OAAO;IACP,4DAA4D;IAC5D,qGAAqG;IACrG,4FAA4F;IAE3E,UAAU,CAAa;IAGvB,WAAW,CAAc;IAGzB,eAAe,CAAkB;IAGjC,YAAY,CAAe;IA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CACtB,oBAAa,CAAC,kBAAkB,EAChC,oDAAoD,CACrD,CAAC;YACJ,CAAC;YACD,OAAO,WAAW,IAAI,IAAI,CAAC;QAC7B,CAAC;QAED,uBAAuB;QACvB,IAAI,WAAW,IAAI,CAAC,WAAW,EAAE,CAAC;YAChC,MAAM,IAAI,qBAAc,CAAC,oBAAa,CAAC,mBAAmB,EAAE,kDAAkD,CAAC,CAAC;QAClH,CAAC;QACD,OAAO,WAAW,IAAI,IAAI,CAAC;IAC7B,CAAC;CACF,CAAA;AA9OY,8BAAS;AASH;IADhB,IAAA,eAAM,EAAC,gBAAS,CAAC;8BACY,gBAAS;6CAAC;AAGvB;IADhB,IAAA,eAAM,EAAC,qBAAU,CAAC;8BACY,qBAAU;8CAAC;AAGzB;IADhB,IAAA,eAAM,EAAC,yBAAc,CAAC;8BACY,yBAAc;kDAAC;AAGjC;IADhB,IAAA,eAAM,EAAC,kBAAW,CAAC;8BACY,kBAAW;+CAAC;AAG3B;IADhB,IAAA,eAAM,EAAC,cAAc,CAAC;;yCACe;oBArB3B,SAAS;IADrB,IAAA,mBAAU,GAAE;GACA,SAAS,CA8OrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nauth-toolkit/nestjs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
4
4
|
"description": "NestJS adapter for nauth-toolkit - Platform-specific integrations",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"typeorm": "^0.3.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@nauth-toolkit/core": "0.1.
|
|
42
|
+
"@nauth-toolkit/core": "0.1.63"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@nestjs/common": "^11.1.8",
|