@cubicecho/server-kit 0.0.0-stage → 0.2.0

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.
Files changed (45) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +43 -2
  3. package/_agents/docs/01-database.md +31 -0
  4. package/_agents/docs/02-columns.md +25 -0
  5. package/_agents/docs/03-testing.md +18 -0
  6. package/_agents/docs/04-auth.md +41 -0
  7. package/_agents/docs/common-mistakes.md +23 -0
  8. package/dist/auth/defaults.d.ts +20 -0
  9. package/dist/auth/defaults.js +12 -0
  10. package/dist/auth/index.d.ts +3 -0
  11. package/dist/auth/index.js +3 -0
  12. package/dist/auth/plugins.d.ts +1270 -0
  13. package/dist/auth/plugins.js +39 -0
  14. package/dist/auth/preset.d.ts +53 -0
  15. package/dist/auth/preset.js +21 -0
  16. package/dist/columns/index.d.ts +38 -0
  17. package/dist/columns/index.js +53 -0
  18. package/dist/consts.d.ts +4 -0
  19. package/dist/consts.js +4 -0
  20. package/dist/db/connection.d.ts +18 -0
  21. package/dist/db/connection.js +15 -0
  22. package/dist/db/create.d.ts +40 -0
  23. package/dist/db/create.js +91 -0
  24. package/dist/db/defaults.d.ts +13 -0
  25. package/dist/db/defaults.js +8 -0
  26. package/dist/db/errors.d.ts +11 -0
  27. package/dist/db/errors.js +19 -0
  28. package/dist/db/index.d.ts +9 -0
  29. package/dist/db/index.js +8 -0
  30. package/dist/db/prepare.d.ts +32 -0
  31. package/dist/db/prepare.js +75 -0
  32. package/dist/db/ssl.d.ts +21 -0
  33. package/dist/db/ssl.js +91 -0
  34. package/dist/db/version.d.ts +22 -0
  35. package/dist/db/version.js +57 -0
  36. package/dist/db/wait.d.ts +23 -0
  37. package/dist/db/wait.js +52 -0
  38. package/dist/testing/index.d.ts +17 -0
  39. package/dist/testing/index.js +51 -0
  40. package/dist/testing/postgres-problems.d.ts +38 -0
  41. package/dist/testing/postgres-problems.js +57 -0
  42. package/dist/testing/schema-problems.d.ts +18 -0
  43. package/dist/testing/schema-problems.js +153 -0
  44. package/llms.txt +68 -0
  45. package/package.json +99 -4
