@sqrzro/auth 2.0.0-bz.3 → 2.0.0-bz.4

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.
@@ -0,0 +1,640 @@
1
+
2
+ > @sqrzro/auth@2.0.0-bz.3 dev /Users/richard/Sites/@sqrzro/sqrzro/packages/auth
3
+ > tsc -p tsconfig.json --watch
4
+
5
+ c[8:24:00 AM] Starting compilation in watch mode...
6
+
7
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
8
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
9
+
10
+ 90 return handlePasswordResetForm(formData);
11
+    ~~~~~~~~
12
+
13
+ ../server/dist/auth/index.d.ts:18:5
14
+ 18 old: string;
15
+    ~~~
16
+ 'old' is declared here.
17
+
18
+ [8:24:02 AM] Found 1 error. Watching for file changes.
19
+
20
+ c[8:24:05 AM] File change detected. Starting incremental compilation...
21
+
22
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
23
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
24
+
25
+ 90 return handlePasswordResetForm(formData);
26
+    ~~~~~~~~
27
+
28
+ ../server/dist/auth/index.d.ts:18:5
29
+ 18 old: string;
30
+    ~~~
31
+ 'old' is declared here.
32
+
33
+ [8:24:05 AM] Found 1 error. Watching for file changes.
34
+
35
+ c[8:24:09 AM] File change detected. Starting incremental compilation...
36
+
37
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
38
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
39
+
40
+ 90 return handlePasswordResetForm(formData);
41
+    ~~~~~~~~
42
+
43
+ ../server/dist/auth/index.d.ts:18:5
44
+ 18 old: string;
45
+    ~~~
46
+ 'old' is declared here.
47
+
48
+ [8:24:09 AM] Found 1 error. Watching for file changes.
49
+
50
+ c[8:25:15 AM] File change detected. Starting incremental compilation...
51
+
52
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
53
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
54
+
55
+ 90 return handlePasswordResetForm(formData);
56
+    ~~~~~~~~
57
+
58
+ ../server/dist/auth/index.d.ts:18:5
59
+ 18 old: string;
60
+    ~~~
61
+ 'old' is declared here.
62
+
63
+ [8:25:15 AM] Found 1 error. Watching for file changes.
64
+
65
+ c[8:25:16 AM] File change detected. Starting incremental compilation...
66
+
67
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
68
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
69
+
70
+ 90 return handlePasswordResetForm(formData);
71
+    ~~~~~~~~
72
+
73
+ ../server/dist/auth/index.d.ts:18:5
74
+ 18 old: string;
75
+    ~~~
76
+ 'old' is declared here.
77
+
78
+ [8:25:16 AM] Found 1 error. Watching for file changes.
79
+
80
+ c[8:26:29 AM] File change detected. Starting incremental compilation...
81
+
82
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
83
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
84
+
85
+ 90 return handlePasswordResetForm(formData);
86
+    ~~~~~~~~
87
+
88
+ ../server/dist/auth/index.d.ts:18:5
89
+ 18 old: string;
90
+    ~~~
91
+ 'old' is declared here.
92
+
93
+ [8:26:29 AM] Found 1 error. Watching for file changes.
94
+
95
+ c[8:26:31 AM] File change detected. Starting incremental compilation...
96
+
97
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
98
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
99
+
100
+ 90 return handlePasswordResetForm(formData);
101
+    ~~~~~~~~
102
+
103
+ ../server/dist/auth/index.d.ts:18:5
104
+ 18 old: string;
105
+    ~~~
106
+ 'old' is declared here.
107
+
108
+ [8:26:31 AM] Found 1 error. Watching for file changes.
109
+
110
+ c[8:59:42 AM] File change detected. Starting incremental compilation...
111
+
112
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
113
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
114
+
115
+ 90 return handlePasswordResetForm(formData);
116
+    ~~~~~~~~
117
+
118
+ ../server/dist/auth/index.d.ts:18:5
119
+ 18 old: string;
120
+    ~~~
121
+ 'old' is declared here.
122
+
123
+ [8:59:42 AM] Found 1 error. Watching for file changes.
124
+
125
+ c[9:01:14 AM] File change detected. Starting incremental compilation...
126
+
127
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
128
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
129
+
130
+ 90 return handlePasswordResetForm(formData);
131
+    ~~~~~~~~
132
+
133
+ ../server/dist/auth/index.d.ts:18:5
134
+ 18 old: string;
135
+    ~~~
136
+ 'old' is declared here.
137
+
138
+ [9:01:14 AM] Found 1 error. Watching for file changes.
139
+
140
+ c[9:03:32 AM] File change detected. Starting incremental compilation...
141
+
142
+ src/components/PasswordPage/index.tsx:3:31 - error TS2307: Cannot find module '../PasswordResetForm' or its corresponding type declarations.
143
+
144
+ 3 import PasswordResetForm from '../PasswordResetForm';
145
+    ~~~~~~~~~~~~~~~~~~~~~~
146
+
147
+ src/components/TokenPasswordResetForm/index.tsx:6:15 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'TokenPasswordResetFormFields'.
148
+
149
+ 6 import type { TokenPasswordResetFormFields } from '@sqrzro/server/auth';
150
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
151
+
152
+ src/components/TokenPasswordResetForm/index.tsx:31:19 - error TS2552: Cannot find name 'submitTokenPasswordResetForm'. Did you mean 'submitPasswordResetForm'?
153
+
154
+ 31 onSubmit: submitTokenPasswordResetForm,
155
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156
+
157
+ src/components/TokenPasswordResetForm/index.tsx:51:16 - error TS2552: Cannot find name 'PasswordResetForm'. Did you mean 'TokenPasswordResetForm'?
158
+
159
+ 51 export default PasswordResetForm;
160
+    ~~~~~~~~~~~~~~~~~
161
+
162
+ src/components/TokenPasswordResetForm/index.tsx:22:10
163
+ 22 function TokenPasswordResetForm({
164
+    ~~~~~~~~~~~~~~~~~~~~~~
165
+ 'TokenPasswordResetForm' is declared here.
166
+
167
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
168
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
169
+
170
+ 90 return handlePasswordResetForm(formData);
171
+    ~~~~~~~~
172
+
173
+ ../server/dist/auth/index.d.ts:18:5
174
+ 18 old: string;
175
+    ~~~
176
+ 'old' is declared here.
177
+
178
+ [9:03:32 AM] Found 5 errors. Watching for file changes.
179
+
180
+ c[9:03:45 AM] File change detected. Starting incremental compilation...
181
+
182
+ src/components/PasswordPage/index.tsx:3:31 - error TS2307: Cannot find module '../PasswordResetForm' or its corresponding type declarations.
183
+
184
+ 3 import PasswordResetForm from '../PasswordResetForm';
185
+    ~~~~~~~~~~~~~~~~~~~~~~
186
+
187
+ src/components/TokenPasswordResetForm/index.tsx:6:15 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'TokenPasswordResetFormFields'.
188
+
189
+ 6 import type { TokenPasswordResetFormFields } from '@sqrzro/server/auth';
190
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
191
+
192
+ src/components/TokenPasswordResetForm/index.tsx:8:10 - error TS2724: '"../../server"' has no exported member named 'submitTokenPasswordResetForm'. Did you mean 'submitPasswordResetForm'?
193
+
194
+ 8 import { submitTokenPasswordResetForm } from '../../server';
195
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
196
+
197
+ src/server.ts:87:23
198
+ 87 export async function submitPasswordResetForm(
199
+    ~~~~~~~~~~~~~~~~~~~~~~~
200
+ 'submitPasswordResetForm' is declared here.
201
+
202
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
203
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
204
+
205
+ 90 return handlePasswordResetForm(formData);
206
+    ~~~~~~~~
207
+
208
+ ../server/dist/auth/index.d.ts:18:5
209
+ 18 old: string;
210
+    ~~~
211
+ 'old' is declared here.
212
+
213
+ [9:03:45 AM] Found 4 errors. Watching for file changes.
214
+
215
+ c[9:04:10 AM] File change detected. Starting incremental compilation...
216
+
217
+ src/components/PasswordResetForm/index.tsx:6:15 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'TokenPasswordResetFormFields'.
218
+
219
+ 6 import type { TokenPasswordResetFormFields } from '@sqrzro/server/auth';
220
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
221
+
222
+ src/components/PasswordResetForm/index.tsx:8:10 - error TS2724: '"../../server"' has no exported member named 'submitTokenPasswordResetForm'. Did you mean 'submitPasswordResetForm'?
223
+
224
+ 8 import { submitTokenPasswordResetForm } from '../../server';
225
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
226
+
227
+ src/server.ts:87:23
228
+ 87 export async function submitPasswordResetForm(
229
+    ~~~~~~~~~~~~~~~~~~~~~~~
230
+ 'submitPasswordResetForm' is declared here.
231
+
232
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
233
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
234
+
235
+ 90 return handlePasswordResetForm(formData);
236
+    ~~~~~~~~
237
+
238
+ ../server/dist/auth/index.d.ts:18:5
239
+ 18 old: string;
240
+    ~~~
241
+ 'old' is declared here.
242
+
243
+ [9:04:10 AM] Found 3 errors. Watching for file changes.
244
+
245
+ c[9:04:43 AM] File change detected. Starting incremental compilation...
246
+
247
+ src/components/PasswordResetForm/index.tsx:7:10 - error TS2724: '"../../server"' has no exported member named 'submitTokenPasswordResetForm'. Did you mean 'submitPasswordResetForm'?
248
+
249
+ 7 import { submitTokenPasswordResetForm } from '../../server';
250
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
251
+
252
+ src/server.ts:87:23
253
+ 87 export async function submitPasswordResetForm(
254
+    ~~~~~~~~~~~~~~~~~~~~~~~
255
+ 'submitPasswordResetForm' is declared here.
256
+
257
+ src/components/PasswordResetForm/index.tsx:27:25 - error TS2345: Argument of type '{ token: string; } | "/"' is not assignable to parameter of type 'string'.
258
+ Type '{ token: string; }' is not assignable to type 'string'.
259
+
260
+ 27 router.push(response || '/');
261
+    ~~~~~~~~~~~~~~~
262
+
263
+ src/components/PasswordResetForm/index.tsx:36:51 - error TS2345: Argument of type '"password"' is not assignable to parameter of type '"token"'.
264
+
265
+ 36 <PasswordFormField {...fieldProps('password', 'New Password')} />
266
+    ~~~~~~~~~~
267
+
268
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
269
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
270
+
271
+ 90 return handlePasswordResetForm(formData);
272
+    ~~~~~~~~
273
+
274
+ ../server/dist/auth/index.d.ts:18:5
275
+ 18 old: string;
276
+    ~~~
277
+ 'old' is declared here.
278
+
279
+ [9:04:43 AM] Found 4 errors. Watching for file changes.
280
+
281
+ c[9:04:51 AM] File change detected. Starting incremental compilation...
282
+
283
+ src/server.ts:90:36 - error TS2345: Argument of type 'PasswordResetFormFields' is not assignable to parameter of type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
284
+ Property 'old' is missing in type 'PasswordResetFormFields' but required in type 'import("/Users/richard/Sites/@sqrzro/sqrzro/packages/server/dist/auth/index").PasswordResetFormFields'.
285
+
286
+ 90 return handlePasswordResetForm(formData);
287
+    ~~~~~~~~
288
+
289
+ ../server/dist/auth/index.d.ts:18:5
290
+ 18 old: string;
291
+    ~~~
292
+ 'old' is declared here.
293
+
294
+ [9:04:51 AM] Found 1 error. Watching for file changes.
295
+
296
+ c[9:05:06 AM] File change detected. Starting incremental compilation...
297
+
298
+ src/server.ts:4:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'handleLoginForm'.
299
+
300
+ 4 handleLoginForm,
301
+    ~~~~~~~~~~~~~~~
302
+
303
+ src/server.ts:5:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'handleLogout'.
304
+
305
+ 5 handleLogout,
306
+    ~~~~~~~~~~~~
307
+
308
+ src/server.ts:6:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'handleMFAForm'.
309
+
310
+ 6 handleMFAForm,
311
+    ~~~~~~~~~~~~~
312
+
313
+ src/server.ts:7:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'handlePasswordForm'.
314
+
315
+ 7 handlePasswordForm,
316
+    ~~~~~~~~~~~~~~~~~~
317
+
318
+ src/server.ts:8:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'handleTokenPasswordResetForm'.
319
+
320
+ 8 handleTokenPasswordResetForm,
321
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
322
+
323
+ src/server.ts:9:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'checkUserHasMFA'.
324
+
325
+ 9 checkUserHasMFA as serverCheckUserHasMFA,
326
+    ~~~~~~~~~~~~~~~
327
+
328
+ src/server.ts:10:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'generateMFA'.
329
+
330
+ 10 generateMFA as serverGenerateMFA,
331
+    ~~~~~~~~~~~
332
+
333
+ src/server.ts:11:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'getSessionUser'.
334
+
335
+ 11 getSessionUser as serverGetSessionUser,
336
+    ~~~~~~~~~~~~~~
337
+
338
+ src/server.ts:12:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'checkMFAEnabled'.
339
+
340
+ 12 checkMFAEnabled as syncCheckMFAEnabled,
341
+    ~~~~~~~~~~~~~~~
342
+
343
+ src/server.ts:14:15 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'LoginFormFields'.
344
+
345
+ 14 import type { LoginFormFields, MFAFormFields, UserObject } from '@sqrzro/server/auth';
346
+    ~~~~~~~~~~~~~~~
347
+
348
+ src/server.ts:14:32 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'MFAFormFields'.
349
+
350
+ 14 import type { LoginFormFields, MFAFormFields, UserObject } from '@sqrzro/server/auth';
351
+    ~~~~~~~~~~~~~
352
+
353
+ src/server.ts:14:47 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'UserObject'.
354
+
355
+ 14 import type { LoginFormFields, MFAFormFields, UserObject } from '@sqrzro/server/auth';
356
+    ~~~~~~~~~~
357
+
358
+ src/server.ts:17:15 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'MFAFormFields'.
359
+
360
+ 17 export type { MFAFormFields, ScopeObject } from '@sqrzro/server/auth';
361
+    ~~~~~~~~~~~~~
362
+
363
+ src/server.ts:17:30 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'ScopeObject'.
364
+
365
+ 17 export type { MFAFormFields, ScopeObject } from '@sqrzro/server/auth';
366
+    ~~~~~~~~~~~
367
+
368
+ [9:05:06 AM] Found 14 errors. Watching for file changes.
369
+
370
+ c[9:05:29 AM] File change detected. Starting incremental compilation...
371
+
372
+ src/server.ts:4:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'handleLoginForm'.
373
+
374
+ 4 handleLoginForm,
375
+    ~~~~~~~~~~~~~~~
376
+
377
+ src/server.ts:5:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'handleLogout'.
378
+
379
+ 5 handleLogout,
380
+    ~~~~~~~~~~~~
381
+
382
+ src/server.ts:6:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'handleMFAForm'.
383
+
384
+ 6 handleMFAForm,
385
+    ~~~~~~~~~~~~~
386
+
387
+ src/server.ts:7:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'handlePasswordForm'.
388
+
389
+ 7 handlePasswordForm,
390
+    ~~~~~~~~~~~~~~~~~~
391
+
392
+ src/server.ts:8:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'handlePasswordResetFormWithToken'.
393
+
394
+ 8 handlePasswordResetFormWithToken,
395
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
396
+
397
+ src/server.ts:9:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'checkUserHasMFA'.
398
+
399
+ 9 checkUserHasMFA as serverCheckUserHasMFA,
400
+    ~~~~~~~~~~~~~~~
401
+
402
+ src/server.ts:10:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'generateMFA'.
403
+
404
+ 10 generateMFA as serverGenerateMFA,
405
+    ~~~~~~~~~~~
406
+
407
+ src/server.ts:11:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'getSessionUser'.
408
+
409
+ 11 getSessionUser as serverGetSessionUser,
410
+    ~~~~~~~~~~~~~~
411
+
412
+ src/server.ts:12:5 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'checkMFAEnabled'.
413
+
414
+ 12 checkMFAEnabled as syncCheckMFAEnabled,
415
+    ~~~~~~~~~~~~~~~
416
+
417
+ src/server.ts:14:15 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'LoginFormFields'.
418
+
419
+ 14 import type { LoginFormFields, MFAFormFields, UserObject } from '@sqrzro/server/auth';
420
+    ~~~~~~~~~~~~~~~
421
+
422
+ src/server.ts:14:32 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'MFAFormFields'.
423
+
424
+ 14 import type { LoginFormFields, MFAFormFields, UserObject } from '@sqrzro/server/auth';
425
+    ~~~~~~~~~~~~~
426
+
427
+ src/server.ts:14:47 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'UserObject'.
428
+
429
+ 14 import type { LoginFormFields, MFAFormFields, UserObject } from '@sqrzro/server/auth';
430
+    ~~~~~~~~~~
431
+
432
+ src/server.ts:17:15 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'MFAFormFields'.
433
+
434
+ 17 export type { MFAFormFields, ScopeObject } from '@sqrzro/server/auth';
435
+    ~~~~~~~~~~~~~
436
+
437
+ src/server.ts:17:30 - error TS2305: Module '"@sqrzro/server/auth"' has no exported member 'ScopeObject'.
438
+
439
+ 17 export type { MFAFormFields, ScopeObject } from '@sqrzro/server/auth';
440
+    ~~~~~~~~~~~
441
+
442
+ [9:05:29 AM] Found 14 errors. Watching for file changes.
443
+
444
+ c[9:08:07 AM] File change detected. Starting incremental compilation...
445
+
446
+ [9:08:08 AM] Found 0 errors. Watching for file changes.
447
+
448
+ c[9:08:26 AM] File change detected. Starting incremental compilation...
449
+
450
+ [9:08:26 AM] Found 0 errors. Watching for file changes.
451
+
452
+ c[9:08:28 AM] File change detected. Starting incremental compilation...
453
+
454
+ [9:08:28 AM] Found 0 errors. Watching for file changes.
455
+
456
+ c[9:08:51 AM] File change detected. Starting incremental compilation...
457
+
458
+ [9:08:51 AM] Found 0 errors. Watching for file changes.
459
+
460
+ c[9:08:53 AM] File change detected. Starting incremental compilation...
461
+
462
+ src/server.ts:8:5 - error TS2724: '"@sqrzro/server/auth"' has no exported member named 'handlePasswordResetFormWithToken'. Did you mean 'handlePasswordResetWithTokenForm'?
463
+
464
+ 8 handlePasswordResetFormWithToken,
465
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
466
+
467
+ [9:08:53 AM] Found 1 error. Watching for file changes.
468
+
469
+ c[9:09:17 AM] File change detected. Starting incremental compilation...
470
+
471
+ [9:09:17 AM] Found 0 errors. Watching for file changes.
472
+
473
+ c[9:10:53 AM] File change detected. Starting incremental compilation...
474
+
475
+ [9:10:53 AM] Found 0 errors. Watching for file changes.
476
+
477
+ c[9:10:54 AM] File change detected. Starting incremental compilation...
478
+
479
+ [9:10:55 AM] Found 0 errors. Watching for file changes.
480
+
481
+ c[9:11:14 AM] File change detected. Starting incremental compilation...
482
+
483
+ [9:11:14 AM] Found 0 errors. Watching for file changes.
484
+
485
+ c[9:11:16 AM] File change detected. Starting incremental compilation...
486
+
487
+ [9:11:16 AM] Found 0 errors. Watching for file changes.
488
+
489
+ c[9:12:41 AM] File change detected. Starting incremental compilation...
490
+
491
+ [9:12:41 AM] Found 0 errors. Watching for file changes.
492
+
493
+ c[9:12:42 AM] File change detected. Starting incremental compilation...
494
+
495
+ [9:12:42 AM] Found 0 errors. Watching for file changes.
496
+
497
+ c[9:13:23 AM] File change detected. Starting incremental compilation...
498
+
499
+ [9:13:23 AM] Found 0 errors. Watching for file changes.
500
+
501
+ c[9:13:24 AM] File change detected. Starting incremental compilation...
502
+
503
+ [9:13:25 AM] Found 0 errors. Watching for file changes.
504
+
505
+ c[9:42:55 AM] File change detected. Starting incremental compilation...
506
+
507
+ [9:42:55 AM] Found 0 errors. Watching for file changes.
508
+
509
+ c[9:42:57 AM] File change detected. Starting incremental compilation...
510
+
511
+ [9:42:57 AM] Found 0 errors. Watching for file changes.
512
+
513
+ c[9:43:01 AM] File change detected. Starting incremental compilation...
514
+
515
+ [9:43:01 AM] Found 0 errors. Watching for file changes.
516
+
517
+ c[9:43:02 AM] File change detected. Starting incremental compilation...
518
+
519
+ [9:43:03 AM] Found 0 errors. Watching for file changes.
520
+
521
+ c[9:43:25 AM] File change detected. Starting incremental compilation...
522
+
523
+ [9:43:25 AM] Found 0 errors. Watching for file changes.
524
+
525
+ c[9:43:27 AM] File change detected. Starting incremental compilation...
526
+
527
+ [9:43:27 AM] Found 0 errors. Watching for file changes.
528
+
529
+ c[11:38:35 AM] File change detected. Starting incremental compilation...
530
+
531
+ [11:38:35 AM] Found 0 errors. Watching for file changes.
532
+
533
+ c[11:39:22 AM] File change detected. Starting incremental compilation...
534
+
535
+ [11:39:23 AM] Found 0 errors. Watching for file changes.
536
+
537
+ c[11:39:40 AM] File change detected. Starting incremental compilation...
538
+
539
+ [11:39:40 AM] Found 0 errors. Watching for file changes.
540
+
541
+ c[11:40:02 AM] File change detected. Starting incremental compilation...
542
+
543
+ [11:40:02 AM] Found 0 errors. Watching for file changes.
544
+
545
+ c[11:40:46 AM] File change detected. Starting incremental compilation...
546
+
547
+ [11:40:46 AM] Found 0 errors. Watching for file changes.
548
+
549
+ c[11:40:52 AM] File change detected. Starting incremental compilation...
550
+
551
+ [11:40:53 AM] Found 0 errors. Watching for file changes.
552
+
553
+ c[11:48:43 AM] File change detected. Starting incremental compilation...
554
+
555
+ [11:48:43 AM] Found 0 errors. Watching for file changes.
556
+
557
+ c[2:00:33 PM] File change detected. Starting incremental compilation...
558
+
559
+ [2:00:33 PM] Found 0 errors. Watching for file changes.
560
+
561
+ c[2:01:10 PM] File change detected. Starting incremental compilation...
562
+
563
+ [2:01:11 PM] Found 0 errors. Watching for file changes.
564
+
565
+ c[2:01:30 PM] File change detected. Starting incremental compilation...
566
+
567
+ [2:01:30 PM] Found 0 errors. Watching for file changes.
568
+
569
+ c[2:01:32 PM] File change detected. Starting incremental compilation...
570
+
571
+ [2:01:32 PM] Found 0 errors. Watching for file changes.
572
+
573
+ c[2:02:21 PM] File change detected. Starting incremental compilation...
574
+
575
+ [2:02:21 PM] Found 0 errors. Watching for file changes.
576
+
577
+ c[2:02:23 PM] File change detected. Starting incremental compilation...
578
+
579
+ [2:02:23 PM] Found 0 errors. Watching for file changes.
580
+
581
+ c[2:04:32 PM] File change detected. Starting incremental compilation...
582
+
583
+ [2:04:32 PM] Found 0 errors. Watching for file changes.
584
+
585
+ c[2:04:34 PM] File change detected. Starting incremental compilation...
586
+
587
+ [2:04:34 PM] Found 0 errors. Watching for file changes.
588
+
589
+ c[2:04:58 PM] File change detected. Starting incremental compilation...
590
+
591
+ [2:04:59 PM] Found 0 errors. Watching for file changes.
592
+
593
+ c[2:05:05 PM] File change detected. Starting incremental compilation...
594
+
595
+ [2:05:05 PM] Found 0 errors. Watching for file changes.
596
+
597
+ c[2:05:41 PM] File change detected. Starting incremental compilation...
598
+
599
+ [2:05:41 PM] Found 0 errors. Watching for file changes.
600
+
601
+ c[2:05:55 PM] File change detected. Starting incremental compilation...
602
+
603
+ [2:05:55 PM] Found 0 errors. Watching for file changes.
604
+
605
+ c[2:08:37 PM] File change detected. Starting incremental compilation...
606
+
607
+ [2:08:37 PM] Found 0 errors. Watching for file changes.
608
+
609
+ c[2:08:39 PM] File change detected. Starting incremental compilation...
610
+
611
+ [2:08:39 PM] Found 0 errors. Watching for file changes.
612
+
613
+ c[2:37:30 PM] File change detected. Starting incremental compilation...
614
+
615
+ [2:37:30 PM] Found 0 errors. Watching for file changes.
616
+
617
+ c[2:37:54 PM] File change detected. Starting incremental compilation...
618
+
619
+ [2:37:54 PM] Found 0 errors. Watching for file changes.
620
+
621
+ c[2:38:58 PM] File change detected. Starting incremental compilation...
622
+
623
+ [2:38:58 PM] Found 0 errors. Watching for file changes.
624
+
625
+ c[2:39:00 PM] File change detected. Starting incremental compilation...
626
+
627
+ [2:39:00 PM] Found 0 errors. Watching for file changes.
628
+
629
+ c[2:39:36 PM] File change detected. Starting incremental compilation...
630
+
631
+ [2:39:36 PM] Found 0 errors. Watching for file changes.
632
+
633
+ c[2:39:38 PM] File change detected. Starting incremental compilation...
634
+
635
+ [2:39:38 PM] Found 0 errors. Watching for file changes.
636
+
637
+ c[2:55:34 PM] File change detected. Starting incremental compilation...
638
+
639
+ [2:55:34 PM] Found 0 errors. Watching for file changes.
640
+
@@ -34,7 +34,6 @@ function getPage(route, props) {
34
34
  * client components. So we have to pass the classNames directly to the component.
35
35
  */
36
36
  async function Auth({ classNames, logo, onLogin, onPassword, params: { auth }, searchParams, }) {
37
- console.log('auth', auth);
38
37
  if (auth.length > 1) {
39
38
  return notFound();
40
39
  }
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { AuthClassNames } from '../Auth';
3
+ interface TokenPasswordResetFormProps {
4
+ classNames?: Partial<AuthClassNames>;
5
+ token: string;
6
+ }
7
+ declare function TokenPasswordResetForm({ classNames, token, }: Readonly<TokenPasswordResetFormProps>): React.ReactElement;
8
+ export default TokenPasswordResetForm;
@@ -0,0 +1,20 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Form, FormSubmit, PasswordFormField } from '@sqrzro/components';
4
+ import { useForm } from '@sqrzro/hooks';
5
+ import { useRouter } from 'next/navigation';
6
+ import { submitTokenPasswordResetForm } from '../../server';
7
+ function TokenPasswordResetForm({ classNames, token, }) {
8
+ const router = useRouter();
9
+ const { fieldProps, formProps } = useForm({
10
+ defaults: { token },
11
+ hiddenFields: ['token'],
12
+ onSubmit: submitTokenPasswordResetForm,
13
+ onSuccess: (response) => {
14
+ router.push(response || '/');
15
+ },
16
+ toasts: { success: false },
17
+ });
18
+ return (_jsxs(Form, { ...formProps, children: [_jsx("h1", { className: classNames?.title, children: "Reset Your Password" }), _jsx("div", { className: "relative", children: _jsx(PasswordFormField, { ...fieldProps('password', 'New Password') }) }), _jsx("div", { className: "mt-8", children: _jsx(FormSubmit, { children: "Reset Password" }) })] }));
19
+ }
20
+ export default TokenPasswordResetForm;
package/dist/server.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use server';
2
- import { handleLoginForm, handleLogout, handleMFAForm, handlePasswordForm, handlePasswordResetForm, checkUserHasMFA as serverCheckUserHasMFA, generateMFA as serverGenerateMFA, getSessionUser as serverGetSessionUser, checkMFAEnabled as syncCheckMFAEnabled, } from '@sqrzro/server/auth';
2
+ import { handleLoginForm, handleLogout, handleMFAForm, handlePasswordForm, handlePasswordResetWithTokenForm, checkUserHasMFA as serverCheckUserHasMFA, generateMFA as serverGenerateMFA, getSessionUser as serverGetSessionUser, checkMFAEnabled as syncCheckMFAEnabled, } from '@sqrzro/server/auth';
3
3
  const authEvents = {};
4
4
  export async function registerAuthEvents(events) {
5
5
  if (events.login) {
@@ -42,7 +42,7 @@ export async function submitPasswordForm(formData) {
42
42
  return handlePasswordForm(formData, sendPasswordResetMail);
43
43
  }
44
44
  export async function submitPasswordResetForm(formData) {
45
- return handlePasswordResetForm(formData);
45
+ return handlePasswordResetWithTokenForm(formData);
46
46
  }
47
47
  export async function logout() {
48
48
  return handleLogout();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sqrzro/auth",
3
3
  "type": "module",
4
- "version": "2.0.0-bz.3",
4
+ "version": "2.0.0-bz.4",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "dependencies": {
@@ -8,11 +8,6 @@ import { submitPasswordResetForm } from '../../server';
8
8
 
9
9
  import type { AuthClassNames } from '../Auth';
10
10
 
11
- interface PasswordResetFormFields {
12
- password: string;
13
- token: string;
14
- }
15
-
16
11
  interface PasswordResetFormProps {
17
12
  classNames?: Partial<AuthClassNames>;
18
13
  token: string;
@@ -24,7 +19,7 @@ function PasswordResetForm({
24
19
  }: Readonly<PasswordResetFormProps>): React.ReactElement {
25
20
  const router = useRouter();
26
21
 
27
- const { fieldProps, formProps } = useForm<PasswordResetFormFields, string | null>({
22
+ const { fieldProps, formProps } = useForm({
28
23
  defaults: { token },
29
24
  hiddenFields: ['token'],
30
25
  onSubmit: submitPasswordResetForm,
package/src/server.ts CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  handleLogout,
6
6
  handleMFAForm,
7
7
  handlePasswordForm,
8
- handlePasswordResetForm,
8
+ handlePasswordResetWithTokenForm,
9
9
  checkUserHasMFA as serverCheckUserHasMFA,
10
10
  generateMFA as serverGenerateMFA,
11
11
  getSessionUser as serverGetSessionUser,
@@ -87,7 +87,7 @@ export async function submitPasswordForm(
87
87
  export async function submitPasswordResetForm(
88
88
  formData: PasswordResetFormFields
89
89
  ): Promise<Errorable<string | null>> {
90
- return handlePasswordResetForm(formData);
90
+ return handlePasswordResetWithTokenForm(formData);
91
91
  }
92
92
 
93
93
  export async function logout(): Promise<void> {