@rolder/kit 3.0.0-alpha.112 → 3.0.0-alpha.114
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.
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type JwtOptions } from 'better-auth/plugins';
|
|
2
1
|
export declare const defaultAuthServerPluginOptions: {
|
|
3
2
|
admin: {
|
|
4
3
|
bannedUserMessage: string;
|
|
@@ -212,234 +211,6 @@ export declare const defaultAuthServerConfig: {
|
|
|
212
211
|
readonly INVALID_USERNAME: "Username is invalid";
|
|
213
212
|
readonly INVALID_DISPLAY_USERNAME: "Display username is invalid";
|
|
214
213
|
};
|
|
215
|
-
} | {
|
|
216
|
-
id: "jwt";
|
|
217
|
-
options: NoInfer<{
|
|
218
|
-
jwks: {
|
|
219
|
-
keyPairConfig: {
|
|
220
|
-
alg: "EdDSA";
|
|
221
|
-
crv: "Ed25519";
|
|
222
|
-
};
|
|
223
|
-
};
|
|
224
|
-
jwt: {
|
|
225
|
-
issuer: string;
|
|
226
|
-
audience: string;
|
|
227
|
-
expirationTime: string;
|
|
228
|
-
definePayload: ({ user, session }: {
|
|
229
|
-
user: import("better-auth").User & Record<string, any>;
|
|
230
|
-
session: import("better-auth").Session & Record<string, any>;
|
|
231
|
-
}) => {
|
|
232
|
-
id: string;
|
|
233
|
-
ns: string;
|
|
234
|
-
db: string;
|
|
235
|
-
ac: string;
|
|
236
|
-
email: string;
|
|
237
|
-
name: string;
|
|
238
|
-
role: string;
|
|
239
|
-
sessionId: string;
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
}>;
|
|
243
|
-
endpoints: {
|
|
244
|
-
getJwks: import("better-auth").StrictEndpoint<string, {
|
|
245
|
-
method: "GET";
|
|
246
|
-
metadata: {
|
|
247
|
-
openapi: {
|
|
248
|
-
operationId: string;
|
|
249
|
-
description: string;
|
|
250
|
-
responses: {
|
|
251
|
-
"200": {
|
|
252
|
-
description: string;
|
|
253
|
-
content: {
|
|
254
|
-
"application/json": {
|
|
255
|
-
schema: {
|
|
256
|
-
type: "object";
|
|
257
|
-
properties: {
|
|
258
|
-
keys: {
|
|
259
|
-
type: string;
|
|
260
|
-
description: string;
|
|
261
|
-
items: {
|
|
262
|
-
type: string;
|
|
263
|
-
properties: {
|
|
264
|
-
kid: {
|
|
265
|
-
type: string;
|
|
266
|
-
description: string;
|
|
267
|
-
};
|
|
268
|
-
kty: {
|
|
269
|
-
type: string;
|
|
270
|
-
description: string;
|
|
271
|
-
};
|
|
272
|
-
alg: {
|
|
273
|
-
type: string;
|
|
274
|
-
description: string;
|
|
275
|
-
};
|
|
276
|
-
use: {
|
|
277
|
-
type: string;
|
|
278
|
-
description: string;
|
|
279
|
-
enum: string[];
|
|
280
|
-
nullable: boolean;
|
|
281
|
-
};
|
|
282
|
-
n: {
|
|
283
|
-
type: string;
|
|
284
|
-
description: string;
|
|
285
|
-
nullable: boolean;
|
|
286
|
-
};
|
|
287
|
-
e: {
|
|
288
|
-
type: string;
|
|
289
|
-
description: string;
|
|
290
|
-
nullable: boolean;
|
|
291
|
-
};
|
|
292
|
-
crv: {
|
|
293
|
-
type: string;
|
|
294
|
-
description: string;
|
|
295
|
-
nullable: boolean;
|
|
296
|
-
};
|
|
297
|
-
x: {
|
|
298
|
-
type: string;
|
|
299
|
-
description: string;
|
|
300
|
-
nullable: boolean;
|
|
301
|
-
};
|
|
302
|
-
y: {
|
|
303
|
-
type: string;
|
|
304
|
-
description: string;
|
|
305
|
-
nullable: boolean;
|
|
306
|
-
};
|
|
307
|
-
};
|
|
308
|
-
required: string[];
|
|
309
|
-
};
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
required: string[];
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
|
-
};
|
|
318
|
-
};
|
|
319
|
-
};
|
|
320
|
-
}, import("better-auth").JSONWebKeySet>;
|
|
321
|
-
getToken: import("better-auth").StrictEndpoint<"/token", {
|
|
322
|
-
method: "GET";
|
|
323
|
-
requireHeaders: true;
|
|
324
|
-
use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
|
|
325
|
-
session: {
|
|
326
|
-
session: Record<string, any> & {
|
|
327
|
-
id: string;
|
|
328
|
-
createdAt: Date;
|
|
329
|
-
updatedAt: Date;
|
|
330
|
-
userId: string;
|
|
331
|
-
expiresAt: Date;
|
|
332
|
-
token: string;
|
|
333
|
-
ipAddress?: string | null | undefined;
|
|
334
|
-
userAgent?: string | null | undefined;
|
|
335
|
-
};
|
|
336
|
-
user: Record<string, any> & {
|
|
337
|
-
id: string;
|
|
338
|
-
createdAt: Date;
|
|
339
|
-
updatedAt: Date;
|
|
340
|
-
email: string;
|
|
341
|
-
emailVerified: boolean;
|
|
342
|
-
name: string;
|
|
343
|
-
image?: string | null | undefined;
|
|
344
|
-
};
|
|
345
|
-
};
|
|
346
|
-
}>)[];
|
|
347
|
-
metadata: {
|
|
348
|
-
openapi: {
|
|
349
|
-
operationId: string;
|
|
350
|
-
description: string;
|
|
351
|
-
responses: {
|
|
352
|
-
200: {
|
|
353
|
-
description: string;
|
|
354
|
-
content: {
|
|
355
|
-
"application/json": {
|
|
356
|
-
schema: {
|
|
357
|
-
type: "object";
|
|
358
|
-
properties: {
|
|
359
|
-
token: {
|
|
360
|
-
type: string;
|
|
361
|
-
};
|
|
362
|
-
};
|
|
363
|
-
};
|
|
364
|
-
};
|
|
365
|
-
};
|
|
366
|
-
};
|
|
367
|
-
};
|
|
368
|
-
};
|
|
369
|
-
};
|
|
370
|
-
}, {
|
|
371
|
-
token: string;
|
|
372
|
-
}>;
|
|
373
|
-
signJWT: import("better-auth").StrictEndpoint<string, {
|
|
374
|
-
method: "POST";
|
|
375
|
-
metadata: {
|
|
376
|
-
$Infer: {
|
|
377
|
-
body: {
|
|
378
|
-
payload: import("better-auth").JWTPayload;
|
|
379
|
-
overrideOptions?: JwtOptions | undefined;
|
|
380
|
-
};
|
|
381
|
-
};
|
|
382
|
-
};
|
|
383
|
-
body: import("zod").ZodObject<{
|
|
384
|
-
payload: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
385
|
-
overrideOptions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
386
|
-
}, import("better-auth").$strip>;
|
|
387
|
-
}, {
|
|
388
|
-
token: string;
|
|
389
|
-
}>;
|
|
390
|
-
verifyJWT: import("better-auth").StrictEndpoint<string, {
|
|
391
|
-
method: "POST";
|
|
392
|
-
metadata: {
|
|
393
|
-
$Infer: {
|
|
394
|
-
body: {
|
|
395
|
-
token: string;
|
|
396
|
-
issuer?: string;
|
|
397
|
-
};
|
|
398
|
-
response: {
|
|
399
|
-
payload: {
|
|
400
|
-
sub: string;
|
|
401
|
-
aud: string;
|
|
402
|
-
[key: string]: any;
|
|
403
|
-
} | null;
|
|
404
|
-
};
|
|
405
|
-
};
|
|
406
|
-
};
|
|
407
|
-
body: import("zod").ZodObject<{
|
|
408
|
-
token: import("zod").ZodString;
|
|
409
|
-
issuer: import("zod").ZodOptional<import("zod").ZodString>;
|
|
410
|
-
}, import("better-auth").$strip>;
|
|
411
|
-
}, {
|
|
412
|
-
payload: (import("better-auth").JWTPayload & Required<Pick<import("better-auth").JWTPayload, "sub" | "aud">>) | null;
|
|
413
|
-
}>;
|
|
414
|
-
};
|
|
415
|
-
hooks: {
|
|
416
|
-
after: {
|
|
417
|
-
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
418
|
-
handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
|
|
419
|
-
}[];
|
|
420
|
-
};
|
|
421
|
-
schema: {
|
|
422
|
-
jwks: {
|
|
423
|
-
fields: {
|
|
424
|
-
publicKey: {
|
|
425
|
-
type: "string";
|
|
426
|
-
required: true;
|
|
427
|
-
};
|
|
428
|
-
privateKey: {
|
|
429
|
-
type: "string";
|
|
430
|
-
required: true;
|
|
431
|
-
};
|
|
432
|
-
createdAt: {
|
|
433
|
-
type: "date";
|
|
434
|
-
required: true;
|
|
435
|
-
};
|
|
436
|
-
expiresAt: {
|
|
437
|
-
type: "date";
|
|
438
|
-
required: false;
|
|
439
|
-
};
|
|
440
|
-
};
|
|
441
|
-
};
|
|
442
|
-
};
|
|
443
214
|
} | {
|
|
444
215
|
id: "tanstack-start-cookies";
|
|
445
216
|
hooks: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { username } from "better-auth/plugins";
|
|
2
2
|
import { tanstackStartCookies } from "better-auth/tanstack-start";
|
|
3
3
|
import { baseUrl } from "./env.js";
|
|
4
4
|
import { surrealDbAdapter } from "./surrealDbAdapter/index.js";
|
|
@@ -42,7 +42,6 @@ const defaultAuthServerConfig = {
|
|
|
42
42
|
},
|
|
43
43
|
plugins: [
|
|
44
44
|
username(),
|
|
45
|
-
jwt(defaultAuthServerPluginOptions.jwt),
|
|
46
45
|
tanstackStartCookies()
|
|
47
46
|
]
|
|
48
47
|
};
|
package/dist/surrealDB/index.js
CHANGED