@@ -0,0 +1,1270 @@
1
+ import { oidcPairingPlugins } from '@cubicecho/better-auth-oidc-pairing';
2
+ import { type AuthPaths, type AuthSettings } from './defaults.ts';
3
+ /** What delivering one sign-in link is given. */
4
+ export interface MagicLink {
5
+ email: string;
6
+ /** The link to the app, with the token in its query. */
7
+ url: string;
8
+ token: string;
9
+ }
10
+ /** What an app gives `signInPlugins`. */
11
+ export interface SignInOptions extends Partial<Pick<AuthSettings, 'magicLinkTtlMinutes'>> {
12
+ /** Where users reach the app. */
13
+ appUrl: string;
14
+ /** Delivers a sign-in link, or undefined on an instance that cannot email. */
15
+ deliver: ((link: MagicLink) => Promise<void>) | undefined;
16
+ /** OIDC sign-in and pairing, without the two URLs, which follow from `appUrl`. */
17
+ oidc: Omit<Parameters<typeof oidcPairingPlugins>[0], 'signedInURL' | 'errorURL'>;
18
+ /**
19
+ * Pages that are somewhere else in this app.
20
+ *
21
+ * @defaultValue `AUTH_PATHS`
22
+ */
23
+ paths?: Partial<AuthPaths>;
24
+ }
25
+ /**
26
+ * How people sign in: bearer sessions, OIDC with pairing, and emailed links. Never a password.
27
+ *
28
+ * @param options - The app's links and provider.
29
+ * @returns The plugins, to spread into `plugins`.
30
+ */
31
+ export declare function signInPlugins({ appUrl, deliver, oidc, paths, magicLinkTtlMinutes, }: SignInOptions): ({
32
+ id: "sso";
33
+ version: string;
34
+ endpoints: {
35
+ spMetadata: ReturnType<(options?: import("@better-auth/sso").SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/sp/metadata", {
36
+ method: "GET";
37
+ query: import("zod").ZodObject<{
38
+ providerId: import("zod").ZodString;
39
+ }, import("zod/v4/core").$strip>;
40
+ metadata: {
41
+ openapi: {
42
+ operationId: string;
43
+ summary: string;
44
+ description: string;
45
+ responses: {
46
+ "200": {
47
+ description: string;
48
+ };
49
+ };
50
+ };
51
+ };
52
+ }, Response>>;
53
+ registerSSOProvider: import("better-call").StrictEndpoint<"/sso/register", {
54
+ method: "POST";
55
+ body: import("zod").ZodObject<{
56
+ [x: string]: import("zod").ZodOptional<import("zod").ZodAny>;
57
+ }, import("zod/v4/core").$strip>;
58
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
59
+ session: {
60
+ session: Record<string, any> & {
61
+ id: string;
62
+ createdAt: Date;
63
+ updatedAt: Date;
64
+ userId: string;
65
+ expiresAt: Date;
66
+ token: string;
67
+ ipAddress?: string | null | undefined;
68
+ userAgent?: string | null | undefined;
69
+ };
70
+ user: Record<string, any> & {
71
+ id: string;
72
+ createdAt: Date;
73
+ updatedAt: Date;
74
+ email: string;
75
+ emailVerified: boolean;
76
+ name: string;
77
+ image?: string | null | undefined;
78
+ };
79
+ };
80
+ }>>[];
81
+ metadata: {
82
+ $Infer: {
83
+ body: {
84
+ [x: string]: any;
85
+ };
86
+ };
87
+ openapi: {
88
+ operationId: string;
89
+ summary: string;
90
+ description: string;
91
+ responses: {
92
+ "200": {
93
+ description: string;
94
+ content: {
95
+ "application/json": {
96
+ schema: {
97
+ type: "object";
98
+ properties: {
99
+ issuer: {
100
+ type: string;
101
+ format: string;
102
+ description: string;
103
+ };
104
+ domain: {
105
+ type: string;
106
+ description: string;
107
+ };
108
+ domainVerified: {
109
+ type: string;
110
+ description: string;
111
+ };
112
+ domainVerificationToken: {
113
+ type: string;
114
+ description: string;
115
+ };
116
+ oidcConfig: {
117
+ type: string;
118
+ properties: {
119
+ issuer: {
120
+ type: string;
121
+ format: string;
122
+ description: string;
123
+ };
124
+ pkce: {
125
+ type: string;
126
+ description: string;
127
+ };
128
+ clientId: {
129
+ type: string;
130
+ description: string;
131
+ };
132
+ clientSecret: {
133
+ type: string;
134
+ description: string;
135
+ };
136
+ authorizationEndpoint: {
137
+ type: string;
138
+ format: string;
139
+ nullable: boolean;
140
+ description: string;
141
+ };
142
+ discoveryEndpoint: {
143
+ type: string;
144
+ format: string;
145
+ description: string;
146
+ };
147
+ userInfoEndpoint: {
148
+ type: string;
149
+ format: string;
150
+ nullable: boolean;
151
+ description: string;
152
+ };
153
+ scopes: {
154
+ type: string;
155
+ items: {
156
+ type: string;
157
+ };
158
+ nullable: boolean;
159
+ description: string;
160
+ };
161
+ tokenEndpoint: {
162
+ type: string;
163
+ format: string;
164
+ nullable: boolean;
165
+ description: string;
166
+ };
167
+ tokenEndpointAuthentication: {
168
+ type: string;
169
+ enum: string[];
170
+ nullable: boolean;
171
+ description: string;
172
+ };
173
+ jwksEndpoint: {
174
+ type: string;
175
+ format: string;
176
+ nullable: boolean;
177
+ description: string;
178
+ };
179
+ mapping: {
180
+ type: string;
181
+ nullable: boolean;
182
+ properties: {
183
+ email: {
184
+ type: string;
185
+ description: string;
186
+ };
187
+ emailVerified: {
188
+ type: string;
189
+ nullable: boolean;
190
+ description: string;
191
+ };
192
+ name: {
193
+ type: string;
194
+ description: string;
195
+ };
196
+ image: {
197
+ type: string;
198
+ nullable: boolean;
199
+ description: string;
200
+ };
201
+ extraFields: {
202
+ type: string;
203
+ additionalProperties: {
204
+ type: string;
205
+ };
206
+ nullable: boolean;
207
+ description: string;
208
+ };
209
+ };
210
+ };
211
+ };
212
+ required: string[];
213
+ description: string;
214
+ };
215
+ organizationId: {
216
+ type: string;
217
+ nullable: boolean;
218
+ description: string;
219
+ };
220
+ userId: {
221
+ type: string;
222
+ description: string;
223
+ };
224
+ providerId: {
225
+ type: string;
226
+ description: string;
227
+ };
228
+ redirectURI: {
229
+ type: string;
230
+ format: string;
231
+ description: string;
232
+ };
233
+ };
234
+ required: string[];
235
+ };
236
+ };
237
+ };
238
+ };
239
+ };
240
+ };
241
+ };
242
+ }, {
243
+ redirectURI: string;
244
+ oidcConfig: import("@better-auth/sso").OIDCConfig | null;
245
+ samlConfig: import("@better-auth/sso").SAMLConfig | null;
246
+ } & Omit<{
247
+ issuer: string;
248
+ oidcConfig?: import("@better-auth/sso").OIDCConfig | undefined;
249
+ samlConfig?: import("@better-auth/sso").SAMLConfig | undefined;
250
+ userId: string;
251
+ providerId: string;
252
+ organizationId?: string | undefined;
253
+ domain: string;
254
+ }, "oidcConfig" | "samlConfig">>;
255
+ signInSSO: ReturnType<(options?: import("@better-auth/sso").SSOOptions) => import("better-call").StrictEndpoint<"/sign-in/sso", {
256
+ method: "POST";
257
+ body: import("zod").ZodObject<{
258
+ email: import("zod").ZodOptional<import("zod").ZodString>;
259
+ organizationSlug: import("zod").ZodOptional<import("zod").ZodString>;
260
+ providerId: import("zod").ZodOptional<import("zod").ZodString>;
261
+ domain: import("zod").ZodOptional<import("zod").ZodString>;
262
+ callbackURL: import("zod").ZodString;
263
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
264
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
265
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
266
+ loginHint: import("zod").ZodOptional<import("zod").ZodString>;
267
+ additionalParams: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
268
+ requestSignUp: import("zod").ZodOptional<import("zod").ZodBoolean>;
269
+ providerType: import("zod").ZodOptional<import("zod").ZodEnum<{
270
+ saml: "saml";
271
+ oidc: "oidc";
272
+ }>>;
273
+ }, import("zod/v4/core").$strip>;
274
+ metadata: {
275
+ openapi: {
276
+ operationId: string;
277
+ summary: string;
278
+ description: string;
279
+ requestBody: {
280
+ content: {
281
+ "application/json": {
282
+ schema: {
283
+ type: "object";
284
+ properties: {
285
+ email: {
286
+ type: string;
287
+ description: string;
288
+ };
289
+ organizationSlug: {
290
+ type: string;
291
+ description: string;
292
+ };
293
+ providerId: {
294
+ type: string;
295
+ description: string;
296
+ };
297
+ domain: {
298
+ type: string;
299
+ description: string;
300
+ };
301
+ callbackURL: {
302
+ type: string;
303
+ description: string;
304
+ };
305
+ errorCallbackURL: {
306
+ type: string;
307
+ description: string;
308
+ };
309
+ newUserCallbackURL: {
310
+ type: string;
311
+ description: string;
312
+ };
313
+ scopes: {
314
+ type: string;
315
+ items: {
316
+ type: string;
317
+ };
318
+ description: string;
319
+ };
320
+ loginHint: {
321
+ type: string;
322
+ description: string;
323
+ };
324
+ additionalParams: {
325
+ type: string;
326
+ additionalProperties: {
327
+ type: string;
328
+ };
329
+ description: string;
330
+ };
331
+ requestSignUp: {
332
+ type: string;
333
+ description: string;
334
+ };
335
+ providerType: {
336
+ type: string;
337
+ enum: string[];
338
+ description: string;
339
+ };
340
+ };
341
+ required: string[];
342
+ };
343
+ };
344
+ };
345
+ };
346
+ responses: {
347
+ "200": {
348
+ description: string;
349
+ content: {
350
+ "application/json": {
351
+ schema: {
352
+ type: "object";
353
+ properties: {
354
+ url: {
355
+ type: string;
356
+ format: string;
357
+ description: string;
358
+ };
359
+ redirect: {
360
+ type: string;
361
+ description: string;
362
+ enum: boolean[];
363
+ };
364
+ };
365
+ required: string[];
366
+ };
367
+ };
368
+ };
369
+ };
370
+ };
371
+ };
372
+ };
373
+ }, {
374
+ url: string;
375
+ redirect: boolean;
376
+ }>>;
377
+ callbackSSO: ReturnType<(options?: import("@better-auth/sso").SSOOptions) => import("better-call").StrictEndpoint<"/sso/callback/:providerId", {
378
+ method: "GET";
379
+ query: import("zod").ZodObject<{
380
+ code: import("zod").ZodOptional<import("zod").ZodString>;
381
+ state: import("zod").ZodOptional<import("zod").ZodString>;
382
+ error: import("zod").ZodOptional<import("zod").ZodString>;
383
+ error_description: import("zod").ZodOptional<import("zod").ZodString>;
384
+ }, import("zod/v4/core").$strip>;
385
+ allowedMediaTypes: readonly ["application/x-www-form-urlencoded", "application/json"];
386
+ metadata: {
387
+ openapi: {
388
+ operationId: string;
389
+ summary: string;
390
+ description: string;
391
+ responses: {
392
+ "302": {
393
+ description: string;
394
+ };
395
+ };
396
+ };
397
+ scope: "server";
398
+ };
399
+ }, never>>;
400
+ callbackSSOShared: ReturnType<(options?: import("@better-auth/sso").SSOOptions) => import("better-call").StrictEndpoint<"/sso/callback", {
401
+ metadata: {
402
+ openapi: {
403
+ operationId: string;
404
+ summary: string;
405
+ description: string;
406
+ responses: {
407
+ "302": {
408
+ description: string;
409
+ };
410
+ };
411
+ };
412
+ scope: "server";
413
+ };
414
+ method: "GET";
415
+ query: import("zod").ZodObject<{
416
+ code: import("zod").ZodOptional<import("zod").ZodString>;
417
+ state: import("zod").ZodOptional<import("zod").ZodString>;
418
+ error: import("zod").ZodOptional<import("zod").ZodString>;
419
+ error_description: import("zod").ZodOptional<import("zod").ZodString>;
420
+ }, import("zod/v4/core").$strip>;
421
+ allowedMediaTypes: readonly ["application/x-www-form-urlencoded", "application/json"];
422
+ }, never>>;
423
+ acsEndpoint: ReturnType<(options?: import("@better-auth/sso").SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/sp/acs/:providerId", {
424
+ method: ("GET" | "POST")[];
425
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
426
+ SAMLResponse: import("zod").ZodString;
427
+ RelayState: import("zod").ZodOptional<import("zod").ZodString>;
428
+ }, import("zod/v4/core").$strip>>;
429
+ query: import("zod").ZodOptional<import("zod").ZodObject<{
430
+ RelayState: import("zod").ZodOptional<import("zod").ZodString>;
431
+ }, import("zod/v4/core").$strip>>;
432
+ metadata: {
433
+ allowedMediaTypes: string[];
434
+ openapi: {
435
+ operationId: string;
436
+ summary: string;
437
+ description: string;
438
+ responses: {
439
+ "302": {
440
+ description: string;
441
+ };
442
+ "400": {
443
+ description: string;
444
+ };
445
+ "404": {
446
+ description: string;
447
+ };
448
+ };
449
+ };
450
+ scope: "server";
451
+ };
452
+ }, never>>;
453
+ sloEndpoint: ReturnType<(options?: import("@better-auth/sso").SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/sp/slo/:providerId", {
454
+ method: ("GET" | "POST")[];
455
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
456
+ SAMLRequest: import("zod").ZodOptional<import("zod").ZodString>;
457
+ SAMLResponse: import("zod").ZodOptional<import("zod").ZodString>;
458
+ RelayState: import("zod").ZodOptional<import("zod").ZodString>;
459
+ SigAlg: import("zod").ZodOptional<import("zod").ZodString>;
460
+ Signature: import("zod").ZodOptional<import("zod").ZodString>;
461
+ }, import("zod/v4/core").$strip>>;
462
+ query: import("zod").ZodOptional<import("zod").ZodObject<{
463
+ SAMLRequest: import("zod").ZodOptional<import("zod").ZodString>;
464
+ SAMLResponse: import("zod").ZodOptional<import("zod").ZodString>;
465
+ RelayState: import("zod").ZodOptional<import("zod").ZodString>;
466
+ SigAlg: import("zod").ZodOptional<import("zod").ZodString>;
467
+ Signature: import("zod").ZodOptional<import("zod").ZodString>;
468
+ }, import("zod/v4/core").$strip>>;
469
+ metadata: {
470
+ allowedMediaTypes: string[];
471
+ scope: "server";
472
+ };
473
+ }, void | Response>>;
474
+ initiateSLO: ReturnType<(options?: import("@better-auth/sso").SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/logout/:providerId", {
475
+ method: "POST";
476
+ body: import("zod").ZodObject<{
477
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
478
+ }, import("zod/v4/core").$strip>;
479
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
480
+ session: {
481
+ session: Record<string, any> & {
482
+ id: string;
483
+ createdAt: Date;
484
+ updatedAt: Date;
485
+ userId: string;
486
+ expiresAt: Date;
487
+ token: string;
488
+ ipAddress?: string | null | undefined;
489
+ userAgent?: string | null | undefined;
490
+ };
491
+ user: Record<string, any> & {
492
+ id: string;
493
+ createdAt: Date;
494
+ updatedAt: Date;
495
+ email: string;
496
+ emailVerified: boolean;
497
+ name: string;
498
+ image?: string | null | undefined;
499
+ };
500
+ };
501
+ }>>[];
502
+ metadata: {
503
+ readonly scope: "server";
504
+ };
505
+ }, never>>;
506
+ listSSOProviders: ReturnType<(options?: import("@better-auth/sso").SSOOptions) => import("better-call").StrictEndpoint<"/sso/providers", {
507
+ method: "GET";
508
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
509
+ session: {
510
+ session: Record<string, any> & {
511
+ id: string;
512
+ createdAt: Date;
513
+ updatedAt: Date;
514
+ userId: string;
515
+ expiresAt: Date;
516
+ token: string;
517
+ ipAddress?: string | null | undefined;
518
+ userAgent?: string | null | undefined;
519
+ };
520
+ user: Record<string, any> & {
521
+ id: string;
522
+ createdAt: Date;
523
+ updatedAt: Date;
524
+ email: string;
525
+ emailVerified: boolean;
526
+ name: string;
527
+ image?: string | null | undefined;
528
+ };
529
+ };
530
+ }>>[];
531
+ metadata: {
532
+ openapi: {
533
+ operationId: string;
534
+ summary: string;
535
+ description: string;
536
+ responses: {
537
+ "200": {
538
+ description: string;
539
+ };
540
+ };
541
+ };
542
+ };
543
+ }, {
544
+ providers: {
545
+ providerId: string;
546
+ type: string;
547
+ issuer: string;
548
+ domain: string;
549
+ organizationId: string | null;
550
+ domainVerified: boolean;
551
+ oidcConfig: {
552
+ discoveryEndpoint: string;
553
+ clientIdLastFour: string;
554
+ pkce: boolean;
555
+ authorizationEndpoint: string | undefined;
556
+ tokenEndpoint: string | undefined;
557
+ userInfoEndpoint: string | undefined;
558
+ jwksEndpoint: string | undefined;
559
+ scopes: string[] | undefined;
560
+ tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | "private_key_jwt" | undefined;
561
+ } | undefined;
562
+ samlConfig: {
563
+ entryPoint: string;
564
+ callbackUrl: string | undefined;
565
+ idpInitiatedCallbackUrl: string | undefined;
566
+ audience: string | undefined;
567
+ wantAssertionsSigned: boolean | undefined;
568
+ authnRequestsSigned: boolean | undefined;
569
+ identifierFormat: string | undefined;
570
+ signatureAlgorithm: string | undefined;
571
+ digestAlgorithm: string | undefined;
572
+ certificate: ({
573
+ fingerprintSha256: string;
574
+ notBefore: string;
575
+ notAfter: string;
576
+ publicKeyAlgorithm: string;
577
+ } | {
578
+ error: string;
579
+ })[] | undefined;
580
+ } | undefined;
581
+ spMetadataUrl: string;
582
+ }[];
583
+ }>>;
584
+ getSSOProvider: ReturnType<(options?: import("@better-auth/sso").SSOOptions) => import("better-call").StrictEndpoint<"/sso/get-provider", {
585
+ method: "GET";
586
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
587
+ session: {
588
+ session: Record<string, any> & {
589
+ id: string;
590
+ createdAt: Date;
591
+ updatedAt: Date;
592
+ userId: string;
593
+ expiresAt: Date;
594
+ token: string;
595
+ ipAddress?: string | null | undefined;
596
+ userAgent?: string | null | undefined;
597
+ };
598
+ user: Record<string, any> & {
599
+ id: string;
600
+ createdAt: Date;
601
+ updatedAt: Date;
602
+ email: string;
603
+ emailVerified: boolean;
604
+ name: string;
605
+ image?: string | null | undefined;
606
+ };
607
+ };
608
+ }>>[];
609
+ query: import("zod").ZodObject<{
610
+ providerId: import("zod").ZodString;
611
+ }, import("zod/v4/core").$strip>;
612
+ metadata: {
613
+ openapi: {
614
+ operationId: string;
615
+ summary: string;
616
+ description: string;
617
+ responses: {
618
+ "200": {
619
+ description: string;
620
+ };
621
+ "404": {
622
+ description: string;
623
+ };
624
+ "403": {
625
+ description: string;
626
+ };
627
+ };
628
+ };
629
+ };
630
+ }, {
631
+ providerId: string;
632
+ type: string;
633
+ issuer: string;
634
+ domain: string;
635
+ organizationId: string | null;
636
+ domainVerified: boolean;
637
+ oidcConfig: {
638
+ discoveryEndpoint: string;
639
+ clientIdLastFour: string;
640
+ pkce: boolean;
641
+ authorizationEndpoint: string | undefined;
642
+ tokenEndpoint: string | undefined;
643
+ userInfoEndpoint: string | undefined;
644
+ jwksEndpoint: string | undefined;
645
+ scopes: string[] | undefined;
646
+ tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | "private_key_jwt" | undefined;
647
+ } | undefined;
648
+ samlConfig: {
649
+ entryPoint: string;
650
+ callbackUrl: string | undefined;
651
+ idpInitiatedCallbackUrl: string | undefined;
652
+ audience: string | undefined;
653
+ wantAssertionsSigned: boolean | undefined;
654
+ authnRequestsSigned: boolean | undefined;
655
+ identifierFormat: string | undefined;
656
+ signatureAlgorithm: string | undefined;
657
+ digestAlgorithm: string | undefined;
658
+ certificate: ({
659
+ fingerprintSha256: string;
660
+ notBefore: string;
661
+ notAfter: string;
662
+ publicKeyAlgorithm: string;
663
+ } | {
664
+ error: string;
665
+ })[] | undefined;
666
+ } | undefined;
667
+ spMetadataUrl: string;
668
+ }>>;
669
+ updateSSOProvider: ReturnType<(options: import("@better-auth/sso").SSOOptions) => import("better-call").StrictEndpoint<"/sso/update-provider", {
670
+ method: "POST";
671
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
672
+ session: {
673
+ session: Record<string, any> & {
674
+ id: string;
675
+ createdAt: Date;
676
+ updatedAt: Date;
677
+ userId: string;
678
+ expiresAt: Date;
679
+ token: string;
680
+ ipAddress?: string | null | undefined;
681
+ userAgent?: string | null | undefined;
682
+ };
683
+ user: Record<string, any> & {
684
+ id: string;
685
+ createdAt: Date;
686
+ updatedAt: Date;
687
+ email: string;
688
+ emailVerified: boolean;
689
+ name: string;
690
+ image?: string | null | undefined;
691
+ };
692
+ };
693
+ }>>[];
694
+ body: import("zod").ZodObject<{
695
+ issuer: import("zod").ZodOptional<import("zod").ZodString>;
696
+ domain: import("zod").ZodOptional<import("zod").ZodString>;
697
+ oidcConfig: import("zod").ZodOptional<import("zod").ZodObject<{
698
+ clientId: import("zod").ZodOptional<import("zod").ZodString>;
699
+ clientSecret: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
700
+ authorizationEndpoint: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
701
+ tokenEndpoint: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
702
+ userInfoEndpoint: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
703
+ tokenEndpointAuthentication: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodEnum<{
704
+ client_secret_post: "client_secret_post";
705
+ client_secret_basic: "client_secret_basic";
706
+ private_key_jwt: "private_key_jwt";
707
+ }>>>;
708
+ privateKeyId: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
709
+ privateKeyAlgorithm: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
710
+ jwksEndpoint: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
711
+ discoveryEndpoint: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
712
+ skipDiscovery: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodBoolean>>;
713
+ scopes: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>>;
714
+ pkce: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>>;
715
+ overrideUserInfo: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodBoolean>>;
716
+ mapping: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
717
+ email: import("zod").ZodOptional<import("zod").ZodString>;
718
+ emailVerified: import("zod").ZodOptional<import("zod").ZodString>;
719
+ name: import("zod").ZodOptional<import("zod").ZodString>;
720
+ image: import("zod").ZodOptional<import("zod").ZodString>;
721
+ extraFields: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
722
+ }, import("zod/v4/core").$strict>>>;
723
+ }, import("zod/v4/core").$strip>>;
724
+ samlConfig: import("zod").ZodOptional<import("zod").ZodObject<{
725
+ mapping: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
726
+ email: import("zod").ZodOptional<import("zod").ZodString>;
727
+ emailVerified: import("zod").ZodOptional<import("zod").ZodString>;
728
+ name: import("zod").ZodOptional<import("zod").ZodString>;
729
+ firstName: import("zod").ZodOptional<import("zod").ZodString>;
730
+ lastName: import("zod").ZodOptional<import("zod").ZodString>;
731
+ extraFields: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
732
+ }, import("zod/v4/core").$strict>>>;
733
+ privateKey: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
734
+ spMetadata: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodObject<{
735
+ metadata: import("zod").ZodOptional<import("zod").ZodString>;
736
+ entityID: import("zod").ZodOptional<import("zod").ZodString>;
737
+ binding: import("zod").ZodOptional<import("zod").ZodString>;
738
+ privateKey: import("zod").ZodOptional<import("zod").ZodString>;
739
+ privateKeyPass: import("zod").ZodOptional<import("zod").ZodString>;
740
+ isAssertionEncrypted: import("zod").ZodOptional<import("zod").ZodBoolean>;
741
+ encPrivateKey: import("zod").ZodOptional<import("zod").ZodString>;
742
+ encPrivateKeyPass: import("zod").ZodOptional<import("zod").ZodString>;
743
+ }, import("zod/v4/core").$strip>>>;
744
+ cert: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>>;
745
+ entryPoint: import("zod").ZodOptional<import("zod").ZodString>;
746
+ audience: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
747
+ callbackUrl: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
748
+ wantAssertionsSigned: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodBoolean>>;
749
+ authnRequestsSigned: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodBoolean>>;
750
+ signatureAlgorithm: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
751
+ digestAlgorithm: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
752
+ identifierFormat: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>;
753
+ idpInitiatedCallbackUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
754
+ idpMetadata: import("zod").ZodOptional<import("zod").ZodObject<{
755
+ cert: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>;
756
+ privateKey: import("zod").ZodOptional<import("zod").ZodString>;
757
+ privateKeyPass: import("zod").ZodOptional<import("zod").ZodString>;
758
+ isAssertionEncrypted: import("zod").ZodOptional<import("zod").ZodBoolean>;
759
+ encPrivateKey: import("zod").ZodOptional<import("zod").ZodString>;
760
+ encPrivateKeyPass: import("zod").ZodOptional<import("zod").ZodString>;
761
+ singleSignOnService: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
762
+ Binding: import("zod").ZodString;
763
+ Location: import("zod").ZodString;
764
+ }, import("zod/v4/core").$strip>>>;
765
+ singleLogoutService: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
766
+ Binding: import("zod").ZodString;
767
+ Location: import("zod").ZodString;
768
+ }, import("zod/v4/core").$strip>>>;
769
+ metadata: import("zod").ZodOptional<import("zod").ZodString>;
770
+ entityID: import("zod").ZodOptional<import("zod").ZodString>;
771
+ }, import("zod/v4/core").$strip>>;
772
+ }, import("zod/v4/core").$strip>>;
773
+ providerId: import("zod").ZodString;
774
+ }, import("zod/v4/core").$strip>;
775
+ metadata: {
776
+ openapi: {
777
+ operationId: string;
778
+ summary: string;
779
+ description: string;
780
+ responses: {
781
+ "200": {
782
+ description: string;
783
+ };
784
+ "404": {
785
+ description: string;
786
+ };
787
+ "403": {
788
+ description: string;
789
+ };
790
+ };
791
+ };
792
+ };
793
+ }, {
794
+ providerId: string;
795
+ type: string;
796
+ issuer: string;
797
+ domain: string;
798
+ organizationId: string | null;
799
+ domainVerified: boolean;
800
+ oidcConfig: {
801
+ discoveryEndpoint: string;
802
+ clientIdLastFour: string;
803
+ pkce: boolean;
804
+ authorizationEndpoint: string | undefined;
805
+ tokenEndpoint: string | undefined;
806
+ userInfoEndpoint: string | undefined;
807
+ jwksEndpoint: string | undefined;
808
+ scopes: string[] | undefined;
809
+ tokenEndpointAuthentication: "client_secret_post" | "client_secret_basic" | "private_key_jwt" | undefined;
810
+ } | undefined;
811
+ samlConfig: {
812
+ entryPoint: string;
813
+ callbackUrl: string | undefined;
814
+ idpInitiatedCallbackUrl: string | undefined;
815
+ audience: string | undefined;
816
+ wantAssertionsSigned: boolean | undefined;
817
+ authnRequestsSigned: boolean | undefined;
818
+ identifierFormat: string | undefined;
819
+ signatureAlgorithm: string | undefined;
820
+ digestAlgorithm: string | undefined;
821
+ certificate: ({
822
+ fingerprintSha256: string;
823
+ notBefore: string;
824
+ notAfter: string;
825
+ publicKeyAlgorithm: string;
826
+ } | {
827
+ error: string;
828
+ })[] | undefined;
829
+ } | undefined;
830
+ spMetadataUrl: string;
831
+ }>>;
832
+ deleteSSOProvider: ReturnType<(options?: import("@better-auth/sso").SSOOptions) => import("better-call").StrictEndpoint<"/sso/delete-provider", {
833
+ method: "POST";
834
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
835
+ session: {
836
+ session: Record<string, any> & {
837
+ id: string;
838
+ createdAt: Date;
839
+ updatedAt: Date;
840
+ userId: string;
841
+ expiresAt: Date;
842
+ token: string;
843
+ ipAddress?: string | null | undefined;
844
+ userAgent?: string | null | undefined;
845
+ };
846
+ user: Record<string, any> & {
847
+ id: string;
848
+ createdAt: Date;
849
+ updatedAt: Date;
850
+ email: string;
851
+ emailVerified: boolean;
852
+ name: string;
853
+ image?: string | null | undefined;
854
+ };
855
+ };
856
+ }>>[];
857
+ body: import("zod").ZodObject<{
858
+ providerId: import("zod").ZodString;
859
+ }, import("zod/v4/core").$strip>;
860
+ metadata: {
861
+ openapi: {
862
+ operationId: string;
863
+ summary: string;
864
+ description: string;
865
+ responses: {
866
+ "200": {
867
+ description: string;
868
+ };
869
+ "404": {
870
+ description: string;
871
+ };
872
+ "403": {
873
+ description: string;
874
+ };
875
+ };
876
+ };
877
+ };
878
+ }, {
879
+ success: boolean;
880
+ }>>;
881
+ };
882
+ schema: {
883
+ ssoProvider: {
884
+ modelName: string;
885
+ fields: Record<string, import("better-auth").DBFieldAttribute>;
886
+ };
887
+ };
888
+ $Infer: {
889
+ SSOProvider: {
890
+ issuer: string;
891
+ oidcConfig?: import("@better-auth/sso").OIDCConfig | undefined;
892
+ samlConfig?: import("@better-auth/sso").SAMLConfig | undefined;
893
+ userId: string;
894
+ providerId: string;
895
+ organizationId?: string | undefined;
896
+ domain: string;
897
+ };
898
+ };
899
+ options: NoInfer<{
900
+ resolveUser?: ((input: import("@better-auth/sso").SSOUserResolutionInput, context: import("@better-auth/sso").SSOUserResolutionContext) => import("better-auth").Awaitable<import("@better-auth/sso").SSOUserResolution>) | undefined;
901
+ guardProviderMutation?: ((input: import("@better-auth/sso").SSOProviderMutationGuardInput, context: import("@better-auth/sso").SSOProviderMutationGuardContext) => import("better-auth").Awaitable<void>) | undefined;
902
+ provisionUserOnEveryLogin?: boolean;
903
+ organizationProvisioning?: {
904
+ disabled?: boolean;
905
+ defaultRole?: "member" | "admin";
906
+ getRole?: (data: {
907
+ user: import("better-auth").User & Record<string, any>;
908
+ userInfo: Record<string, any>;
909
+ token?: import("better-auth").OAuth2Tokens;
910
+ provider: import("@better-auth/sso").SSOProvider<import("@better-auth/sso").SSOOptions>;
911
+ }) => Promise<"member" | "admin">;
912
+ } | undefined;
913
+ defaultSSO?: Array<{
914
+ domain: string;
915
+ providerId: string;
916
+ samlConfig?: import("@better-auth/sso").SAMLConfig;
917
+ oidcConfig?: import("@better-auth/sso").OIDCConfig;
918
+ privateKey?: {
919
+ privateKeyJwk?: JsonWebKey;
920
+ privateKeyPem?: string;
921
+ };
922
+ }> | undefined;
923
+ defaultOverrideUserInfo?: boolean | undefined;
924
+ disableImplicitSignUp?: boolean | undefined;
925
+ modelName?: string;
926
+ fields?: {
927
+ issuer?: string | undefined;
928
+ oidcConfig?: string | undefined;
929
+ samlConfig?: string | undefined;
930
+ userId?: string | undefined;
931
+ providerId?: string | undefined;
932
+ organizationId?: string | undefined;
933
+ domain?: string | undefined;
934
+ };
935
+ schema?: {
936
+ ssoProvider?: {
937
+ modelName?: string | undefined;
938
+ fields?: {
939
+ issuer?: string | undefined;
940
+ oidcConfig?: string | undefined;
941
+ samlConfig?: string | undefined;
942
+ userId?: string | undefined;
943
+ providerId?: string | undefined;
944
+ organizationId?: string | undefined;
945
+ domain?: string | undefined;
946
+ domainVerified?: string | undefined;
947
+ };
948
+ additionalFields?: { [key in string]: import("better-auth").DBFieldAttribute; };
949
+ };
950
+ } | undefined;
951
+ domainVerification?: {
952
+ enabled?: boolean;
953
+ tokenPrefix?: string;
954
+ };
955
+ redirectURI?: string;
956
+ resolvePrivateKey?: (params: {
957
+ providerId: string;
958
+ keyId?: string;
959
+ issuer: string;
960
+ }) => Promise<{
961
+ privateKeyJwk?: JsonWebKey;
962
+ privateKeyPem?: string;
963
+ kid?: string;
964
+ algorithm?: string;
965
+ }>;
966
+ saml?: {
967
+ enableInResponseToValidation?: boolean;
968
+ allowIdpInitiated?: boolean;
969
+ requestTTL?: number;
970
+ clockSkew?: number;
971
+ requireTimestamps?: boolean;
972
+ algorithms?: import("@better-auth/sso").AlgorithmValidationOptions;
973
+ maxResponseSize?: number;
974
+ maxMetadataSize?: number;
975
+ enableSingleLogout?: boolean;
976
+ logoutRequestTTL?: number;
977
+ wantLogoutRequestSigned?: boolean;
978
+ wantLogoutResponseSigned?: boolean;
979
+ idpInitiatedCallbackUrl?: string | undefined;
980
+ };
981
+ provisionUser: (data: {
982
+ user: import("better-auth").User & Record<string, any>;
983
+ userInfo: Record<string, any>;
984
+ token?: import("better-auth").OAuth2Tokens;
985
+ provider: import("@better-auth/sso").SSOProvider<import("@better-auth/sso").SSOOptions>;
986
+ }) => Promise<void>;
987
+ providersLimit: number;
988
+ trustEmailVerified: true;
989
+ }>;
990
+ } | {
991
+ id: "oidc-pairing";
992
+ schema: {
993
+ ssoProvider: {
994
+ fields: {
995
+ readonly name: {
996
+ readonly type: 'string';
997
+ readonly required: false;
998
+ };
999
+ readonly source: {
1000
+ readonly type: 'string';
1001
+ readonly required: false;
1002
+ };
1003
+ readonly registrationAccessToken: {
1004
+ readonly type: 'string';
1005
+ readonly required: false;
1006
+ readonly returned: false;
1007
+ };
1008
+ readonly registrationClientUri: {
1009
+ readonly type: 'string';
1010
+ readonly required: false;
1011
+ readonly returned: false;
1012
+ };
1013
+ };
1014
+ };
1015
+ };
1016
+ init: (context: import("better-auth").AuthContext) => {
1017
+ options: {
1018
+ trustedOrigins: () => Promise<string[]>;
1019
+ account: {
1020
+ accountLinking: {
1021
+ requireLocalEmailVerified: false;
1022
+ };
1023
+ };
1024
+ };
1025
+ };
1026
+ hooks: {
1027
+ after: {
1028
+ matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
1029
+ handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
1030
+ }[];
1031
+ };
1032
+ endpoints: {
1033
+ startOidcSignIn: import("better-call").StrictEndpoint<"/oidc-pairing/sign-in/:providerId", {
1034
+ method: "GET";
1035
+ }, Response>;
1036
+ verifyOidcSignIn: import("better-call").StrictEndpoint<"/oidc-pairing/verify", {
1037
+ method: "POST";
1038
+ body: import("zod").ZodObject<{
1039
+ token: import("zod").ZodString;
1040
+ }, import("zod/v4/core").$strip>;
1041
+ metadata: {
1042
+ openapi: {
1043
+ description: string;
1044
+ responses: {
1045
+ '200': {
1046
+ description: string;
1047
+ content: {
1048
+ 'application/json': {
1049
+ schema: Record<string, unknown>;
1050
+ };
1051
+ };
1052
+ };
1053
+ };
1054
+ };
1055
+ };
1056
+ }, {
1057
+ token: string;
1058
+ userId: string;
1059
+ }>;
1060
+ listOidcProviders: import("better-call").StrictEndpoint<"/oidc-pairing/providers", {
1061
+ method: "GET";
1062
+ metadata: {
1063
+ openapi: {
1064
+ description: string;
1065
+ responses: {
1066
+ '200': {
1067
+ description: string;
1068
+ content: {
1069
+ 'application/json': {
1070
+ schema: Record<string, unknown>;
1071
+ };
1072
+ };
1073
+ };
1074
+ };
1075
+ };
1076
+ };
1077
+ }, {
1078
+ canPair: boolean;
1079
+ providers: import("@cubicecho/better-auth-oidc-pairing").ProviderSummary[];
1080
+ }>;
1081
+ pairOidcProvider: import("better-call").StrictEndpoint<"/oidc-pairing/pair", {
1082
+ method: "POST";
1083
+ body: import("zod").ZodObject<{
1084
+ setupUrl: import("zod").ZodString;
1085
+ }, import("zod/v4/core").$strip>;
1086
+ metadata: {
1087
+ openapi: {
1088
+ description: string;
1089
+ responses: {
1090
+ '200': {
1091
+ description: string;
1092
+ content: {
1093
+ 'application/json': {
1094
+ schema: Record<string, unknown>;
1095
+ };
1096
+ };
1097
+ };
1098
+ };
1099
+ };
1100
+ };
1101
+ }, {
1102
+ providerId: string;
1103
+ name: string;
1104
+ source: "paired";
1105
+ issuer: string;
1106
+ }>;
1107
+ unpairOidcProvider: import("better-call").StrictEndpoint<"/oidc-pairing/unpair", {
1108
+ method: "POST";
1109
+ body: import("zod").ZodObject<{
1110
+ providerId: import("zod").ZodString;
1111
+ }, import("zod/v4/core").$strip>;
1112
+ metadata: {
1113
+ openapi: {
1114
+ description: string;
1115
+ responses: {
1116
+ '200': {
1117
+ description: string;
1118
+ content: {
1119
+ 'application/json': {
1120
+ schema: Record<string, unknown>;
1121
+ };
1122
+ };
1123
+ };
1124
+ };
1125
+ };
1126
+ };
1127
+ }, {
1128
+ providerId: string;
1129
+ deletedAtProvider: import("@cubicecho/better-auth-oidc-pairing").DeleteOutcome;
1130
+ }>;
1131
+ };
1132
+ } | {
1133
+ id: "bearer";
1134
+ version: string;
1135
+ hooks: {
1136
+ before: {
1137
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
1138
+ handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
1139
+ context: {
1140
+ headers: Headers;
1141
+ };
1142
+ } | undefined>>;
1143
+ }[];
1144
+ after: {
1145
+ matcher(context: import("better-auth").HookEndpointContext): true;
1146
+ handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
1147
+ }[];
1148
+ };
1149
+ options: import("better-auth/plugins").BearerOptions | undefined;
1150
+ } | {
1151
+ id: "magic-link";
1152
+ version: string;
1153
+ endpoints: {
1154
+ signInMagicLink: import("better-call").StrictEndpoint<"/sign-in/magic-link", {
1155
+ method: "POST";
1156
+ requireHeaders: true;
1157
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
1158
+ body: import("zod").ZodObject<{
1159
+ email: import("zod").ZodEmail;
1160
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1161
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1162
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1163
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1164
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
1165
+ }, import("zod/v4/core").$strip>;
1166
+ metadata: {
1167
+ openapi: {
1168
+ operationId: string;
1169
+ description: string;
1170
+ responses: {
1171
+ 200: {
1172
+ description: string;
1173
+ content: {
1174
+ "application/json": {
1175
+ schema: {
1176
+ type: "object";
1177
+ properties: {
1178
+ status: {
1179
+ type: string;
1180
+ };
1181
+ };
1182
+ };
1183
+ };
1184
+ };
1185
+ };
1186
+ };
1187
+ };
1188
+ };
1189
+ }, {
1190
+ status: boolean;
1191
+ }>;
1192
+ magicLinkVerify: import("better-call").StrictEndpoint<"/magic-link/verify", {
1193
+ method: "GET";
1194
+ query: import("zod").ZodObject<{
1195
+ token: import("zod").ZodString;
1196
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1197
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1198
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1199
+ }, import("zod/v4/core").$strip>;
1200
+ use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>[];
1201
+ requireHeaders: true;
1202
+ metadata: {
1203
+ openapi: {
1204
+ operationId: string;
1205
+ description: string;
1206
+ responses: {
1207
+ 200: {
1208
+ description: string;
1209
+ content: {
1210
+ "application/json": {
1211
+ schema: {
1212
+ type: "object";
1213
+ properties: {
1214
+ session: {
1215
+ $ref: string;
1216
+ };
1217
+ user: {
1218
+ $ref: string;
1219
+ };
1220
+ };
1221
+ };
1222
+ };
1223
+ };
1224
+ };
1225
+ };
1226
+ };
1227
+ };
1228
+ }, {
1229
+ token: string;
1230
+ user: {
1231
+ id: string;
1232
+ createdAt: Date;
1233
+ updatedAt: Date;
1234
+ email: string;
1235
+ emailVerified: boolean;
1236
+ name: string;
1237
+ image?: string | null | undefined;
1238
+ };
1239
+ session: {
1240
+ id: string;
1241
+ createdAt: Date;
1242
+ updatedAt: Date;
1243
+ userId: string;
1244
+ expiresAt: Date;
1245
+ token: string;
1246
+ ipAddress?: string | null | undefined;
1247
+ userAgent?: string | null | undefined;
1248
+ };
1249
+ }>;
1250
+ };
1251
+ rateLimit: {
1252
+ pathMatcher(path: string): boolean;
1253
+ window: number;
1254
+ max: number;
1255
+ }[];
1256
+ options: import("better-auth/plugins").MagicLinkOptions;
1257
+ })[];
1258
+ /**
1259
+ * Whether an instance emails sign-in links.
1260
+ *
1261
+ * @param auth - The auth instance.
1262
+ * @returns true when it was built with a way to deliver them.
1263
+ */
1264
+ export declare function sendsMagicLinks(auth: {
1265
+ options: {
1266
+ plugins?: readonly {
1267
+ id: string;
1268
+ }[];
1269
+ };
1270
+ }): boolean;