@spfn/auth 0.2.0-beta.8 → 0.2.0-beta.80
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/LICENSE +1 -1
- package/README.md +549 -1819
- package/dist/authenticate-ofdEmk6x.d.ts +1109 -0
- package/dist/config.d.ts +359 -41
- package/dist/config.js +186 -30
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +117 -3
- package/dist/errors.js +83 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +351 -109
- package/dist/index.js +124 -7
- package/dist/index.js.map +1 -1
- package/dist/nextjs/api.js +591 -61
- package/dist/nextjs/api.js.map +1 -1
- package/dist/nextjs/client.d.ts +28 -0
- package/dist/nextjs/client.js +80 -0
- package/dist/nextjs/client.js.map +1 -0
- package/dist/nextjs/server.d.ts +92 -3
- package/dist/nextjs/server.js +288 -24
- package/dist/nextjs/server.js.map +1 -1
- package/dist/server.d.ts +2015 -513
- package/dist/server.js +4198 -1086
- package/dist/server.js.map +1 -1
- package/dist/session-CGxgH3C9.d.ts +53 -0
- package/dist/types-1BMx0OX1.d.ts +84 -0
- package/migrations/0001_smooth_the_fury.sql +3 -0
- package/migrations/0002_deep_iceman.sql +11 -0
- package/migrations/0003_perfect_deathbird.sql +3 -0
- package/migrations/0004_concerned_rawhide_kid.sql +5 -0
- package/migrations/0005_lethal_lifeguard.sql +32 -0
- package/migrations/0006_easy_hardball.sql +24 -0
- package/migrations/0007_glossy_major_mapleleaf.sql +1 -0
- package/migrations/meta/0001_snapshot.json +1660 -0
- package/migrations/meta/0002_snapshot.json +1660 -0
- package/migrations/meta/0003_snapshot.json +1689 -0
- package/migrations/meta/0004_snapshot.json +1721 -0
- package/migrations/meta/0005_snapshot.json +1721 -0
- package/migrations/meta/0006_snapshot.json +1921 -0
- package/migrations/meta/0007_snapshot.json +1916 -0
- package/migrations/meta/_journal.json +49 -0
- package/package.json +43 -39
- package/dist/dto-lZmWuObc.d.ts +0 -645
package/dist/config.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
defineEnvSchema,
|
|
7
7
|
envString,
|
|
8
8
|
envNumber,
|
|
9
|
+
envBoolean,
|
|
9
10
|
createSecureSecretParser,
|
|
10
11
|
createPasswordParser
|
|
11
12
|
} from "@spfn/core/env";
|
|
@@ -67,10 +68,18 @@ var authEnvSchema = defineEnvSchema({
|
|
|
67
68
|
// ============================================================================
|
|
68
69
|
// Security Configuration
|
|
69
70
|
// ============================================================================
|
|
71
|
+
SPFN_AUTH_COOKIE_SECURE: {
|
|
72
|
+
...envBoolean({
|
|
73
|
+
description: 'Override cookie Secure flag. Defaults to NODE_ENV === "production". Set to false for HTTP-only environments (e.g. bastion over plain HTTP).',
|
|
74
|
+
required: false,
|
|
75
|
+
nextjs: true,
|
|
76
|
+
examples: [true, false]
|
|
77
|
+
})
|
|
78
|
+
},
|
|
70
79
|
SPFN_AUTH_BCRYPT_SALT_ROUNDS: {
|
|
71
80
|
...envNumber({
|
|
72
81
|
description: "Bcrypt salt rounds (cost factor, higher = more secure but slower)",
|
|
73
|
-
default:
|
|
82
|
+
default: 12,
|
|
74
83
|
required: false,
|
|
75
84
|
examples: [10, 12, 14]
|
|
76
85
|
}),
|
|
@@ -86,6 +95,16 @@ var authEnvSchema = defineEnvSchema({
|
|
|
86
95
|
]
|
|
87
96
|
})
|
|
88
97
|
},
|
|
98
|
+
SPFN_AUTH_TOKEN_ENCRYPTION_KEYS: {
|
|
99
|
+
...envString({
|
|
100
|
+
description: "Backend-only OAuth token encryption keyring. Comma-separated <keyId>:<base64-encoded 32-byte key> entries; the first key encrypts new values and remaining keys decrypt during rotation.",
|
|
101
|
+
required: false,
|
|
102
|
+
sensitive: true,
|
|
103
|
+
examples: [
|
|
104
|
+
"v2:<base64-encoded-32-byte-key>,v1:<previous-base64-encoded-32-byte-key>"
|
|
105
|
+
]
|
|
106
|
+
})
|
|
107
|
+
},
|
|
89
108
|
// ============================================================================
|
|
90
109
|
// Admin Account Configuration
|
|
91
110
|
// ============================================================================
|
|
@@ -152,11 +171,41 @@ var authEnvSchema = defineEnvSchema({
|
|
|
152
171
|
})
|
|
153
172
|
},
|
|
154
173
|
// ============================================================================
|
|
174
|
+
// Username Configuration
|
|
175
|
+
// ============================================================================
|
|
176
|
+
SPFN_AUTH_RESERVED_USERNAMES: {
|
|
177
|
+
...envString({
|
|
178
|
+
description: "Comma-separated list of reserved usernames that cannot be registered",
|
|
179
|
+
required: false,
|
|
180
|
+
default: "admin,root,system,support,help,moderator,superadmin",
|
|
181
|
+
examples: [
|
|
182
|
+
"admin,root,system,support,help",
|
|
183
|
+
"admin,root,system,support,help,moderator,superadmin,operator"
|
|
184
|
+
]
|
|
185
|
+
})
|
|
186
|
+
},
|
|
187
|
+
SPFN_AUTH_USERNAME_MIN_LENGTH: {
|
|
188
|
+
...envNumber({
|
|
189
|
+
description: "Minimum username length",
|
|
190
|
+
default: 3,
|
|
191
|
+
required: false,
|
|
192
|
+
examples: [2, 3, 4]
|
|
193
|
+
})
|
|
194
|
+
},
|
|
195
|
+
SPFN_AUTH_USERNAME_MAX_LENGTH: {
|
|
196
|
+
...envNumber({
|
|
197
|
+
description: "Maximum username length",
|
|
198
|
+
default: 30,
|
|
199
|
+
required: false,
|
|
200
|
+
examples: [20, 30, 50]
|
|
201
|
+
})
|
|
202
|
+
},
|
|
203
|
+
// ============================================================================
|
|
155
204
|
// API Configuration
|
|
156
205
|
// ============================================================================
|
|
157
206
|
SPFN_API_URL: {
|
|
158
207
|
...envString({
|
|
159
|
-
description: "
|
|
208
|
+
description: "Internal API URL for server-to-server communication",
|
|
160
209
|
default: "http://localhost:8790",
|
|
161
210
|
required: false,
|
|
162
211
|
examples: [
|
|
@@ -165,71 +214,178 @@ var authEnvSchema = defineEnvSchema({
|
|
|
165
214
|
]
|
|
166
215
|
})
|
|
167
216
|
},
|
|
217
|
+
NEXT_PUBLIC_SPFN_API_URL: {
|
|
218
|
+
...envString({
|
|
219
|
+
description: "Public-facing API URL used for browser-facing redirects. Falls back to SPFN_API_URL if not set.",
|
|
220
|
+
required: false,
|
|
221
|
+
examples: [
|
|
222
|
+
"https://api.example.com",
|
|
223
|
+
"http://localhost:8790"
|
|
224
|
+
]
|
|
225
|
+
})
|
|
226
|
+
},
|
|
227
|
+
SPFN_APP_URL: {
|
|
228
|
+
...envString({
|
|
229
|
+
description: "Next.js application URL (internal). Used for server-to-server communication.",
|
|
230
|
+
default: "http://localhost:3000",
|
|
231
|
+
required: false,
|
|
232
|
+
examples: [
|
|
233
|
+
"https://app.example.com",
|
|
234
|
+
"http://localhost:3000"
|
|
235
|
+
]
|
|
236
|
+
})
|
|
237
|
+
},
|
|
238
|
+
NEXT_PUBLIC_SPFN_APP_URL: {
|
|
239
|
+
...envString({
|
|
240
|
+
description: "Public-facing Next.js app URL for browser redirects (e.g. OAuth redirect). Falls back to SPFN_APP_URL if not set.",
|
|
241
|
+
required: false,
|
|
242
|
+
examples: [
|
|
243
|
+
"https://app.example.com",
|
|
244
|
+
"http://localhost:3000"
|
|
245
|
+
]
|
|
246
|
+
})
|
|
247
|
+
},
|
|
168
248
|
// ============================================================================
|
|
169
|
-
//
|
|
249
|
+
// OAuth Configuration - Google
|
|
170
250
|
// ============================================================================
|
|
171
|
-
|
|
251
|
+
SPFN_AUTH_GOOGLE_CLIENT_ID: {
|
|
172
252
|
...envString({
|
|
173
|
-
description: "
|
|
174
|
-
default: "ap-northeast-2",
|
|
253
|
+
description: "Google OAuth 2.0 Client ID. When set, Google OAuth routes are automatically enabled.",
|
|
175
254
|
required: false,
|
|
176
|
-
examples: ["
|
|
255
|
+
examples: ["123456789-abc123.apps.googleusercontent.com"]
|
|
177
256
|
})
|
|
178
257
|
},
|
|
179
|
-
|
|
258
|
+
SPFN_AUTH_GOOGLE_CLIENT_SECRET: {
|
|
180
259
|
...envString({
|
|
181
|
-
description: "
|
|
260
|
+
description: "Google OAuth 2.0 Client Secret",
|
|
182
261
|
required: false,
|
|
183
262
|
sensitive: true,
|
|
184
|
-
examples: ["
|
|
263
|
+
examples: ["GOCSPX-abcdefghijklmnop"]
|
|
185
264
|
})
|
|
186
265
|
},
|
|
187
|
-
|
|
266
|
+
SPFN_AUTH_GOOGLE_SCOPES: {
|
|
188
267
|
...envString({
|
|
189
|
-
description:
|
|
268
|
+
description: 'Comma-separated Google OAuth scopes. Defaults to "email,profile" if not set.',
|
|
190
269
|
required: false,
|
|
191
|
-
|
|
192
|
-
|
|
270
|
+
examples: [
|
|
271
|
+
"email,profile",
|
|
272
|
+
"email,profile,https://www.googleapis.com/auth/gmail.readonly",
|
|
273
|
+
"email,profile,https://www.googleapis.com/auth/calendar.readonly"
|
|
274
|
+
]
|
|
193
275
|
})
|
|
194
276
|
},
|
|
195
|
-
|
|
277
|
+
SPFN_AUTH_GOOGLE_REDIRECT_URI: {
|
|
196
278
|
...envString({
|
|
197
|
-
description: "
|
|
279
|
+
description: "Google OAuth callback URL. Defaults to {NEXT_PUBLIC_SPFN_APP_URL || SPFN_APP_URL}/_auth/oauth/google/callback \u2014 the callback must return to the web app origin that set the oauth_csrf cookie (the app rewrites /_auth/:path* to the API). Set this explicitly only when the callback should hit a different host (e.g. the API host for the direct oauthStart flow).",
|
|
198
280
|
required: false,
|
|
199
|
-
examples: [
|
|
281
|
+
examples: [
|
|
282
|
+
"https://app.example.com/_auth/oauth/google/callback",
|
|
283
|
+
"http://localhost:3000/_auth/oauth/google/callback"
|
|
284
|
+
]
|
|
200
285
|
})
|
|
201
286
|
},
|
|
202
287
|
// ============================================================================
|
|
203
|
-
//
|
|
288
|
+
// OAuth Configuration - Kakao
|
|
204
289
|
// ============================================================================
|
|
205
|
-
|
|
290
|
+
SPFN_AUTH_KAKAO_CLIENT_ID: {
|
|
206
291
|
...envString({
|
|
207
|
-
description: "
|
|
292
|
+
description: "Kakao Login REST API key. Used as the OAuth client_id.",
|
|
293
|
+
required: false,
|
|
294
|
+
examples: ["your-kakao-rest-api-key"]
|
|
295
|
+
})
|
|
296
|
+
},
|
|
297
|
+
SPFN_AUTH_KAKAO_CLIENT_SECRET: {
|
|
298
|
+
...envString({
|
|
299
|
+
description: "Kakao Login client secret. Required when the Kakao client-secret feature is enabled.",
|
|
208
300
|
required: false,
|
|
209
301
|
sensitive: true,
|
|
210
|
-
examples: ["
|
|
302
|
+
examples: ["your-kakao-client-secret"]
|
|
303
|
+
})
|
|
304
|
+
},
|
|
305
|
+
SPFN_AUTH_KAKAO_SCOPES: {
|
|
306
|
+
...envString({
|
|
307
|
+
description: "Comma-separated Kakao consent scopes. Defaults to account_email.",
|
|
308
|
+
required: false,
|
|
309
|
+
examples: ["account_email"]
|
|
310
|
+
})
|
|
311
|
+
},
|
|
312
|
+
SPFN_AUTH_KAKAO_REDIRECT_URI: {
|
|
313
|
+
...envString({
|
|
314
|
+
description: "Kakao OAuth callback URL. Defaults to {NEXT_PUBLIC_SPFN_APP_URL || SPFN_APP_URL}/_auth/oauth/kakao/callback.",
|
|
315
|
+
required: false,
|
|
316
|
+
examples: ["https://app.example.com/_auth/oauth/kakao/callback"]
|
|
317
|
+
})
|
|
318
|
+
},
|
|
319
|
+
// ============================================================================
|
|
320
|
+
// OAuth Configuration - Naver
|
|
321
|
+
// ============================================================================
|
|
322
|
+
SPFN_AUTH_NAVER_CLIENT_ID: {
|
|
323
|
+
...envString({
|
|
324
|
+
description: "Naver Login OAuth client ID.",
|
|
325
|
+
required: false,
|
|
326
|
+
examples: ["your-naver-client-id"]
|
|
211
327
|
})
|
|
212
328
|
},
|
|
213
|
-
|
|
329
|
+
SPFN_AUTH_NAVER_CLIENT_SECRET: {
|
|
214
330
|
...envString({
|
|
215
|
-
description: "
|
|
331
|
+
description: "Naver Login OAuth client secret.",
|
|
216
332
|
required: false,
|
|
217
333
|
sensitive: true,
|
|
218
|
-
examples: ["
|
|
334
|
+
examples: ["your-naver-client-secret"]
|
|
335
|
+
})
|
|
336
|
+
},
|
|
337
|
+
SPFN_AUTH_NAVER_REDIRECT_URI: {
|
|
338
|
+
...envString({
|
|
339
|
+
description: "Naver OAuth callback URL. Defaults to {NEXT_PUBLIC_SPFN_APP_URL || SPFN_APP_URL}/_auth/oauth/naver/callback.",
|
|
340
|
+
required: false,
|
|
341
|
+
examples: ["https://app.example.com/_auth/oauth/naver/callback"]
|
|
219
342
|
})
|
|
220
343
|
},
|
|
221
|
-
|
|
344
|
+
// ============================================================================
|
|
345
|
+
// Native Social Login (mobile/web id_token verification)
|
|
346
|
+
//
|
|
347
|
+
// 네이티브 SDK가 받은 id_token을 서버가 JWKS로 검증하는 경로 전용 설정.
|
|
348
|
+
// authorization code 교환을 하지 않으므로 client secret이 필요 없다.
|
|
349
|
+
// audience(aud)로 허용할 client id 목록만 지정한다.
|
|
350
|
+
// ============================================================================
|
|
351
|
+
SPFN_AUTH_GOOGLE_NATIVE_CLIENT_IDS: {
|
|
222
352
|
...envString({
|
|
223
|
-
description: "
|
|
353
|
+
description: "Comma-separated Google client IDs accepted as id_token audience for native sign-in (iOS, Android, web). When set, Google native sign-in is enabled. SPFN_AUTH_GOOGLE_CLIENT_ID is also accepted automatically.",
|
|
224
354
|
required: false,
|
|
225
|
-
examples: [
|
|
355
|
+
examples: [
|
|
356
|
+
"123-ios.apps.googleusercontent.com,123-android.apps.googleusercontent.com"
|
|
357
|
+
]
|
|
226
358
|
})
|
|
227
359
|
},
|
|
228
|
-
|
|
360
|
+
SPFN_AUTH_APPLE_CLIENT_IDS: {
|
|
229
361
|
...envString({
|
|
230
|
-
description: "
|
|
362
|
+
description: "Comma-separated Apple client IDs accepted as id_token audience for native sign-in (iOS bundle ID, web/Android Services ID). When set, Apple native sign-in is enabled.",
|
|
231
363
|
required: false,
|
|
232
|
-
examples: [
|
|
364
|
+
examples: [
|
|
365
|
+
"com.example.app,com.example.app.service"
|
|
366
|
+
]
|
|
367
|
+
})
|
|
368
|
+
},
|
|
369
|
+
SPFN_AUTH_OAUTH_SUCCESS_URL: {
|
|
370
|
+
...envString({
|
|
371
|
+
description: "OAuth callback page URL. This page should use OAuthCallback component to finalize session.",
|
|
372
|
+
required: false,
|
|
373
|
+
default: "/auth/callback",
|
|
374
|
+
examples: [
|
|
375
|
+
"/auth/callback",
|
|
376
|
+
"https://app.example.com/auth/callback"
|
|
377
|
+
]
|
|
378
|
+
})
|
|
379
|
+
},
|
|
380
|
+
SPFN_AUTH_OAUTH_ERROR_URL: {
|
|
381
|
+
...envString({
|
|
382
|
+
description: "URL to redirect after OAuth error. Use {error} placeholder for error message.",
|
|
383
|
+
required: false,
|
|
384
|
+
default: "/auth/error?error={error}",
|
|
385
|
+
examples: [
|
|
386
|
+
"https://app.example.com/auth/error?error={error}",
|
|
387
|
+
"http://localhost:3000/auth/error?error={error}"
|
|
388
|
+
]
|
|
233
389
|
})
|
|
234
390
|
}
|
|
235
391
|
});
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config/index.ts","../src/config/schema.ts"],"sourcesContent":["/**\n * Core Package Configuration\n *\n * @example\n * ```typescript\n * import { registry } from '@spfn/core/config';\n *\n * const env = registry.validate();\n * console.log(env.DB_POOL_MAX);\n * ```\n *\n * @module config\n */\n\nimport { createEnvRegistry } from '@spfn/core/env';\nimport { authEnvSchema } from './schema';\n\nexport { authEnvSchema as envSchema } from './schema';\n\n/**\n * Environment registry\n */\nconst registry = createEnvRegistry(authEnvSchema);\nexport const env = registry.validate();","/**\n * Auth Environment Variable Schema\n *\n * Centralized schema definition for all environment variables used in @spfn/auth.\n * This provides type safety, validation, and documentation for Auth configuration.\n *\n * @module config/schema\n */\n\nimport {\n defineEnvSchema,\n envString,\n envNumber,\n createSecureSecretParser,\n createPasswordParser,\n} from '@spfn/core/env';\n\n/**\n * Auth environment variable schema\n *\n * Defines all Auth environment variables with:\n * - Type information\n * - Default values\n * - Validation rules\n * - Documentation\n *\n * @example\n * ```typescript\n * import { authEnvSchema } from '@spfn/auth/config';\n *\n * // Access schema information\n * console.log(authEnvSchema.SPFN_AUTH_SESSION_SECRET.description);\n * console.log(authEnvSchema.SPFN_AUTH_JWT_EXPIRES_IN.default);\n * ```\n */\nexport const authEnvSchema = defineEnvSchema({\n // ============================================================================\n // Session Configuration\n // ============================================================================\n SPFN_AUTH_SESSION_SECRET: {\n ...envString({\n description: 'Session encryption secret (minimum 32 characters for AES-256)',\n required: true,\n fallbackKeys: ['SESSION_SECRET'],\n validator: createSecureSecretParser({\n minLength: 32,\n minUniqueChars: 16,\n minEntropy: 3.5,\n }),\n sensitive: true,\n nextjs: true, // Required for Next.js RSC session validation\n examples: [\n 'my-super-secret-session-key-at-least-32-chars-long',\n 'use-a-cryptographically-secure-random-string-here',\n ],\n }),\n },\n\n SPFN_AUTH_SESSION_TTL: {\n ...envString({\n description: 'Session TTL (time to live) - supports duration strings like \\'7d\\', \\'12h\\', \\'45m\\'',\n default: '7d',\n required: false,\n nextjs: true, // May be needed for session validation in Next.js RSC\n examples: ['7d', '30d', '12h', '45m', '3600'],\n }),\n },\n\n // ============================================================================\n // JWT Configuration\n // ============================================================================\n SPFN_AUTH_JWT_SECRET: {\n ...envString({\n description: 'JWT signing secret for server-signed tokens (legacy mode)',\n default: 'dev-secret-key-change-in-production',\n required: false,\n examples: [\n 'your-jwt-secret-key-here',\n 'use-different-from-session-secret',\n ],\n }),\n },\n\n SPFN_AUTH_JWT_EXPIRES_IN: {\n ...envString({\n description: 'JWT token expiration time (e.g., \\'7d\\', \\'24h\\', \\'1h\\')',\n default: '7d',\n required: false,\n examples: ['7d', '24h', '1h', '30m'],\n }),\n },\n\n // ============================================================================\n // Security Configuration\n // ============================================================================\n SPFN_AUTH_BCRYPT_SALT_ROUNDS: {\n ...envNumber({\n description: 'Bcrypt salt rounds (cost factor, higher = more secure but slower)',\n default: 10,\n required: false,\n examples: [10, 12, 14],\n }),\n key: 'SPFN_AUTH_BCRYPT_SALT_ROUNDS',\n },\n\n SPFN_AUTH_VERIFICATION_TOKEN_SECRET: {\n ...envString({\n description: 'Verification token secret for email verification, password reset, etc.',\n required: true,\n examples: [\n 'your-verification-token-secret',\n 'can-be-different-from-jwt-secret',\n ],\n }),\n },\n\n // ============================================================================\n // Admin Account Configuration\n // ============================================================================\n SPFN_AUTH_ADMIN_ACCOUNTS: {\n ...envString({\n description: 'JSON array of admin accounts (recommended for multiple admins)',\n required: false,\n examples: [\n '[{\"email\":\"admin@example.com\",\"password\":\"secure-pass\",\"role\":\"admin\"}]',\n '[{\"email\":\"super@example.com\",\"password\":\"pass1\",\"role\":\"superadmin\"},{\"email\":\"admin@example.com\",\"password\":\"pass2\",\"role\":\"admin\"}]',\n ],\n }),\n },\n\n SPFN_AUTH_ADMIN_EMAILS: {\n ...envString({\n description: 'Comma-separated list of admin emails (legacy CSV format)',\n required: false,\n examples: [\n 'admin@example.com,user@example.com',\n 'super@example.com,admin@example.com,user@example.com',\n ],\n }),\n },\n\n SPFN_AUTH_ADMIN_PASSWORDS: {\n ...envString({\n description: 'Comma-separated list of admin passwords (legacy CSV format)',\n required: false,\n examples: [\n 'admin-pass,user-pass',\n 'super-pass,admin-pass,user-pass',\n ],\n }),\n },\n\n SPFN_AUTH_ADMIN_ROLES: {\n ...envString({\n description: 'Comma-separated list of admin roles (legacy CSV format)',\n required: false,\n examples: [\n 'admin,user',\n 'superadmin,admin,user',\n ],\n }),\n },\n\n SPFN_AUTH_ADMIN_EMAIL: {\n ...envString({\n description: 'Single admin email (simplest format)',\n required: false,\n examples: ['admin@example.com'],\n }),\n },\n\n SPFN_AUTH_ADMIN_PASSWORD: {\n ...envString({\n description: 'Single admin password (simplest format)',\n required: false,\n validator: createPasswordParser({\n minLength: 8,\n requireUppercase: true,\n requireLowercase: true,\n requireNumber: true,\n requireSpecial: true,\n }),\n sensitive: true,\n examples: ['SecureAdmin123!'],\n }),\n },\n\n // ============================================================================\n // API Configuration\n // ============================================================================\n SPFN_API_URL: {\n ...envString({\n description: 'Base API URL for invitation links and other external-facing URLs',\n default: 'http://localhost:8790',\n required: false,\n examples: [\n 'https://api.example.com',\n 'http://localhost:8790',\n ],\n }),\n },\n\n // ============================================================================\n // AWS SNS Configuration (SMS)\n // ============================================================================\n SPFN_AUTH_AWS_REGION: {\n ...envString({\n description: 'AWS region for SNS service',\n default: 'ap-northeast-2',\n required: false,\n examples: ['ap-northeast-2', 'us-east-1', 'eu-west-1'],\n }),\n },\n\n SPFN_AUTH_AWS_SNS_ACCESS_KEY_ID: {\n ...envString({\n description: 'AWS SNS access key ID (optional, uses default credentials chain if not provided)',\n required: false,\n sensitive: true,\n examples: ['AKIAIOSFODNN7EXAMPLE'],\n }),\n },\n\n SPFN_AUTH_AWS_SNS_SECRET_ACCESS_KEY: {\n ...envString({\n description: 'AWS SNS secret access key (optional, uses default credentials chain if not provided)',\n required: false,\n sensitive: true,\n examples: ['wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'],\n }),\n },\n\n SPFN_AUTH_AWS_SNS_SENDER_ID: {\n ...envString({\n description: 'SMS sender ID displayed to recipients (max 11 characters, alphanumeric)',\n required: false,\n examples: ['MyApp', 'YourBrand'],\n }),\n },\n\n // ============================================================================\n // AWS SES Configuration (Email)\n // ============================================================================\n SPFN_AUTH_AWS_SES_ACCESS_KEY_ID: {\n ...envString({\n description: 'AWS SES access key ID (optional, uses default credentials chain if not provided)',\n required: false,\n sensitive: true,\n examples: ['AKIAIOSFODNN7EXAMPLE'],\n }),\n },\n\n SPFN_AUTH_AWS_SES_SECRET_ACCESS_KEY: {\n ...envString({\n description: 'AWS SES secret access key (optional, uses default credentials chain if not provided)',\n required: false,\n sensitive: true,\n examples: ['wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'],\n }),\n },\n\n SPFN_AUTH_AWS_SES_FROM_EMAIL: {\n ...envString({\n description: 'Sender email address (must be verified in AWS SES)',\n required: false,\n examples: ['noreply@example.com', 'auth@yourdomain.com'],\n }),\n },\n\n SPFN_AUTH_AWS_SES_FROM_NAME: {\n ...envString({\n description: 'Sender display name',\n required: false,\n examples: ['MyApp', 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C1B,GAAG,UAAU;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,MACV,UAAU,CAAC,uBAAuB,qBAAqB;AAAA,IAC3D,CAAC;AAAA,EACL;AAAA,EAEA,6BAA6B;AAAA,IACzB,GAAG,UAAU;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,MACV,UAAU,CAAC,SAAS,cAAc;AAAA,IACtC,CAAC;AAAA,EACL;AACJ,CAAC;;;AD9PD,IAAM,WAAW,kBAAkB,aAAa;AACzC,IAAM,MAAM,SAAS,SAAS;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/config/index.ts","../src/config/schema.ts"],"sourcesContent":["/**\n * Core Package Configuration\n *\n * @example\n * ```typescript\n * import { registry } from '@spfn/core/config';\n *\n * const env = registry.validate();\n * console.log(env.DB_POOL_MAX);\n * ```\n *\n * @module config\n */\n\nimport { createEnvRegistry } from '@spfn/core/env';\nimport { authEnvSchema } from './schema';\n\nexport { authEnvSchema as envSchema } from './schema';\n\n/**\n * Environment registry\n */\nconst registry = createEnvRegistry(authEnvSchema);\nexport const env = registry.validate();\n","/**\n * Auth Environment Variable Schema\n *\n * Centralized schema definition for all environment variables used in @spfn/auth.\n * This provides type safety, validation, and documentation for Auth configuration.\n *\n * @module config/schema\n */\n\nimport {\n defineEnvSchema,\n envString,\n envNumber,\n envBoolean,\n createSecureSecretParser,\n createPasswordParser,\n} from '@spfn/core/env';\n\n/**\n * Auth environment variable schema\n *\n * Defines all Auth environment variables with:\n * - Type information\n * - Default values\n * - Validation rules\n * - Documentation\n *\n * @example\n * ```typescript\n * import { envSchema } from '@spfn/auth/config';\n *\n * // Access schema information\n * console.log(envSchema.SPFN_AUTH_SESSION_SECRET.description);\n * console.log(envSchema.SPFN_AUTH_JWT_EXPIRES_IN.default);\n * ```\n */\nexport const authEnvSchema = defineEnvSchema({\n // ============================================================================\n // Session Configuration\n // ============================================================================\n SPFN_AUTH_SESSION_SECRET: {\n ...envString({\n description: 'Session encryption secret (minimum 32 characters for AES-256)',\n required: true,\n fallbackKeys: ['SESSION_SECRET'],\n validator: createSecureSecretParser({\n minLength: 32,\n minUniqueChars: 16,\n minEntropy: 3.5,\n }),\n sensitive: true,\n nextjs: true, // Required for Next.js RSC session validation\n examples: [\n 'my-super-secret-session-key-at-least-32-chars-long',\n 'use-a-cryptographically-secure-random-string-here',\n ],\n }),\n },\n\n SPFN_AUTH_SESSION_TTL: {\n ...envString({\n description: 'Session TTL (time to live) - supports duration strings like \\'7d\\', \\'12h\\', \\'45m\\'',\n default: '7d',\n required: false,\n nextjs: true, // May be needed for session validation in Next.js RSC\n examples: ['7d', '30d', '12h', '45m', '3600'],\n }),\n },\n\n // ============================================================================\n // JWT Configuration\n // ============================================================================\n SPFN_AUTH_JWT_SECRET: {\n ...envString({\n description: 'JWT signing secret for server-signed tokens (legacy mode)',\n default: 'dev-secret-key-change-in-production',\n required: false,\n examples: [\n 'your-jwt-secret-key-here',\n 'use-different-from-session-secret',\n ],\n }),\n },\n\n SPFN_AUTH_JWT_EXPIRES_IN: {\n ...envString({\n description: 'JWT token expiration time (e.g., \\'7d\\', \\'24h\\', \\'1h\\')',\n default: '7d',\n required: false,\n examples: ['7d', '24h', '1h', '30m'],\n }),\n },\n\n // ============================================================================\n // Security Configuration\n // ============================================================================\n SPFN_AUTH_COOKIE_SECURE: {\n ...envBoolean({\n description: 'Override cookie Secure flag. Defaults to NODE_ENV === \"production\". Set to false for HTTP-only environments (e.g. bastion over plain HTTP).',\n required: false,\n nextjs: true,\n examples: [true, false],\n }),\n },\n\n SPFN_AUTH_BCRYPT_SALT_ROUNDS: {\n ...envNumber({\n description: 'Bcrypt salt rounds (cost factor, higher = more secure but slower)',\n default: 12,\n required: false,\n examples: [10, 12, 14],\n }),\n key: 'SPFN_AUTH_BCRYPT_SALT_ROUNDS',\n },\n\n SPFN_AUTH_VERIFICATION_TOKEN_SECRET: {\n ...envString({\n description: 'Verification token secret for email verification, password reset, etc.',\n required: true,\n examples: [\n 'your-verification-token-secret',\n 'can-be-different-from-jwt-secret',\n ],\n }),\n },\n\n SPFN_AUTH_TOKEN_ENCRYPTION_KEYS: {\n ...envString({\n description: 'Backend-only OAuth token encryption keyring. Comma-separated <keyId>:<base64-encoded 32-byte key> entries; the first key encrypts new values and remaining keys decrypt during rotation.',\n required: false,\n sensitive: true,\n examples: [\n 'v2:<base64-encoded-32-byte-key>,v1:<previous-base64-encoded-32-byte-key>',\n ],\n }),\n },\n\n // ============================================================================\n // Admin Account Configuration\n // ============================================================================\n SPFN_AUTH_ADMIN_ACCOUNTS: {\n ...envString({\n description: 'JSON array of admin accounts (recommended for multiple admins)',\n required: false,\n examples: [\n '[{\"email\":\"admin@example.com\",\"password\":\"secure-pass\",\"role\":\"admin\"}]',\n '[{\"email\":\"super@example.com\",\"password\":\"pass1\",\"role\":\"superadmin\"},{\"email\":\"admin@example.com\",\"password\":\"pass2\",\"role\":\"admin\"}]',\n ],\n }),\n },\n\n SPFN_AUTH_ADMIN_EMAILS: {\n ...envString({\n description: 'Comma-separated list of admin emails (legacy CSV format)',\n required: false,\n examples: [\n 'admin@example.com,user@example.com',\n 'super@example.com,admin@example.com,user@example.com',\n ],\n }),\n },\n\n SPFN_AUTH_ADMIN_PASSWORDS: {\n ...envString({\n description: 'Comma-separated list of admin passwords (legacy CSV format)',\n required: false,\n examples: [\n 'admin-pass,user-pass',\n 'super-pass,admin-pass,user-pass',\n ],\n }),\n },\n\n SPFN_AUTH_ADMIN_ROLES: {\n ...envString({\n description: 'Comma-separated list of admin roles (legacy CSV format)',\n required: false,\n examples: [\n 'admin,user',\n 'superadmin,admin,user',\n ],\n }),\n },\n\n SPFN_AUTH_ADMIN_EMAIL: {\n ...envString({\n description: 'Single admin email (simplest format)',\n required: false,\n examples: ['admin@example.com'],\n }),\n },\n\n SPFN_AUTH_ADMIN_PASSWORD: {\n ...envString({\n description: 'Single admin password (simplest format)',\n required: false,\n validator: createPasswordParser({\n minLength: 8,\n requireUppercase: true,\n requireLowercase: true,\n requireNumber: true,\n requireSpecial: true,\n }),\n sensitive: true,\n examples: ['SecureAdmin123!'],\n }),\n },\n\n // ============================================================================\n // Username Configuration\n // ============================================================================\n SPFN_AUTH_RESERVED_USERNAMES: {\n ...envString({\n description: 'Comma-separated list of reserved usernames that cannot be registered',\n required: false,\n default: 'admin,root,system,support,help,moderator,superadmin',\n examples: [\n 'admin,root,system,support,help',\n 'admin,root,system,support,help,moderator,superadmin,operator',\n ],\n }),\n },\n\n SPFN_AUTH_USERNAME_MIN_LENGTH: {\n ...envNumber({\n description: 'Minimum username length',\n default: 3,\n required: false,\n examples: [2, 3, 4],\n }),\n },\n\n SPFN_AUTH_USERNAME_MAX_LENGTH: {\n ...envNumber({\n description: 'Maximum username length',\n default: 30,\n required: false,\n examples: [20, 30, 50],\n }),\n },\n\n // ============================================================================\n // API Configuration\n // ============================================================================\n SPFN_API_URL: {\n ...envString({\n description: 'Internal API URL for server-to-server communication',\n default: 'http://localhost:8790',\n required: false,\n examples: [\n 'https://api.example.com',\n 'http://localhost:8790',\n ],\n }),\n },\n\n NEXT_PUBLIC_SPFN_API_URL: {\n ...envString({\n description: 'Public-facing API URL used for browser-facing redirects. Falls back to SPFN_API_URL if not set.',\n required: false,\n examples: [\n 'https://api.example.com',\n 'http://localhost:8790',\n ],\n }),\n },\n\n SPFN_APP_URL: {\n ...envString({\n description: 'Next.js application URL (internal). Used for server-to-server communication.',\n default: 'http://localhost:3000',\n required: false,\n examples: [\n 'https://app.example.com',\n 'http://localhost:3000',\n ],\n }),\n },\n\n NEXT_PUBLIC_SPFN_APP_URL: {\n ...envString({\n description: 'Public-facing Next.js app URL for browser redirects (e.g. OAuth redirect). Falls back to SPFN_APP_URL if not set.',\n required: false,\n examples: [\n 'https://app.example.com',\n 'http://localhost:3000',\n ],\n }),\n },\n\n // ============================================================================\n // OAuth Configuration - Google\n // ============================================================================\n SPFN_AUTH_GOOGLE_CLIENT_ID: {\n ...envString({\n description: 'Google OAuth 2.0 Client ID. When set, Google OAuth routes are automatically enabled.',\n required: false,\n examples: ['123456789-abc123.apps.googleusercontent.com'],\n }),\n },\n\n SPFN_AUTH_GOOGLE_CLIENT_SECRET: {\n ...envString({\n description: 'Google OAuth 2.0 Client Secret',\n required: false,\n sensitive: true,\n examples: ['GOCSPX-abcdefghijklmnop'],\n }),\n },\n\n SPFN_AUTH_GOOGLE_SCOPES: {\n ...envString({\n description: 'Comma-separated Google OAuth scopes. Defaults to \"email,profile\" if not set.',\n required: false,\n examples: [\n 'email,profile',\n 'email,profile,https://www.googleapis.com/auth/gmail.readonly',\n 'email,profile,https://www.googleapis.com/auth/calendar.readonly',\n ],\n }),\n },\n\n SPFN_AUTH_GOOGLE_REDIRECT_URI: {\n ...envString({\n description: 'Google OAuth callback URL. Defaults to {NEXT_PUBLIC_SPFN_APP_URL || SPFN_APP_URL}/_auth/oauth/google/callback — the callback must return to the web app origin that set the oauth_csrf cookie (the app rewrites /_auth/:path* to the API). Set this explicitly only when the callback should hit a different host (e.g. the API host for the direct oauthStart flow).',\n required: false,\n examples: [\n 'https://app.example.com/_auth/oauth/google/callback',\n 'http://localhost:3000/_auth/oauth/google/callback',\n ],\n }),\n },\n\n // ============================================================================\n // OAuth Configuration - Kakao\n // ============================================================================\n SPFN_AUTH_KAKAO_CLIENT_ID: {\n ...envString({\n description: 'Kakao Login REST API key. Used as the OAuth client_id.',\n required: false,\n examples: ['your-kakao-rest-api-key'],\n }),\n },\n\n SPFN_AUTH_KAKAO_CLIENT_SECRET: {\n ...envString({\n description: 'Kakao Login client secret. Required when the Kakao client-secret feature is enabled.',\n required: false,\n sensitive: true,\n examples: ['your-kakao-client-secret'],\n }),\n },\n\n SPFN_AUTH_KAKAO_SCOPES: {\n ...envString({\n description: 'Comma-separated Kakao consent scopes. Defaults to account_email.',\n required: false,\n examples: ['account_email'],\n }),\n },\n\n SPFN_AUTH_KAKAO_REDIRECT_URI: {\n ...envString({\n description: 'Kakao OAuth callback URL. Defaults to {NEXT_PUBLIC_SPFN_APP_URL || SPFN_APP_URL}/_auth/oauth/kakao/callback.',\n required: false,\n examples: ['https://app.example.com/_auth/oauth/kakao/callback'],\n }),\n },\n\n // ============================================================================\n // OAuth Configuration - Naver\n // ============================================================================\n SPFN_AUTH_NAVER_CLIENT_ID: {\n ...envString({\n description: 'Naver Login OAuth client ID.',\n required: false,\n examples: ['your-naver-client-id'],\n }),\n },\n\n SPFN_AUTH_NAVER_CLIENT_SECRET: {\n ...envString({\n description: 'Naver Login OAuth client secret.',\n required: false,\n sensitive: true,\n examples: ['your-naver-client-secret'],\n }),\n },\n\n SPFN_AUTH_NAVER_REDIRECT_URI: {\n ...envString({\n description: 'Naver OAuth callback URL. Defaults to {NEXT_PUBLIC_SPFN_APP_URL || SPFN_APP_URL}/_auth/oauth/naver/callback.',\n required: false,\n examples: ['https://app.example.com/_auth/oauth/naver/callback'],\n }),\n },\n\n // ============================================================================\n // Native Social Login (mobile/web id_token verification)\n //\n // 네이티브 SDK가 받은 id_token을 서버가 JWKS로 검증하는 경로 전용 설정.\n // authorization code 교환을 하지 않으므로 client secret이 필요 없다.\n // audience(aud)로 허용할 client id 목록만 지정한다.\n // ============================================================================\n SPFN_AUTH_GOOGLE_NATIVE_CLIENT_IDS: {\n ...envString({\n description: 'Comma-separated Google client IDs accepted as id_token audience for native sign-in (iOS, Android, web). When set, Google native sign-in is enabled. SPFN_AUTH_GOOGLE_CLIENT_ID is also accepted automatically.',\n required: false,\n examples: [\n '123-ios.apps.googleusercontent.com,123-android.apps.googleusercontent.com',\n ],\n }),\n },\n\n SPFN_AUTH_APPLE_CLIENT_IDS: {\n ...envString({\n description: 'Comma-separated Apple client IDs accepted as id_token audience for native sign-in (iOS bundle ID, web/Android Services ID). When set, Apple native sign-in is enabled.',\n required: false,\n examples: [\n 'com.example.app,com.example.app.service',\n ],\n }),\n },\n\n SPFN_AUTH_OAUTH_SUCCESS_URL: {\n ...envString({\n description: 'OAuth callback page URL. This page should use OAuthCallback component to finalize session.',\n required: false,\n default: '/auth/callback',\n examples: [\n '/auth/callback',\n 'https://app.example.com/auth/callback',\n ],\n }),\n },\n\n SPFN_AUTH_OAUTH_ERROR_URL: {\n ...envString({\n description: 'URL to redirect after OAuth error. Use {error} placeholder for error message.',\n required: false,\n default: '/auth/error?error={error}',\n examples: [\n 'https://app.example.com/auth/error?error={error}',\n 'http://localhost:3000/auth/error?error={error}',\n ],\n }),\n },\n});\n"],"mappings":";AAcA,SAAS,yBAAyB;;;ACLlC;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AAoBA,IAAM,gBAAgB,gBAAgB;AAAA;AAAA;AAAA;AAAA,EAIzC,0BAA0B;AAAA,IACtB,GAAG,UAAU;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,MACV,cAAc,CAAC,gBAAgB;AAAA,MAC/B,WAAW,yBAAyB;AAAA,QAChC,WAAW;AAAA,QACX,gBAAgB;AAAA,QAChB,YAAY;AAAA,MAChB,CAAC;AAAA,MACD,WAAW;AAAA,MACX,QAAQ;AAAA;AAAA,MACR,UAAU;AAAA,QACN;AAAA,QACA;AAAA,MACJ;AAAA,IACJ,CAAC;AAAA,EACL;AAAA,EAEA,uBAAuB;AAAA,IACnB,GAAG,UAAU;AAAA,MACT,aAAa;AAAA,MACb,SAAS;AAAA,MACT,UAAU;AAAA,MACV,QAAQ;AAAA;AAAA,MACR,UAAU,CAAC,MAAM,OAAO,OAAO,OAAO,MAAM;AAAA,IAChD,CAAC;AAAA,EACL;AAAA;AAAA;AAAA;AAAA,EAKA,sBAAsB;AAAA,IAClB,GAAG,UAAU;AAAA,MACT,aAAa;AAAA,MACb,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,QACN;AAAA,QACA;AAAA,MACJ;AAAA,IACJ,CAAC;AAAA,EACL;AAAA,EAEA,0BAA0B;AAAA,IACtB,GAAG,UAAU;AAAA,MACT,aAAa;AAAA,MACb,SAAS;AAAA,MACT,UA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,4BAA4B;AAAA,IACxB,GAAG,UAAU;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,MACV,UAAU;AAAA,QACN;AAAA,MACJ;AAAA,IACJ,CAAC;AAAA,EACL;AAAA,EAEA,6BAA6B;AAAA,IACzB,GAAG,UAAU;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,MACV,SAAS;AAAA,MACT,UAAU;AAAA,QACN;AAAA,QACA;AAAA,MACJ;AAAA,IACJ,CAAC;AAAA,EACL;AAAA,EAEA,2BAA2B;AAAA,IACvB,GAAG,UAAU;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,MACV,SAAS;AAAA,MACT,UAAU;AAAA,QACN;AAAA,QACA;AAAA,MACJ;AAAA,IACJ,CAAC;AAAA,EACL;AACJ,CAAC;;;ADzaD,IAAM,WAAW,kBAAkB,aAAa;AACzC,IAAM,MAAM,SAAS,SAAS;","names":[]}
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UnauthorizedError, ForbiddenError, ConflictError, ValidationError, ErrorRegistry } from '@spfn/core/errors';
|
|
1
|
+
import { UnauthorizedError, ForbiddenError, ConflictError, NotFoundError, ValidationError, ErrorRegistry } from '@spfn/core/errors';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Authentication & Authorization Error Classes
|
|
@@ -28,6 +28,18 @@ declare class InvalidTokenError extends UnauthorizedError {
|
|
|
28
28
|
details?: Record<string, any>;
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Invalid Social Token Error (401)
|
|
33
|
+
*
|
|
34
|
+
* Thrown when a social provider id_token fails verification
|
|
35
|
+
* (bad signature, wrong issuer/audience, expired, or nonce mismatch).
|
|
36
|
+
*/
|
|
37
|
+
declare class InvalidSocialTokenError extends UnauthorizedError {
|
|
38
|
+
constructor(data?: {
|
|
39
|
+
message?: string;
|
|
40
|
+
details?: Record<string, any>;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
31
43
|
/**
|
|
32
44
|
* Token Expired Error (401)
|
|
33
45
|
*
|
|
@@ -62,6 +74,56 @@ declare class AccountDisabledError extends ForbiddenError {
|
|
|
62
74
|
details?: Record<string, any>;
|
|
63
75
|
});
|
|
64
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Account Pending Deletion Error (403)
|
|
79
|
+
*
|
|
80
|
+
* Thrown on login (password/OAuth/authenticate) when the account is within its
|
|
81
|
+
* deletion grace period. Carries `purgeScheduledAt` so the client can offer a
|
|
82
|
+
* recovery flow instead of a generic "disabled" message.
|
|
83
|
+
*/
|
|
84
|
+
declare class AccountPendingDeletionError extends ForbiddenError {
|
|
85
|
+
constructor(data?: {
|
|
86
|
+
purgeScheduledAt?: string;
|
|
87
|
+
message?: string;
|
|
88
|
+
details?: Record<string, any>;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Deletion Already Requested Error (409)
|
|
93
|
+
*
|
|
94
|
+
* Thrown when requesting deletion for an account that already has a pending
|
|
95
|
+
* deletion request (or has already been purged).
|
|
96
|
+
*/
|
|
97
|
+
declare class DeletionAlreadyRequestedError extends ConflictError {
|
|
98
|
+
constructor(data?: {
|
|
99
|
+
message?: string;
|
|
100
|
+
details?: Record<string, any>;
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Deletion Not Requested Error (404)
|
|
105
|
+
*
|
|
106
|
+
* Thrown when trying to cancel/purge a deletion for an account that has no
|
|
107
|
+
* pending deletion request.
|
|
108
|
+
*/
|
|
109
|
+
declare class DeletionNotRequestedError extends NotFoundError {
|
|
110
|
+
constructor(data?: {
|
|
111
|
+
message?: string;
|
|
112
|
+
details?: Record<string, any>;
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Immediate Deletion Not Allowed Error (403)
|
|
117
|
+
*
|
|
118
|
+
* Thrown when a self-service caller requests `immediate: true` but the server
|
|
119
|
+
* has not enabled `deletion.allowSelfImmediate`.
|
|
120
|
+
*/
|
|
121
|
+
declare class ImmediateDeletionNotAllowedError extends ForbiddenError {
|
|
122
|
+
constructor(data?: {
|
|
123
|
+
message?: string;
|
|
124
|
+
details?: Record<string, any>;
|
|
125
|
+
});
|
|
126
|
+
}
|
|
65
127
|
/**
|
|
66
128
|
* Account Already Exists Error (409)
|
|
67
129
|
*
|
|
@@ -75,6 +137,18 @@ declare class AccountAlreadyExistsError extends ConflictError {
|
|
|
75
137
|
details?: Record<string, any>;
|
|
76
138
|
});
|
|
77
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Registration Rejected Error (403)
|
|
142
|
+
*
|
|
143
|
+
* Thrown by the app-injected beforeRegister hook to reject a registration
|
|
144
|
+
* (age gate, domain restriction, block list, ...)
|
|
145
|
+
*/
|
|
146
|
+
declare class RegistrationRejectedError extends ForbiddenError {
|
|
147
|
+
constructor(data?: {
|
|
148
|
+
message?: string;
|
|
149
|
+
details?: Record<string, any>;
|
|
150
|
+
});
|
|
151
|
+
}
|
|
78
152
|
/**
|
|
79
153
|
* Invalid Verification Code Error (400)
|
|
80
154
|
*
|
|
@@ -132,6 +206,30 @@ declare class VerificationTokenTargetMismatchError extends ValidationError {
|
|
|
132
206
|
details?: Record<string, any>;
|
|
133
207
|
});
|
|
134
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Reserved Username Error (400)
|
|
211
|
+
*
|
|
212
|
+
* Thrown when trying to use a reserved/prohibited username
|
|
213
|
+
*/
|
|
214
|
+
declare class ReservedUsernameError extends ValidationError {
|
|
215
|
+
constructor(data?: {
|
|
216
|
+
username?: string;
|
|
217
|
+
message?: string;
|
|
218
|
+
details?: Record<string, any>;
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Username Already Taken Error (409)
|
|
223
|
+
*
|
|
224
|
+
* Thrown when trying to set a username that is already in use
|
|
225
|
+
*/
|
|
226
|
+
declare class UsernameAlreadyTakenError extends ConflictError {
|
|
227
|
+
constructor(data?: {
|
|
228
|
+
username?: string;
|
|
229
|
+
message?: string;
|
|
230
|
+
details?: Record<string, any>;
|
|
231
|
+
});
|
|
232
|
+
}
|
|
135
233
|
/**
|
|
136
234
|
* Insufficient Permissions Error (403)
|
|
137
235
|
*
|
|
@@ -161,6 +259,14 @@ type authErrors_AccountAlreadyExistsError = AccountAlreadyExistsError;
|
|
|
161
259
|
declare const authErrors_AccountAlreadyExistsError: typeof AccountAlreadyExistsError;
|
|
162
260
|
type authErrors_AccountDisabledError = AccountDisabledError;
|
|
163
261
|
declare const authErrors_AccountDisabledError: typeof AccountDisabledError;
|
|
262
|
+
type authErrors_AccountPendingDeletionError = AccountPendingDeletionError;
|
|
263
|
+
declare const authErrors_AccountPendingDeletionError: typeof AccountPendingDeletionError;
|
|
264
|
+
type authErrors_DeletionAlreadyRequestedError = DeletionAlreadyRequestedError;
|
|
265
|
+
declare const authErrors_DeletionAlreadyRequestedError: typeof DeletionAlreadyRequestedError;
|
|
266
|
+
type authErrors_DeletionNotRequestedError = DeletionNotRequestedError;
|
|
267
|
+
declare const authErrors_DeletionNotRequestedError: typeof DeletionNotRequestedError;
|
|
268
|
+
type authErrors_ImmediateDeletionNotAllowedError = ImmediateDeletionNotAllowedError;
|
|
269
|
+
declare const authErrors_ImmediateDeletionNotAllowedError: typeof ImmediateDeletionNotAllowedError;
|
|
164
270
|
type authErrors_InsufficientPermissionsError = InsufficientPermissionsError;
|
|
165
271
|
declare const authErrors_InsufficientPermissionsError: typeof InsufficientPermissionsError;
|
|
166
272
|
type authErrors_InsufficientRoleError = InsufficientRoleError;
|
|
@@ -169,6 +275,8 @@ type authErrors_InvalidCredentialsError = InvalidCredentialsError;
|
|
|
169
275
|
declare const authErrors_InvalidCredentialsError: typeof InvalidCredentialsError;
|
|
170
276
|
type authErrors_InvalidKeyFingerprintError = InvalidKeyFingerprintError;
|
|
171
277
|
declare const authErrors_InvalidKeyFingerprintError: typeof InvalidKeyFingerprintError;
|
|
278
|
+
type authErrors_InvalidSocialTokenError = InvalidSocialTokenError;
|
|
279
|
+
declare const authErrors_InvalidSocialTokenError: typeof InvalidSocialTokenError;
|
|
172
280
|
type authErrors_InvalidTokenError = InvalidTokenError;
|
|
173
281
|
declare const authErrors_InvalidTokenError: typeof InvalidTokenError;
|
|
174
282
|
type authErrors_InvalidVerificationCodeError = InvalidVerificationCodeError;
|
|
@@ -177,14 +285,20 @@ type authErrors_InvalidVerificationTokenError = InvalidVerificationTokenError;
|
|
|
177
285
|
declare const authErrors_InvalidVerificationTokenError: typeof InvalidVerificationTokenError;
|
|
178
286
|
type authErrors_KeyExpiredError = KeyExpiredError;
|
|
179
287
|
declare const authErrors_KeyExpiredError: typeof KeyExpiredError;
|
|
288
|
+
type authErrors_RegistrationRejectedError = RegistrationRejectedError;
|
|
289
|
+
declare const authErrors_RegistrationRejectedError: typeof RegistrationRejectedError;
|
|
290
|
+
type authErrors_ReservedUsernameError = ReservedUsernameError;
|
|
291
|
+
declare const authErrors_ReservedUsernameError: typeof ReservedUsernameError;
|
|
180
292
|
type authErrors_TokenExpiredError = TokenExpiredError;
|
|
181
293
|
declare const authErrors_TokenExpiredError: typeof TokenExpiredError;
|
|
294
|
+
type authErrors_UsernameAlreadyTakenError = UsernameAlreadyTakenError;
|
|
295
|
+
declare const authErrors_UsernameAlreadyTakenError: typeof UsernameAlreadyTakenError;
|
|
182
296
|
type authErrors_VerificationTokenPurposeMismatchError = VerificationTokenPurposeMismatchError;
|
|
183
297
|
declare const authErrors_VerificationTokenPurposeMismatchError: typeof VerificationTokenPurposeMismatchError;
|
|
184
298
|
type authErrors_VerificationTokenTargetMismatchError = VerificationTokenTargetMismatchError;
|
|
185
299
|
declare const authErrors_VerificationTokenTargetMismatchError: typeof VerificationTokenTargetMismatchError;
|
|
186
300
|
declare namespace authErrors {
|
|
187
|
-
export { authErrors_AccountAlreadyExistsError as AccountAlreadyExistsError, authErrors_AccountDisabledError as AccountDisabledError, authErrors_InsufficientPermissionsError as InsufficientPermissionsError, authErrors_InsufficientRoleError as InsufficientRoleError, authErrors_InvalidCredentialsError as InvalidCredentialsError, authErrors_InvalidKeyFingerprintError as InvalidKeyFingerprintError, authErrors_InvalidTokenError as InvalidTokenError, authErrors_InvalidVerificationCodeError as InvalidVerificationCodeError, authErrors_InvalidVerificationTokenError as InvalidVerificationTokenError, authErrors_KeyExpiredError as KeyExpiredError, authErrors_TokenExpiredError as TokenExpiredError, authErrors_VerificationTokenPurposeMismatchError as VerificationTokenPurposeMismatchError, authErrors_VerificationTokenTargetMismatchError as VerificationTokenTargetMismatchError };
|
|
301
|
+
export { authErrors_AccountAlreadyExistsError as AccountAlreadyExistsError, authErrors_AccountDisabledError as AccountDisabledError, authErrors_AccountPendingDeletionError as AccountPendingDeletionError, authErrors_DeletionAlreadyRequestedError as DeletionAlreadyRequestedError, authErrors_DeletionNotRequestedError as DeletionNotRequestedError, authErrors_ImmediateDeletionNotAllowedError as ImmediateDeletionNotAllowedError, authErrors_InsufficientPermissionsError as InsufficientPermissionsError, authErrors_InsufficientRoleError as InsufficientRoleError, authErrors_InvalidCredentialsError as InvalidCredentialsError, authErrors_InvalidKeyFingerprintError as InvalidKeyFingerprintError, authErrors_InvalidSocialTokenError as InvalidSocialTokenError, authErrors_InvalidTokenError as InvalidTokenError, authErrors_InvalidVerificationCodeError as InvalidVerificationCodeError, authErrors_InvalidVerificationTokenError as InvalidVerificationTokenError, authErrors_KeyExpiredError as KeyExpiredError, authErrors_RegistrationRejectedError as RegistrationRejectedError, authErrors_ReservedUsernameError as ReservedUsernameError, authErrors_TokenExpiredError as TokenExpiredError, authErrors_UsernameAlreadyTakenError as UsernameAlreadyTakenError, authErrors_VerificationTokenPurposeMismatchError as VerificationTokenPurposeMismatchError, authErrors_VerificationTokenTargetMismatchError as VerificationTokenTargetMismatchError };
|
|
188
302
|
}
|
|
189
303
|
|
|
190
304
|
/**
|
|
@@ -193,4 +307,4 @@ declare namespace authErrors {
|
|
|
193
307
|
|
|
194
308
|
declare const authErrorRegistry: ErrorRegistry;
|
|
195
309
|
|
|
196
|
-
export { AccountAlreadyExistsError, AccountDisabledError, authErrors as AuthError, InsufficientPermissionsError, InsufficientRoleError, InvalidCredentialsError, InvalidKeyFingerprintError, InvalidTokenError, InvalidVerificationCodeError, InvalidVerificationTokenError, KeyExpiredError, TokenExpiredError, VerificationTokenPurposeMismatchError, VerificationTokenTargetMismatchError, authErrorRegistry };
|
|
310
|
+
export { AccountAlreadyExistsError, AccountDisabledError, AccountPendingDeletionError, authErrors as AuthError, DeletionAlreadyRequestedError, DeletionNotRequestedError, ImmediateDeletionNotAllowedError, InsufficientPermissionsError, InsufficientRoleError, InvalidCredentialsError, InvalidKeyFingerprintError, InvalidSocialTokenError, InvalidTokenError, InvalidVerificationCodeError, InvalidVerificationTokenError, KeyExpiredError, RegistrationRejectedError, ReservedUsernameError, TokenExpiredError, UsernameAlreadyTakenError, VerificationTokenPurposeMismatchError, VerificationTokenTargetMismatchError, authErrorRegistry };
|