@nauth-toolkit/core 0.1.29 → 0.1.30

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.
@@ -52,4 +52,5 @@ export * from './admin-set-password.dto';
52
52
  export * from './trust-device-response.dto';
53
53
  export * from './is-trusted-device-response.dto';
54
54
  export * from './social-auth.dto';
55
+ export * from './social-redirect.dto';
55
56
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sCAAsC,CAAC;AACrD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB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9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,0BAA0B,CAAC;AAEzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AAEjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
package/dist/dto/index.js CHANGED
@@ -70,6 +70,7 @@ __exportStar(require("./admin-set-password.dto"), exports);
70
70
  __exportStar(require("./trust-device-response.dto"), exports);
71
71
  __exportStar(require("./is-trusted-device-response.dto"), exports);
72
72
  __exportStar(require("./social-auth.dto"), exports);
73
+ __exportStar(require("./social-redirect.dto"), exports);
73
74
  // Note: Social and MFA DTOs moved to their respective packages
74
75
  // - social-login.dto → @nauth-toolkit/social-*
75
76
  // - mfa.dto → @nauth-toolkit/mfa-*
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iBAAiB;AACjB,+CAA6B;AAC7B,qDAAmC;AACnC,8CAA4B;AAC5B,wDAAsC;AACtC,gEAA8C;AAC9C,iEAA+C;AAC/C,sDAAoC;AACpC,oDAAkC;AAClC,uEAAqD;AACrD,qDAAmC;AACnC,qDAAmC;AACnC,4DAA0C;AAC1C,uDAAqC;AACrC,wDAAsC;AACtC,gEAA8C;AAC9C,sDAAoC;AACpC,sDAAoC;AACpC,uDAAqC;AACrC,2DAAyC;AACzC,0DAAwC;AACxC,uDAAqC;AACrC,gEAA8C;AAC9C,2DAAyC;AACzC,oEAAkD;AAClD,8DAA4C;AAC5C,uDAAqC;AACrC,yDAAuC;AACvC,qDAAmC;AACnC,gEAA8C;AAC9C,uDAAqC;AACrC,0DAAwC;AACxC,6DAA2C;AAC3C,kDAAgC;AAChC,wDAAsC;AACtC,wDAAsC;AACtC,gEAA8C;AAC9C,gEAA8C;AAC9C,kEAAgD;AAChD,gEAA8C;AAC9C,oDAAkC;AAClC,6DAA2C;AAC3C,0DAAwC;AACxC,uDAAqC;AACrC,0DAAwC;AACxC,+CAA6B;AAC7B,wDAAsC;AACtC,mDAAiC;AACjC,4DAA0C;AAC1C,iEAA+C;AAC/C,0EAAwD;AACxD,2DAAyC;AACzC,+EAA+E;AAC/E,8DAA4C;AAC5C,mEAAiD;AAEjD,oDAAkC;AAElC,+DAA+D;AAC/D,+CAA+C;AAC/C,mCAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iBAAiB;AACjB,+CAA6B;AAC7B,qDAAmC;AACnC,8CAA4B;AAC5B,wDAAsC;AACtC,gEAA8C;AAC9C,iEAA+C;AAC/C,sDAAoC;AACpC,oDAAkC;AAClC,uEAAqD;AACrD,qDAAmC;AACnC,qDAAmC;AACnC,4DAA0C;AAC1C,uDAAqC;AACrC,wDAAsC;AACtC,gEAA8C;AAC9C,sDAAoC;AACpC,sDAAoC;AACpC,uDAAqC;AACrC,2DAAyC;AACzC,0DAAwC;AACxC,uDAAqC;AACrC,gEAA8C;AAC9C,2DAAyC;AACzC,oEAAkD;AAClD,8DAA4C;AAC5C,uDAAqC;AACrC,yDAAuC;AACvC,qDAAmC;AACnC,gEAA8C;AAC9C,uDAAqC;AACrC,0DAAwC;AACxC,6DAA2C;AAC3C,kDAAgC;AAChC,wDAAsC;AACtC,wDAAsC;AACtC,gEAA8C;AAC9C,gEAA8C;AAC9C,kEAAgD;AAChD,gEAA8C;AAC9C,oDAAkC;AAClC,6DAA2C;AAC3C,0DAAwC;AACxC,uDAAqC;AACrC,0DAAwC;AACxC,+CAA6B;AAC7B,wDAAsC;AACtC,mDAAiC;AACjC,4DAA0C;AAC1C,iEAA+C;AAC/C,0EAAwD;AACxD,2DAAyC;AACzC,+EAA+E;AAC/E,8DAA4C;AAC5C,mEAAiD;AAEjD,oDAAkC;AAClC,wDAAsC;AAEtC,+DAA+D;AAC/D,+CAA+C;AAC/C,mCAAmC"}
@@ -0,0 +1,302 @@
1
+ /**
2
+ * DTO for starting the redirect-first social login flow
3
+ *
4
+ * Used when initiating a backend-first OAuth redirect flow where the provider
5
+ * redirects back to the backend callback endpoint.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * // GET /auth/social/google/redirect?returnTo=/auth/callback&appState=12345&action=login
10
+ * ```
11
+ */
12
+ export declare class StartSocialRedirectQueryDTO {
13
+ /**
14
+ * Frontend path or absolute URL to redirect to after authentication completes
15
+ *
16
+ * Validation:
17
+ * - Optional field
18
+ * - Max 2048 characters
19
+ *
20
+ * Sanitization:
21
+ * - Trimmed
22
+ *
23
+ * @example '/auth/callback'
24
+ * @example 'https://myapp.com/auth/callback'
25
+ */
26
+ returnTo?: string;
27
+ /**
28
+ * Opaque, non-secret state to round-trip back to the frontend
29
+ *
30
+ * This value is stored during the OAuth flow and returned to the frontend
31
+ * after authentication completes. Use it to maintain UI state across the redirect.
32
+ *
33
+ * Validation:
34
+ * - Optional field
35
+ * - Max 2000 characters
36
+ *
37
+ * Sanitization:
38
+ * - Trimmed
39
+ *
40
+ * @example '12345'
41
+ * @example 'page=dashboard&mode=dark'
42
+ */
43
+ appState?: string;
44
+ /**
45
+ * Redirect action type
46
+ *
47
+ * - `login`: Standard social login/signup (default)
48
+ * - `link`: Link social account to existing authenticated user
49
+ *
50
+ * Validation:
51
+ * - Optional field
52
+ * - Must be either 'login' or 'link'
53
+ *
54
+ * @example 'login'
55
+ * @example 'link'
56
+ */
57
+ action?: 'login' | 'link';
58
+ }
59
+ /**
60
+ * DTO for OAuth callbacks via GET query parameters
61
+ *
62
+ * Used by providers that redirect with query params (Google, Facebook).
63
+ * This DTO handles both successful callbacks and error scenarios.
64
+ *
65
+ * @example
66
+ * ```typescript
67
+ * // Successful callback
68
+ * // GET /auth/social/google/callback?code=ABC123&state=xyz789
69
+ *
70
+ * // Error callback
71
+ * // GET /auth/social/google/callback?error=access_denied&error_description=User+cancelled
72
+ * ```
73
+ */
74
+ export declare class SocialCallbackQueryDTO {
75
+ /**
76
+ * OAuth authorization code from provider
77
+ *
78
+ * Validation:
79
+ * - Optional field
80
+ * - Max 2000 characters
81
+ *
82
+ * Sanitization:
83
+ * - Trimmed
84
+ */
85
+ code?: string;
86
+ /**
87
+ * OAuth state parameter for CSRF protection
88
+ *
89
+ * Validation:
90
+ * - Optional field
91
+ * - Max 500 characters
92
+ *
93
+ * Sanitization:
94
+ * - Trimmed
95
+ */
96
+ state?: string;
97
+ /**
98
+ * Provider error code (if user cancels or error occurs)
99
+ *
100
+ * Validation:
101
+ * - Optional field
102
+ * - Max 2000 characters
103
+ *
104
+ * Sanitization:
105
+ * - Trimmed
106
+ *
107
+ * @example 'access_denied'
108
+ */
109
+ error?: string;
110
+ /**
111
+ * Provider error description
112
+ *
113
+ * Validation:
114
+ * - Optional field
115
+ * - Max 4000 characters
116
+ *
117
+ * Sanitization:
118
+ * - Trimmed
119
+ *
120
+ * @example 'User cancelled the authentication request'
121
+ */
122
+ error_description?: string;
123
+ /**
124
+ * Google-specific: OAuth scope parameter
125
+ *
126
+ * Google often includes this in the callback. Explicitly allowed to avoid
127
+ * validation errors when using whitelist + forbidNonWhitelisted validation.
128
+ *
129
+ * Validation:
130
+ * - Optional field
131
+ * - Max 4000 characters
132
+ *
133
+ * Sanitization:
134
+ * - Trimmed
135
+ */
136
+ scope?: string;
137
+ /**
138
+ * Google-specific: Authenticated user index
139
+ *
140
+ * Validation:
141
+ * - Optional field
142
+ * - Max 50 characters
143
+ *
144
+ * Sanitization:
145
+ * - Trimmed
146
+ */
147
+ authuser?: string;
148
+ /**
149
+ * Google-specific: Hosted domain parameter
150
+ *
151
+ * Validation:
152
+ * - Optional field
153
+ * - Max 2000 characters
154
+ *
155
+ * Sanitization:
156
+ * - Trimmed
157
+ */
158
+ hd?: string;
159
+ /**
160
+ * Google-specific: Prompt parameter
161
+ *
162
+ * Validation:
163
+ * - Optional field
164
+ * - Max 2000 characters
165
+ *
166
+ * Sanitization:
167
+ * - Trimmed
168
+ */
169
+ prompt?: string;
170
+ /**
171
+ * Provider-specific: Session state parameter
172
+ *
173
+ * Some providers include this for session management.
174
+ *
175
+ * Validation:
176
+ * - Optional field
177
+ * - Max 2000 characters
178
+ *
179
+ * Sanitization:
180
+ * - Trimmed
181
+ */
182
+ session_state?: string;
183
+ /**
184
+ * Provider-specific: Error URI parameter
185
+ *
186
+ * Some providers include a URI with more error details.
187
+ *
188
+ * Validation:
189
+ * - Optional field
190
+ * - Max 4000 characters
191
+ *
192
+ * Sanitization:
193
+ * - Trimmed
194
+ */
195
+ error_uri?: string;
196
+ }
197
+ /**
198
+ * DTO for Apple form_post OAuth callbacks
199
+ *
200
+ * Apple uses POST form_post response mode instead of query parameters.
201
+ * This DTO handles the form data sent to the callback endpoint.
202
+ *
203
+ * @example
204
+ * ```typescript
205
+ * // POST /auth/social/apple/callback
206
+ * // Content-Type: application/x-www-form-urlencoded
207
+ * // code=ABC123&state=xyz789
208
+ * ```
209
+ */
210
+ export declare class SocialCallbackFormDTO {
211
+ /**
212
+ * OAuth authorization code from provider
213
+ *
214
+ * Validation:
215
+ * - Optional field
216
+ * - Max 2000 characters
217
+ *
218
+ * Sanitization:
219
+ * - Trimmed
220
+ */
221
+ code?: string;
222
+ /**
223
+ * OAuth state parameter for CSRF protection
224
+ *
225
+ * Validation:
226
+ * - Optional field
227
+ * - Max 500 characters
228
+ *
229
+ * Sanitization:
230
+ * - Trimmed
231
+ */
232
+ state?: string;
233
+ /**
234
+ * Provider error code (if user cancels or error occurs)
235
+ *
236
+ * Validation:
237
+ * - Optional field
238
+ * - Max 2000 characters
239
+ *
240
+ * Sanitization:
241
+ * - Trimmed
242
+ */
243
+ error?: string;
244
+ /**
245
+ * Provider error description
246
+ *
247
+ * Validation:
248
+ * - Optional field
249
+ * - Max 4000 characters
250
+ *
251
+ * Sanitization:
252
+ * - Trimmed
253
+ */
254
+ error_description?: string;
255
+ /**
256
+ * Provider callback extras (for validation compatibility)
257
+ *
258
+ * Included for parity with GET callback DTO to avoid strict validation issues.
259
+ *
260
+ * Validation:
261
+ * - Optional field
262
+ * - Max 4000 characters
263
+ *
264
+ * Sanitization:
265
+ * - Trimmed
266
+ */
267
+ scope?: string;
268
+ /**
269
+ * Provider-specific parameter
270
+ *
271
+ * Validation:
272
+ * - Optional field
273
+ * - Max 50 characters
274
+ *
275
+ * Sanitization:
276
+ * - Trimmed
277
+ */
278
+ authuser?: string;
279
+ /**
280
+ * Provider-specific parameter
281
+ *
282
+ * Validation:
283
+ * - Optional field
284
+ * - Max 2000 characters
285
+ *
286
+ * Sanitization:
287
+ * - Trimmed
288
+ */
289
+ hd?: string;
290
+ /**
291
+ * Provider-specific parameter
292
+ *
293
+ * Validation:
294
+ * - Optional field
295
+ * - Max 2000 characters
296
+ *
297
+ * Sanitization:
298
+ * - Trimmed
299
+ */
300
+ prompt?: string;
301
+ }
302
+ //# sourceMappingURL=social-redirect.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"social-redirect.dto.d.ts","sourceRoot":"","sources":["../../src/dto/social-redirect.dto.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,qBAAa,2BAA2B;IACtC;;;;;;;;;;;;OAYG;IAKH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;;;;;;OAeG;IAKH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;;;OAYG;IAGH,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,sBAAsB;IACjC;;;;;;;;;OASG;IAKH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;;OASG;IAKH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;;;OAWG;IAKH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;;;OAWG;IAKH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;;;;;;;OAYG;IAKH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;OASG;IAKH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;;;OASG;IAKH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;;;OASG;IAKH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;;OAWG;IAKH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;;;;;;OAWG;IAKH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,qBAAqB;IAChC;;;;;;;;;OASG;IAKH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;;OASG;IAKH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;OASG;IAKH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;OASG;IAKH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;;;;;;OAWG;IAKH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;;;;OASG;IAKH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;;;OASG;IAKH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;;;OASG;IAKH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,464 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SocialCallbackFormDTO = exports.SocialCallbackQueryDTO = exports.StartSocialRedirectQueryDTO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ /**
16
+ * DTO for starting the redirect-first social login flow
17
+ *
18
+ * Used when initiating a backend-first OAuth redirect flow where the provider
19
+ * redirects back to the backend callback endpoint.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * // GET /auth/social/google/redirect?returnTo=/auth/callback&appState=12345&action=login
24
+ * ```
25
+ */
26
+ class StartSocialRedirectQueryDTO {
27
+ /**
28
+ * Frontend path or absolute URL to redirect to after authentication completes
29
+ *
30
+ * Validation:
31
+ * - Optional field
32
+ * - Max 2048 characters
33
+ *
34
+ * Sanitization:
35
+ * - Trimmed
36
+ *
37
+ * @example '/auth/callback'
38
+ * @example 'https://myapp.com/auth/callback'
39
+ */
40
+ returnTo;
41
+ /**
42
+ * Opaque, non-secret state to round-trip back to the frontend
43
+ *
44
+ * This value is stored during the OAuth flow and returned to the frontend
45
+ * after authentication completes. Use it to maintain UI state across the redirect.
46
+ *
47
+ * Validation:
48
+ * - Optional field
49
+ * - Max 2000 characters
50
+ *
51
+ * Sanitization:
52
+ * - Trimmed
53
+ *
54
+ * @example '12345'
55
+ * @example 'page=dashboard&mode=dark'
56
+ */
57
+ appState;
58
+ /**
59
+ * Redirect action type
60
+ *
61
+ * - `login`: Standard social login/signup (default)
62
+ * - `link`: Link social account to existing authenticated user
63
+ *
64
+ * Validation:
65
+ * - Optional field
66
+ * - Must be either 'login' or 'link'
67
+ *
68
+ * @example 'login'
69
+ * @example 'link'
70
+ */
71
+ action;
72
+ }
73
+ exports.StartSocialRedirectQueryDTO = StartSocialRedirectQueryDTO;
74
+ __decorate([
75
+ (0, class_validator_1.IsOptional)(),
76
+ (0, class_validator_1.IsString)(),
77
+ (0, class_validator_1.MaxLength)(2048),
78
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
79
+ __metadata("design:type", String)
80
+ ], StartSocialRedirectQueryDTO.prototype, "returnTo", void 0);
81
+ __decorate([
82
+ (0, class_validator_1.IsOptional)(),
83
+ (0, class_validator_1.IsString)(),
84
+ (0, class_validator_1.MaxLength)(2000),
85
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
86
+ __metadata("design:type", String)
87
+ ], StartSocialRedirectQueryDTO.prototype, "appState", void 0);
88
+ __decorate([
89
+ (0, class_validator_1.IsOptional)(),
90
+ (0, class_validator_1.IsIn)(['login', 'link']),
91
+ __metadata("design:type", String)
92
+ ], StartSocialRedirectQueryDTO.prototype, "action", void 0);
93
+ /**
94
+ * DTO for OAuth callbacks via GET query parameters
95
+ *
96
+ * Used by providers that redirect with query params (Google, Facebook).
97
+ * This DTO handles both successful callbacks and error scenarios.
98
+ *
99
+ * @example
100
+ * ```typescript
101
+ * // Successful callback
102
+ * // GET /auth/social/google/callback?code=ABC123&state=xyz789
103
+ *
104
+ * // Error callback
105
+ * // GET /auth/social/google/callback?error=access_denied&error_description=User+cancelled
106
+ * ```
107
+ */
108
+ class SocialCallbackQueryDTO {
109
+ /**
110
+ * OAuth authorization code from provider
111
+ *
112
+ * Validation:
113
+ * - Optional field
114
+ * - Max 2000 characters
115
+ *
116
+ * Sanitization:
117
+ * - Trimmed
118
+ */
119
+ code;
120
+ /**
121
+ * OAuth state parameter for CSRF protection
122
+ *
123
+ * Validation:
124
+ * - Optional field
125
+ * - Max 500 characters
126
+ *
127
+ * Sanitization:
128
+ * - Trimmed
129
+ */
130
+ state;
131
+ /**
132
+ * Provider error code (if user cancels or error occurs)
133
+ *
134
+ * Validation:
135
+ * - Optional field
136
+ * - Max 2000 characters
137
+ *
138
+ * Sanitization:
139
+ * - Trimmed
140
+ *
141
+ * @example 'access_denied'
142
+ */
143
+ error;
144
+ /**
145
+ * Provider error description
146
+ *
147
+ * Validation:
148
+ * - Optional field
149
+ * - Max 4000 characters
150
+ *
151
+ * Sanitization:
152
+ * - Trimmed
153
+ *
154
+ * @example 'User cancelled the authentication request'
155
+ */
156
+ error_description;
157
+ /**
158
+ * Google-specific: OAuth scope parameter
159
+ *
160
+ * Google often includes this in the callback. Explicitly allowed to avoid
161
+ * validation errors when using whitelist + forbidNonWhitelisted validation.
162
+ *
163
+ * Validation:
164
+ * - Optional field
165
+ * - Max 4000 characters
166
+ *
167
+ * Sanitization:
168
+ * - Trimmed
169
+ */
170
+ scope;
171
+ /**
172
+ * Google-specific: Authenticated user index
173
+ *
174
+ * Validation:
175
+ * - Optional field
176
+ * - Max 50 characters
177
+ *
178
+ * Sanitization:
179
+ * - Trimmed
180
+ */
181
+ authuser;
182
+ /**
183
+ * Google-specific: Hosted domain parameter
184
+ *
185
+ * Validation:
186
+ * - Optional field
187
+ * - Max 2000 characters
188
+ *
189
+ * Sanitization:
190
+ * - Trimmed
191
+ */
192
+ hd;
193
+ /**
194
+ * Google-specific: Prompt parameter
195
+ *
196
+ * Validation:
197
+ * - Optional field
198
+ * - Max 2000 characters
199
+ *
200
+ * Sanitization:
201
+ * - Trimmed
202
+ */
203
+ prompt;
204
+ /**
205
+ * Provider-specific: Session state parameter
206
+ *
207
+ * Some providers include this for session management.
208
+ *
209
+ * Validation:
210
+ * - Optional field
211
+ * - Max 2000 characters
212
+ *
213
+ * Sanitization:
214
+ * - Trimmed
215
+ */
216
+ session_state;
217
+ /**
218
+ * Provider-specific: Error URI parameter
219
+ *
220
+ * Some providers include a URI with more error details.
221
+ *
222
+ * Validation:
223
+ * - Optional field
224
+ * - Max 4000 characters
225
+ *
226
+ * Sanitization:
227
+ * - Trimmed
228
+ */
229
+ error_uri;
230
+ }
231
+ exports.SocialCallbackQueryDTO = SocialCallbackQueryDTO;
232
+ __decorate([
233
+ (0, class_validator_1.IsOptional)(),
234
+ (0, class_validator_1.IsString)(),
235
+ (0, class_validator_1.MaxLength)(2000),
236
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
237
+ __metadata("design:type", String)
238
+ ], SocialCallbackQueryDTO.prototype, "code", void 0);
239
+ __decorate([
240
+ (0, class_validator_1.IsOptional)(),
241
+ (0, class_validator_1.IsString)(),
242
+ (0, class_validator_1.MaxLength)(500),
243
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
244
+ __metadata("design:type", String)
245
+ ], SocialCallbackQueryDTO.prototype, "state", void 0);
246
+ __decorate([
247
+ (0, class_validator_1.IsOptional)(),
248
+ (0, class_validator_1.IsString)(),
249
+ (0, class_validator_1.MaxLength)(2000),
250
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
251
+ __metadata("design:type", String)
252
+ ], SocialCallbackQueryDTO.prototype, "error", void 0);
253
+ __decorate([
254
+ (0, class_validator_1.IsOptional)(),
255
+ (0, class_validator_1.IsString)(),
256
+ (0, class_validator_1.MaxLength)(4000),
257
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
258
+ __metadata("design:type", String)
259
+ ], SocialCallbackQueryDTO.prototype, "error_description", void 0);
260
+ __decorate([
261
+ (0, class_validator_1.IsOptional)(),
262
+ (0, class_validator_1.IsString)(),
263
+ (0, class_validator_1.MaxLength)(4000),
264
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
265
+ __metadata("design:type", String)
266
+ ], SocialCallbackQueryDTO.prototype, "scope", void 0);
267
+ __decorate([
268
+ (0, class_validator_1.IsOptional)(),
269
+ (0, class_validator_1.IsString)(),
270
+ (0, class_validator_1.MaxLength)(50),
271
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
272
+ __metadata("design:type", String)
273
+ ], SocialCallbackQueryDTO.prototype, "authuser", void 0);
274
+ __decorate([
275
+ (0, class_validator_1.IsOptional)(),
276
+ (0, class_validator_1.IsString)(),
277
+ (0, class_validator_1.MaxLength)(2000),
278
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
279
+ __metadata("design:type", String)
280
+ ], SocialCallbackQueryDTO.prototype, "hd", void 0);
281
+ __decorate([
282
+ (0, class_validator_1.IsOptional)(),
283
+ (0, class_validator_1.IsString)(),
284
+ (0, class_validator_1.MaxLength)(2000),
285
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
286
+ __metadata("design:type", String)
287
+ ], SocialCallbackQueryDTO.prototype, "prompt", void 0);
288
+ __decorate([
289
+ (0, class_validator_1.IsOptional)(),
290
+ (0, class_validator_1.IsString)(),
291
+ (0, class_validator_1.MaxLength)(2000),
292
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
293
+ __metadata("design:type", String)
294
+ ], SocialCallbackQueryDTO.prototype, "session_state", void 0);
295
+ __decorate([
296
+ (0, class_validator_1.IsOptional)(),
297
+ (0, class_validator_1.IsString)(),
298
+ (0, class_validator_1.MaxLength)(4000),
299
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
300
+ __metadata("design:type", String)
301
+ ], SocialCallbackQueryDTO.prototype, "error_uri", void 0);
302
+ /**
303
+ * DTO for Apple form_post OAuth callbacks
304
+ *
305
+ * Apple uses POST form_post response mode instead of query parameters.
306
+ * This DTO handles the form data sent to the callback endpoint.
307
+ *
308
+ * @example
309
+ * ```typescript
310
+ * // POST /auth/social/apple/callback
311
+ * // Content-Type: application/x-www-form-urlencoded
312
+ * // code=ABC123&state=xyz789
313
+ * ```
314
+ */
315
+ class SocialCallbackFormDTO {
316
+ /**
317
+ * OAuth authorization code from provider
318
+ *
319
+ * Validation:
320
+ * - Optional field
321
+ * - Max 2000 characters
322
+ *
323
+ * Sanitization:
324
+ * - Trimmed
325
+ */
326
+ code;
327
+ /**
328
+ * OAuth state parameter for CSRF protection
329
+ *
330
+ * Validation:
331
+ * - Optional field
332
+ * - Max 500 characters
333
+ *
334
+ * Sanitization:
335
+ * - Trimmed
336
+ */
337
+ state;
338
+ /**
339
+ * Provider error code (if user cancels or error occurs)
340
+ *
341
+ * Validation:
342
+ * - Optional field
343
+ * - Max 2000 characters
344
+ *
345
+ * Sanitization:
346
+ * - Trimmed
347
+ */
348
+ error;
349
+ /**
350
+ * Provider error description
351
+ *
352
+ * Validation:
353
+ * - Optional field
354
+ * - Max 4000 characters
355
+ *
356
+ * Sanitization:
357
+ * - Trimmed
358
+ */
359
+ error_description;
360
+ /**
361
+ * Provider callback extras (for validation compatibility)
362
+ *
363
+ * Included for parity with GET callback DTO to avoid strict validation issues.
364
+ *
365
+ * Validation:
366
+ * - Optional field
367
+ * - Max 4000 characters
368
+ *
369
+ * Sanitization:
370
+ * - Trimmed
371
+ */
372
+ scope;
373
+ /**
374
+ * Provider-specific parameter
375
+ *
376
+ * Validation:
377
+ * - Optional field
378
+ * - Max 50 characters
379
+ *
380
+ * Sanitization:
381
+ * - Trimmed
382
+ */
383
+ authuser;
384
+ /**
385
+ * Provider-specific parameter
386
+ *
387
+ * Validation:
388
+ * - Optional field
389
+ * - Max 2000 characters
390
+ *
391
+ * Sanitization:
392
+ * - Trimmed
393
+ */
394
+ hd;
395
+ /**
396
+ * Provider-specific parameter
397
+ *
398
+ * Validation:
399
+ * - Optional field
400
+ * - Max 2000 characters
401
+ *
402
+ * Sanitization:
403
+ * - Trimmed
404
+ */
405
+ prompt;
406
+ }
407
+ exports.SocialCallbackFormDTO = SocialCallbackFormDTO;
408
+ __decorate([
409
+ (0, class_validator_1.IsOptional)(),
410
+ (0, class_validator_1.IsString)(),
411
+ (0, class_validator_1.MaxLength)(2000),
412
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
413
+ __metadata("design:type", String)
414
+ ], SocialCallbackFormDTO.prototype, "code", void 0);
415
+ __decorate([
416
+ (0, class_validator_1.IsOptional)(),
417
+ (0, class_validator_1.IsString)(),
418
+ (0, class_validator_1.MaxLength)(500),
419
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
420
+ __metadata("design:type", String)
421
+ ], SocialCallbackFormDTO.prototype, "state", void 0);
422
+ __decorate([
423
+ (0, class_validator_1.IsOptional)(),
424
+ (0, class_validator_1.IsString)(),
425
+ (0, class_validator_1.MaxLength)(2000),
426
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
427
+ __metadata("design:type", String)
428
+ ], SocialCallbackFormDTO.prototype, "error", void 0);
429
+ __decorate([
430
+ (0, class_validator_1.IsOptional)(),
431
+ (0, class_validator_1.IsString)(),
432
+ (0, class_validator_1.MaxLength)(4000),
433
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
434
+ __metadata("design:type", String)
435
+ ], SocialCallbackFormDTO.prototype, "error_description", void 0);
436
+ __decorate([
437
+ (0, class_validator_1.IsOptional)(),
438
+ (0, class_validator_1.IsString)(),
439
+ (0, class_validator_1.MaxLength)(4000),
440
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
441
+ __metadata("design:type", String)
442
+ ], SocialCallbackFormDTO.prototype, "scope", void 0);
443
+ __decorate([
444
+ (0, class_validator_1.IsOptional)(),
445
+ (0, class_validator_1.IsString)(),
446
+ (0, class_validator_1.MaxLength)(50),
447
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
448
+ __metadata("design:type", String)
449
+ ], SocialCallbackFormDTO.prototype, "authuser", void 0);
450
+ __decorate([
451
+ (0, class_validator_1.IsOptional)(),
452
+ (0, class_validator_1.IsString)(),
453
+ (0, class_validator_1.MaxLength)(2000),
454
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
455
+ __metadata("design:type", String)
456
+ ], SocialCallbackFormDTO.prototype, "hd", void 0);
457
+ __decorate([
458
+ (0, class_validator_1.IsOptional)(),
459
+ (0, class_validator_1.IsString)(),
460
+ (0, class_validator_1.MaxLength)(2000),
461
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
462
+ __metadata("design:type", String)
463
+ ], SocialCallbackFormDTO.prototype, "prompt", void 0);
464
+ //# sourceMappingURL=social-redirect.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"social-redirect.dto.js","sourceRoot":"","sources":["../../src/dto/social-redirect.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,qDAAwE;AAExE;;;;;;;;;;GAUG;AACH,MAAa,2BAA2B;IACtC;;;;;;;;;;;;OAYG;IAKH,QAAQ,CAAU;IAElB;;;;;;;;;;;;;;;OAeG;IAKH,QAAQ,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A,2BAAS,EAAC,IAAI,CAAC;IACf,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;;iDACjE;AAgBZ;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,IAAI,CAAC;IACf,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;;qDAC7D"}
@@ -2930,6 +2930,9 @@ export declare const authConfigSchema: z.ZodEffects<z.ZodObject<{
2930
2930
  disallowMultipleSessions?: boolean | undefined;
2931
2931
  maxLifetime?: string | number | undefined;
2932
2932
  } | undefined;
2933
+ login?: {
2934
+ identifierType?: "email" | "phone" | "username" | "email_or_username" | undefined;
2935
+ } | undefined;
2933
2936
  social?: {
2934
2937
  google?: {
2935
2938
  clientSecret?: string | undefined;
@@ -2966,9 +2969,6 @@ export declare const authConfigSchema: z.ZodEffects<z.ZodObject<{
2966
2969
  allowedReturnToOrigins?: string[] | undefined;
2967
2970
  } | undefined;
2968
2971
  } | undefined;
2969
- login?: {
2970
- identifierType?: "email" | "phone" | "username" | "email_or_username" | undefined;
2971
- } | undefined;
2972
2972
  tablePrefix?: string | undefined;
2973
2973
  signup?: {
2974
2974
  enabled?: boolean | undefined;
@@ -3198,6 +3198,9 @@ export declare const authConfigSchema: z.ZodEffects<z.ZodObject<{
3198
3198
  disallowMultipleSessions?: boolean | undefined;
3199
3199
  maxLifetime?: string | number | undefined;
3200
3200
  } | undefined;
3201
+ login?: {
3202
+ identifierType?: "email" | "phone" | "username" | "email_or_username" | undefined;
3203
+ } | undefined;
3201
3204
  social?: {
3202
3205
  google?: {
3203
3206
  clientSecret?: string | undefined;
@@ -3234,9 +3237,6 @@ export declare const authConfigSchema: z.ZodEffects<z.ZodObject<{
3234
3237
  allowedReturnToOrigins?: string[] | undefined;
3235
3238
  } | undefined;
3236
3239
  } | undefined;
3237
- login?: {
3238
- identifierType?: "email" | "phone" | "username" | "email_or_username" | undefined;
3239
- } | undefined;
3240
3240
  tablePrefix?: string | undefined;
3241
3241
  signup?: {
3242
3242
  enabled?: boolean | undefined;
@@ -3466,6 +3466,9 @@ export declare const authConfigSchema: z.ZodEffects<z.ZodObject<{
3466
3466
  disallowMultipleSessions?: boolean | undefined;
3467
3467
  maxLifetime?: string | number | undefined;
3468
3468
  } | undefined;
3469
+ login?: {
3470
+ identifierType?: "email" | "phone" | "username" | "email_or_username" | undefined;
3471
+ } | undefined;
3469
3472
  social?: {
3470
3473
  google?: {
3471
3474
  clientSecret?: string | undefined;
@@ -3502,9 +3505,6 @@ export declare const authConfigSchema: z.ZodEffects<z.ZodObject<{
3502
3505
  allowedReturnToOrigins?: string[] | undefined;
3503
3506
  } | undefined;
3504
3507
  } | undefined;
3505
- login?: {
3506
- identifierType?: "email" | "phone" | "username" | "email_or_username" | undefined;
3507
- } | undefined;
3508
3508
  tablePrefix?: string | undefined;
3509
3509
  signup?: {
3510
3510
  enabled?: boolean | undefined;
@@ -3734,6 +3734,9 @@ export declare const authConfigSchema: z.ZodEffects<z.ZodObject<{
3734
3734
  disallowMultipleSessions?: boolean | undefined;
3735
3735
  maxLifetime?: string | number | undefined;
3736
3736
  } | undefined;
3737
+ login?: {
3738
+ identifierType?: "email" | "phone" | "username" | "email_or_username" | undefined;
3739
+ } | undefined;
3737
3740
  social?: {
3738
3741
  google?: {
3739
3742
  clientSecret?: string | undefined;
@@ -3770,9 +3773,6 @@ export declare const authConfigSchema: z.ZodEffects<z.ZodObject<{
3770
3773
  allowedReturnToOrigins?: string[] | undefined;
3771
3774
  } | undefined;
3772
3775
  } | undefined;
3773
- login?: {
3774
- identifierType?: "email" | "phone" | "username" | "email_or_username" | undefined;
3775
- } | undefined;
3776
3776
  tablePrefix?: string | undefined;
3777
3777
  signup?: {
3778
3778
  enabled?: boolean | undefined;
@@ -4,7 +4,6 @@ export * from './session.service';
4
4
  export * from './auth.service';
5
5
  export * from './email-verification.service';
6
6
  export * from './client-info.service';
7
- export * from './challenge.service';
8
7
  export * from './auth-challenge-helper.service';
9
8
  export * from './mfa-base.service';
10
9
  export * from './mfa.service';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AAEtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC"}
@@ -20,7 +20,7 @@ __exportStar(require("./session.service"), exports);
20
20
  __exportStar(require("./auth.service"), exports);
21
21
  __exportStar(require("./email-verification.service"), exports);
22
22
  __exportStar(require("./client-info.service"), exports);
23
- __exportStar(require("./challenge.service"), exports);
23
+ // ChallengeService is internal - exported from /internal only
24
24
  __exportStar(require("./auth-challenge-helper.service"), exports);
25
25
  __exportStar(require("./mfa-base.service"), exports);
26
26
  __exportStar(require("./mfa.service"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,iDAA+B;AAC/B,+DAA6C;AAC7C,wDAAsC;AACtC,sDAAoC;AACpC,kEAAgD;AAChD,qDAAmC;AACnC,gDAA8B;AAC9B,2DAAyC;AACzC,yDAAuC;AACvC,kEAAgD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,iDAA+B;AAC/B,+DAA6C;AAC7C,wDAAsC;AACtC,8DAA8D;AAC9D,kEAAgD;AAChD,qDAAmC;AACnC,gDAA8B;AAC9B,2DAAyC;AACzC,yDAAuC;AACvC,kEAAgD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nauth-toolkit/core",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "Core authentication toolkit for Node JS",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",