@spfn/auth 0.2.0-beta.21 → 0.2.0-beta.23
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/dist/config.d.ts +42 -4
- package/package.json +4 -4
package/dist/config.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ declare const authEnvSchema: {
|
|
|
31
31
|
description: string;
|
|
32
32
|
required: boolean;
|
|
33
33
|
fallbackKeys: string[];
|
|
34
|
-
validator: _spfn_core_env.Parser<string
|
|
34
|
+
validator: _spfn_core_env.Parser<string> & ((value: string) => string);
|
|
35
35
|
sensitive: boolean;
|
|
36
36
|
nextjs: boolean;
|
|
37
37
|
examples: string[];
|
|
@@ -46,6 +46,7 @@ declare const authEnvSchema: {
|
|
|
46
46
|
nextjs: boolean;
|
|
47
47
|
examples: string[];
|
|
48
48
|
type: "string";
|
|
49
|
+
validator: (value: string) => string;
|
|
49
50
|
} & {
|
|
50
51
|
key: "SPFN_AUTH_SESSION_TTL";
|
|
51
52
|
};
|
|
@@ -55,6 +56,7 @@ declare const authEnvSchema: {
|
|
|
55
56
|
required: boolean;
|
|
56
57
|
examples: string[];
|
|
57
58
|
type: "string";
|
|
59
|
+
validator: (value: string) => string;
|
|
58
60
|
} & {
|
|
59
61
|
key: "SPFN_AUTH_JWT_SECRET";
|
|
60
62
|
};
|
|
@@ -64,6 +66,7 @@ declare const authEnvSchema: {
|
|
|
64
66
|
required: boolean;
|
|
65
67
|
examples: string[];
|
|
66
68
|
type: "string";
|
|
69
|
+
validator: (value: string) => string;
|
|
67
70
|
} & {
|
|
68
71
|
key: "SPFN_AUTH_JWT_EXPIRES_IN";
|
|
69
72
|
};
|
|
@@ -83,6 +86,7 @@ declare const authEnvSchema: {
|
|
|
83
86
|
required: boolean;
|
|
84
87
|
examples: string[];
|
|
85
88
|
type: "string";
|
|
89
|
+
validator: (value: string) => string;
|
|
86
90
|
} & {
|
|
87
91
|
key: "SPFN_AUTH_VERIFICATION_TOKEN_SECRET";
|
|
88
92
|
};
|
|
@@ -91,6 +95,7 @@ declare const authEnvSchema: {
|
|
|
91
95
|
required: boolean;
|
|
92
96
|
examples: string[];
|
|
93
97
|
type: "string";
|
|
98
|
+
validator: (value: string) => string;
|
|
94
99
|
} & {
|
|
95
100
|
key: "SPFN_AUTH_ADMIN_ACCOUNTS";
|
|
96
101
|
};
|
|
@@ -99,6 +104,7 @@ declare const authEnvSchema: {
|
|
|
99
104
|
required: boolean;
|
|
100
105
|
examples: string[];
|
|
101
106
|
type: "string";
|
|
107
|
+
validator: (value: string) => string;
|
|
102
108
|
} & {
|
|
103
109
|
key: "SPFN_AUTH_ADMIN_EMAILS";
|
|
104
110
|
};
|
|
@@ -107,6 +113,7 @@ declare const authEnvSchema: {
|
|
|
107
113
|
required: boolean;
|
|
108
114
|
examples: string[];
|
|
109
115
|
type: "string";
|
|
116
|
+
validator: (value: string) => string;
|
|
110
117
|
} & {
|
|
111
118
|
key: "SPFN_AUTH_ADMIN_PASSWORDS";
|
|
112
119
|
};
|
|
@@ -115,6 +122,7 @@ declare const authEnvSchema: {
|
|
|
115
122
|
required: boolean;
|
|
116
123
|
examples: string[];
|
|
117
124
|
type: "string";
|
|
125
|
+
validator: (value: string) => string;
|
|
118
126
|
} & {
|
|
119
127
|
key: "SPFN_AUTH_ADMIN_ROLES";
|
|
120
128
|
};
|
|
@@ -123,13 +131,14 @@ declare const authEnvSchema: {
|
|
|
123
131
|
required: boolean;
|
|
124
132
|
examples: string[];
|
|
125
133
|
type: "string";
|
|
134
|
+
validator: (value: string) => string;
|
|
126
135
|
} & {
|
|
127
136
|
key: "SPFN_AUTH_ADMIN_EMAIL";
|
|
128
137
|
};
|
|
129
138
|
SPFN_AUTH_ADMIN_PASSWORD: {
|
|
130
139
|
description: string;
|
|
131
140
|
required: boolean;
|
|
132
|
-
validator: _spfn_core_env.Parser<string
|
|
141
|
+
validator: _spfn_core_env.Parser<string> & ((value: string) => string);
|
|
133
142
|
sensitive: boolean;
|
|
134
143
|
examples: string[];
|
|
135
144
|
type: "string";
|
|
@@ -142,6 +151,7 @@ declare const authEnvSchema: {
|
|
|
142
151
|
required: boolean;
|
|
143
152
|
examples: string[];
|
|
144
153
|
type: "string";
|
|
154
|
+
validator: (value: string) => string;
|
|
145
155
|
} & {
|
|
146
156
|
key: "SPFN_API_URL";
|
|
147
157
|
};
|
|
@@ -150,6 +160,7 @@ declare const authEnvSchema: {
|
|
|
150
160
|
required: boolean;
|
|
151
161
|
examples: string[];
|
|
152
162
|
type: "string";
|
|
163
|
+
validator: (value: string) => string;
|
|
153
164
|
} & {
|
|
154
165
|
key: "NEXT_PUBLIC_SPFN_API_URL";
|
|
155
166
|
};
|
|
@@ -159,6 +170,7 @@ declare const authEnvSchema: {
|
|
|
159
170
|
required: boolean;
|
|
160
171
|
examples: string[];
|
|
161
172
|
type: "string";
|
|
173
|
+
validator: (value: string) => string;
|
|
162
174
|
} & {
|
|
163
175
|
key: "SPFN_APP_URL";
|
|
164
176
|
};
|
|
@@ -167,6 +179,7 @@ declare const authEnvSchema: {
|
|
|
167
179
|
required: boolean;
|
|
168
180
|
examples: string[];
|
|
169
181
|
type: "string";
|
|
182
|
+
validator: (value: string) => string;
|
|
170
183
|
} & {
|
|
171
184
|
key: "NEXT_PUBLIC_SPFN_APP_URL";
|
|
172
185
|
};
|
|
@@ -175,6 +188,7 @@ declare const authEnvSchema: {
|
|
|
175
188
|
required: boolean;
|
|
176
189
|
examples: string[];
|
|
177
190
|
type: "string";
|
|
191
|
+
validator: (value: string) => string;
|
|
178
192
|
} & {
|
|
179
193
|
key: "SPFN_AUTH_GOOGLE_CLIENT_ID";
|
|
180
194
|
};
|
|
@@ -184,6 +198,7 @@ declare const authEnvSchema: {
|
|
|
184
198
|
sensitive: boolean;
|
|
185
199
|
examples: string[];
|
|
186
200
|
type: "string";
|
|
201
|
+
validator: (value: string) => string;
|
|
187
202
|
} & {
|
|
188
203
|
key: "SPFN_AUTH_GOOGLE_CLIENT_SECRET";
|
|
189
204
|
};
|
|
@@ -192,6 +207,7 @@ declare const authEnvSchema: {
|
|
|
192
207
|
required: boolean;
|
|
193
208
|
examples: string[];
|
|
194
209
|
type: "string";
|
|
210
|
+
validator: (value: string) => string;
|
|
195
211
|
} & {
|
|
196
212
|
key: "SPFN_AUTH_GOOGLE_SCOPES";
|
|
197
213
|
};
|
|
@@ -200,6 +216,7 @@ declare const authEnvSchema: {
|
|
|
200
216
|
required: boolean;
|
|
201
217
|
examples: string[];
|
|
202
218
|
type: "string";
|
|
219
|
+
validator: (value: string) => string;
|
|
203
220
|
} & {
|
|
204
221
|
key: "SPFN_AUTH_GOOGLE_REDIRECT_URI";
|
|
205
222
|
};
|
|
@@ -209,6 +226,7 @@ declare const authEnvSchema: {
|
|
|
209
226
|
default: string;
|
|
210
227
|
examples: string[];
|
|
211
228
|
type: "string";
|
|
229
|
+
validator: (value: string) => string;
|
|
212
230
|
} & {
|
|
213
231
|
key: "SPFN_AUTH_OAUTH_SUCCESS_URL";
|
|
214
232
|
};
|
|
@@ -218,6 +236,7 @@ declare const authEnvSchema: {
|
|
|
218
236
|
default: string;
|
|
219
237
|
examples: string[];
|
|
220
238
|
type: "string";
|
|
239
|
+
validator: (value: string) => string;
|
|
221
240
|
} & {
|
|
222
241
|
key: "SPFN_AUTH_OAUTH_ERROR_URL";
|
|
223
242
|
};
|
|
@@ -228,7 +247,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
228
247
|
description: string;
|
|
229
248
|
required: boolean;
|
|
230
249
|
fallbackKeys: string[];
|
|
231
|
-
validator: _spfn_core_env.Parser<string
|
|
250
|
+
validator: _spfn_core_env.Parser<string> & ((value: string) => string);
|
|
232
251
|
sensitive: boolean;
|
|
233
252
|
nextjs: boolean;
|
|
234
253
|
examples: string[];
|
|
@@ -243,6 +262,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
243
262
|
nextjs: boolean;
|
|
244
263
|
examples: string[];
|
|
245
264
|
type: "string";
|
|
265
|
+
validator: (value: string) => string;
|
|
246
266
|
} & {
|
|
247
267
|
key: "SPFN_AUTH_SESSION_TTL";
|
|
248
268
|
};
|
|
@@ -252,6 +272,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
252
272
|
required: boolean;
|
|
253
273
|
examples: string[];
|
|
254
274
|
type: "string";
|
|
275
|
+
validator: (value: string) => string;
|
|
255
276
|
} & {
|
|
256
277
|
key: "SPFN_AUTH_JWT_SECRET";
|
|
257
278
|
};
|
|
@@ -261,6 +282,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
261
282
|
required: boolean;
|
|
262
283
|
examples: string[];
|
|
263
284
|
type: "string";
|
|
285
|
+
validator: (value: string) => string;
|
|
264
286
|
} & {
|
|
265
287
|
key: "SPFN_AUTH_JWT_EXPIRES_IN";
|
|
266
288
|
};
|
|
@@ -280,6 +302,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
280
302
|
required: boolean;
|
|
281
303
|
examples: string[];
|
|
282
304
|
type: "string";
|
|
305
|
+
validator: (value: string) => string;
|
|
283
306
|
} & {
|
|
284
307
|
key: "SPFN_AUTH_VERIFICATION_TOKEN_SECRET";
|
|
285
308
|
};
|
|
@@ -288,6 +311,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
288
311
|
required: boolean;
|
|
289
312
|
examples: string[];
|
|
290
313
|
type: "string";
|
|
314
|
+
validator: (value: string) => string;
|
|
291
315
|
} & {
|
|
292
316
|
key: "SPFN_AUTH_ADMIN_ACCOUNTS";
|
|
293
317
|
};
|
|
@@ -296,6 +320,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
296
320
|
required: boolean;
|
|
297
321
|
examples: string[];
|
|
298
322
|
type: "string";
|
|
323
|
+
validator: (value: string) => string;
|
|
299
324
|
} & {
|
|
300
325
|
key: "SPFN_AUTH_ADMIN_EMAILS";
|
|
301
326
|
};
|
|
@@ -304,6 +329,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
304
329
|
required: boolean;
|
|
305
330
|
examples: string[];
|
|
306
331
|
type: "string";
|
|
332
|
+
validator: (value: string) => string;
|
|
307
333
|
} & {
|
|
308
334
|
key: "SPFN_AUTH_ADMIN_PASSWORDS";
|
|
309
335
|
};
|
|
@@ -312,6 +338,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
312
338
|
required: boolean;
|
|
313
339
|
examples: string[];
|
|
314
340
|
type: "string";
|
|
341
|
+
validator: (value: string) => string;
|
|
315
342
|
} & {
|
|
316
343
|
key: "SPFN_AUTH_ADMIN_ROLES";
|
|
317
344
|
};
|
|
@@ -320,13 +347,14 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
320
347
|
required: boolean;
|
|
321
348
|
examples: string[];
|
|
322
349
|
type: "string";
|
|
350
|
+
validator: (value: string) => string;
|
|
323
351
|
} & {
|
|
324
352
|
key: "SPFN_AUTH_ADMIN_EMAIL";
|
|
325
353
|
};
|
|
326
354
|
SPFN_AUTH_ADMIN_PASSWORD: {
|
|
327
355
|
description: string;
|
|
328
356
|
required: boolean;
|
|
329
|
-
validator: _spfn_core_env.Parser<string
|
|
357
|
+
validator: _spfn_core_env.Parser<string> & ((value: string) => string);
|
|
330
358
|
sensitive: boolean;
|
|
331
359
|
examples: string[];
|
|
332
360
|
type: "string";
|
|
@@ -339,6 +367,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
339
367
|
required: boolean;
|
|
340
368
|
examples: string[];
|
|
341
369
|
type: "string";
|
|
370
|
+
validator: (value: string) => string;
|
|
342
371
|
} & {
|
|
343
372
|
key: "SPFN_API_URL";
|
|
344
373
|
};
|
|
@@ -347,6 +376,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
347
376
|
required: boolean;
|
|
348
377
|
examples: string[];
|
|
349
378
|
type: "string";
|
|
379
|
+
validator: (value: string) => string;
|
|
350
380
|
} & {
|
|
351
381
|
key: "NEXT_PUBLIC_SPFN_API_URL";
|
|
352
382
|
};
|
|
@@ -356,6 +386,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
356
386
|
required: boolean;
|
|
357
387
|
examples: string[];
|
|
358
388
|
type: "string";
|
|
389
|
+
validator: (value: string) => string;
|
|
359
390
|
} & {
|
|
360
391
|
key: "SPFN_APP_URL";
|
|
361
392
|
};
|
|
@@ -364,6 +395,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
364
395
|
required: boolean;
|
|
365
396
|
examples: string[];
|
|
366
397
|
type: "string";
|
|
398
|
+
validator: (value: string) => string;
|
|
367
399
|
} & {
|
|
368
400
|
key: "NEXT_PUBLIC_SPFN_APP_URL";
|
|
369
401
|
};
|
|
@@ -372,6 +404,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
372
404
|
required: boolean;
|
|
373
405
|
examples: string[];
|
|
374
406
|
type: "string";
|
|
407
|
+
validator: (value: string) => string;
|
|
375
408
|
} & {
|
|
376
409
|
key: "SPFN_AUTH_GOOGLE_CLIENT_ID";
|
|
377
410
|
};
|
|
@@ -381,6 +414,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
381
414
|
sensitive: boolean;
|
|
382
415
|
examples: string[];
|
|
383
416
|
type: "string";
|
|
417
|
+
validator: (value: string) => string;
|
|
384
418
|
} & {
|
|
385
419
|
key: "SPFN_AUTH_GOOGLE_CLIENT_SECRET";
|
|
386
420
|
};
|
|
@@ -389,6 +423,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
389
423
|
required: boolean;
|
|
390
424
|
examples: string[];
|
|
391
425
|
type: "string";
|
|
426
|
+
validator: (value: string) => string;
|
|
392
427
|
} & {
|
|
393
428
|
key: "SPFN_AUTH_GOOGLE_SCOPES";
|
|
394
429
|
};
|
|
@@ -397,6 +432,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
397
432
|
required: boolean;
|
|
398
433
|
examples: string[];
|
|
399
434
|
type: "string";
|
|
435
|
+
validator: (value: string) => string;
|
|
400
436
|
} & {
|
|
401
437
|
key: "SPFN_AUTH_GOOGLE_REDIRECT_URI";
|
|
402
438
|
};
|
|
@@ -406,6 +442,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
406
442
|
default: string;
|
|
407
443
|
examples: string[];
|
|
408
444
|
type: "string";
|
|
445
|
+
validator: (value: string) => string;
|
|
409
446
|
} & {
|
|
410
447
|
key: "SPFN_AUTH_OAUTH_SUCCESS_URL";
|
|
411
448
|
};
|
|
@@ -415,6 +452,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
415
452
|
default: string;
|
|
416
453
|
examples: string[];
|
|
417
454
|
type: "string";
|
|
455
|
+
validator: (value: string) => string;
|
|
418
456
|
} & {
|
|
419
457
|
key: "SPFN_AUTH_OAUTH_ERROR_URL";
|
|
420
458
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spfn/auth",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Authentication, authorization, and RBAC module for SPFN",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"jose": "^6.1.0",
|
|
86
86
|
"jsonwebtoken": "^9.0.2",
|
|
87
87
|
"postgres": "^3.4.0",
|
|
88
|
-
"@spfn/core": "0.2.0-beta.
|
|
89
|
-
"@spfn/notification": "0.1.0-beta.
|
|
88
|
+
"@spfn/core": "0.2.0-beta.21",
|
|
89
|
+
"@spfn/notification": "0.1.0-beta.9"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@types/bcryptjs": "^2.4.6",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"tsx": "^4.20.6",
|
|
104
104
|
"typescript": "^5.3.3",
|
|
105
105
|
"vitest": "^4.0.6",
|
|
106
|
-
"spfn": "0.2.0-beta.
|
|
106
|
+
"spfn": "0.2.0-beta.20"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
109
|
"next": "^15.0.0 || ^16.0.0"
|