@zgeoff/mcp-auth 0.4.0 → 0.5.1

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,4 @@
1
- import type { BetterAuthPlugin } from 'better-auth';
1
+ import type { OAuthOptions, Scope as ProviderScope } from '@better-auth/oauth-provider';
2
2
  import type { Kysely } from 'kysely';
3
3
  import type { MCPAuthPaths } from '../types.ts';
4
4
  import type { StoreSchema } from './store-schema.ts';
@@ -71,7 +71,2562 @@ export declare function createAuthServer(options: AuthServerOptions): import("be
71
71
  };
72
72
  };
73
73
  };
74
- plugins: [BetterAuthPlugin, {
74
+ plugins: [{
75
+ id: "oauth-provider";
76
+ version: string;
77
+ options: NoInfer<OAuthOptions<ProviderScope[]>>;
78
+ onRequest: (request: Request, ctx: import("better-auth").AuthContext) => Promise<{
79
+ response: Response;
80
+ } | {
81
+ request: Request;
82
+ } | void>;
83
+ init: (ctx: import("better-auth").AuthContext) => Promise<{
84
+ options: {
85
+ databaseHooks: {
86
+ session: {
87
+ delete: {
88
+ before(session: {
89
+ id: string;
90
+ createdAt: Date;
91
+ updatedAt: Date;
92
+ userId: string;
93
+ expiresAt: Date;
94
+ token: string;
95
+ ipAddress?: string | null | undefined;
96
+ userAgent?: string | null | undefined;
97
+ } & Record<string, unknown>, hookCtx: import("better-auth").GenericEndpointContext | null): Promise<void>;
98
+ after(session: {
99
+ id: string;
100
+ createdAt: Date;
101
+ updatedAt: Date;
102
+ userId: string;
103
+ expiresAt: Date;
104
+ token: string;
105
+ ipAddress?: string | null | undefined;
106
+ userAgent?: string | null | undefined;
107
+ } & Record<string, unknown>, hookCtx: import("better-auth").GenericEndpointContext | null): Promise<void>;
108
+ };
109
+ };
110
+ };
111
+ };
112
+ }>;
113
+ hooks: {
114
+ before: {
115
+ matcher(ctx: import("better-auth").HookEndpointContext): any;
116
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>;
117
+ }[];
118
+ after: {
119
+ matcher(ctx: import("better-auth").HookEndpointContext): boolean;
120
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
121
+ redirect: true;
122
+ url: string;
123
+ } | undefined>>;
124
+ }[];
125
+ };
126
+ endpoints: {
127
+ getOAuthServerConfig: import("better-auth").StrictEndpoint<"/.well-known/oauth-authorization-server", {
128
+ method: "GET";
129
+ metadata: {
130
+ SERVER_ONLY: true;
131
+ };
132
+ }, import("@better-auth/oauth-provider").AuthServerMetadata>;
133
+ getOpenIdConfig: import("better-auth").StrictEndpoint<"/.well-known/openid-configuration", {
134
+ method: "GET";
135
+ metadata: {
136
+ SERVER_ONLY: true;
137
+ };
138
+ }, {
139
+ jwks_uri?: string | undefined;
140
+ userinfo_endpoint: string;
141
+ acr_values_supported?: string[] | undefined;
142
+ subject_types_supported: ("public" | "pairwise")[];
143
+ claims_supported: string[];
144
+ claims_parameter_supported?: boolean | undefined;
145
+ end_session_endpoint: string;
146
+ request_parameter_supported?: boolean | undefined;
147
+ request_uri_parameter_supported?: boolean | undefined;
148
+ prompt_values_supported: import("@better-auth/oauth-provider").Prompt[];
149
+ issuer: string;
150
+ authorization_endpoint: string;
151
+ token_endpoint: string;
152
+ registration_endpoint?: string | undefined;
153
+ scopes_supported?: string[] | undefined;
154
+ response_types_supported: "code"[];
155
+ response_modes_supported: "query"[];
156
+ grant_types_supported: import("@better-auth/oauth-provider").GrantType[];
157
+ token_endpoint_auth_methods_supported?: import("@better-auth/oauth-provider").TokenEndpointAuthMethod[] | undefined;
158
+ token_endpoint_auth_signing_alg_values_supported?: import("better-auth").PrivateKeyJwtSigningAlgorithm[] | undefined;
159
+ service_documentation?: string | undefined;
160
+ ui_locales_supported?: string[] | undefined;
161
+ op_policy_uri?: string | undefined;
162
+ op_tos_uri?: string | undefined;
163
+ revocation_endpoint?: string | undefined;
164
+ revocation_endpoint_auth_methods_supported?: import("@better-auth/oauth-provider").TokenEndpointAuthMethod[] | undefined;
165
+ revocation_endpoint_auth_signing_alg_values_supported?: import("better-auth").PrivateKeyJwtSigningAlgorithm[] | undefined;
166
+ introspection_endpoint?: string | undefined;
167
+ introspection_endpoint_auth_methods_supported?: import("@better-auth/oauth-provider").TokenEndpointAuthMethod[] | undefined;
168
+ introspection_endpoint_auth_signing_alg_values_supported?: import("better-auth").PrivateKeyJwtSigningAlgorithm[] | undefined;
169
+ code_challenge_methods_supported: "S256"[];
170
+ authorization_response_iss_parameter_supported?: boolean | undefined;
171
+ client_id_metadata_document_supported?: boolean | undefined;
172
+ backchannel_logout_supported?: boolean | undefined;
173
+ backchannel_logout_session_supported?: boolean | undefined;
174
+ dpop_signing_alg_values_supported?: import("better-auth/plugins").JWSAlgorithms[] | undefined;
175
+ id_token_signing_alg_values_supported: import("better-auth/plugins").JWSAlgorithms[] | ["HS256"];
176
+ }>;
177
+ oauth2Authorize: import("better-auth").StrictEndpoint<"/oauth2/authorize", {
178
+ method: ("GET" | "POST")[];
179
+ body: import("zod").ZodObject<{}, import("zod/v4/core").$loose>;
180
+ redirectOnError: import("@better-auth/oauth-provider").OAuthRedirectOnError<import("better-auth").GenericEndpointContext, {
181
+ redirect: true;
182
+ url: string;
183
+ }>;
184
+ metadata: {
185
+ allowedMediaTypes: string[];
186
+ openapi: {
187
+ description: string;
188
+ parameters: ({
189
+ name: string;
190
+ in: "query";
191
+ required: false;
192
+ schema: {
193
+ type: "string";
194
+ format?: undefined;
195
+ minimum?: undefined;
196
+ items?: undefined;
197
+ };
198
+ description: string;
199
+ } | {
200
+ name: string;
201
+ in: "query";
202
+ required: true;
203
+ schema: {
204
+ type: "string";
205
+ format?: undefined;
206
+ minimum?: undefined;
207
+ items?: undefined;
208
+ };
209
+ description: string;
210
+ } | {
211
+ name: string;
212
+ in: "query";
213
+ required: false;
214
+ schema: {
215
+ type: "string";
216
+ format: string;
217
+ minimum?: undefined;
218
+ items?: undefined;
219
+ };
220
+ description: string;
221
+ } | {
222
+ name: string;
223
+ in: "query";
224
+ required: false;
225
+ schema: {
226
+ type: "integer";
227
+ minimum: number;
228
+ format?: undefined;
229
+ items?: undefined;
230
+ };
231
+ description: string;
232
+ } | {
233
+ name: string;
234
+ in: "query";
235
+ required: false;
236
+ schema: {
237
+ type: "array";
238
+ items: {
239
+ type: "string";
240
+ };
241
+ format?: undefined;
242
+ minimum?: undefined;
243
+ };
244
+ description: string;
245
+ })[];
246
+ responses: {
247
+ "302": {
248
+ description: string;
249
+ headers: {
250
+ Location: {
251
+ description: string;
252
+ schema: {
253
+ type: string;
254
+ format: string;
255
+ };
256
+ };
257
+ };
258
+ };
259
+ "400": {
260
+ description: string;
261
+ content: {
262
+ "application/json": {
263
+ schema: {
264
+ type: "object";
265
+ properties: {
266
+ error: {
267
+ type: string;
268
+ };
269
+ error_description: {
270
+ type: string;
271
+ };
272
+ state: {
273
+ type: string;
274
+ };
275
+ };
276
+ required: string[];
277
+ };
278
+ };
279
+ };
280
+ };
281
+ };
282
+ };
283
+ };
284
+ }, {
285
+ redirect: true;
286
+ url: string;
287
+ }>;
288
+ oauth2Consent: import("better-auth").StrictEndpoint<"/oauth2/consent", {
289
+ method: "POST";
290
+ body: import("zod").ZodObject<{
291
+ accept: import("zod").ZodBoolean;
292
+ scope: import("zod").ZodOptional<import("zod").ZodString>;
293
+ claims: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>]>>;
294
+ oauth_query: import("zod").ZodOptional<import("zod").ZodString>;
295
+ }, import("zod/v4/core").$strip>;
296
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
297
+ session: {
298
+ session: Record<string, any> & {
299
+ id: string;
300
+ createdAt: Date;
301
+ updatedAt: Date;
302
+ userId: string;
303
+ expiresAt: Date;
304
+ token: string;
305
+ ipAddress?: string | null | undefined;
306
+ userAgent?: string | null | undefined;
307
+ };
308
+ user: Record<string, any> & {
309
+ id: string;
310
+ createdAt: Date;
311
+ updatedAt: Date;
312
+ email: string;
313
+ emailVerified: boolean;
314
+ name: string;
315
+ image?: string | null | undefined;
316
+ };
317
+ };
318
+ }>>[];
319
+ metadata: {
320
+ openapi: {
321
+ description: string;
322
+ responses: {
323
+ "200": {
324
+ description: string;
325
+ content: {
326
+ "application/json": {
327
+ schema: {
328
+ type: "object";
329
+ properties: {
330
+ redirect: {
331
+ type: string;
332
+ description: string;
333
+ enum: boolean[];
334
+ };
335
+ url: {
336
+ type: string;
337
+ format: string;
338
+ description: string;
339
+ };
340
+ };
341
+ required: string[];
342
+ };
343
+ };
344
+ };
345
+ };
346
+ };
347
+ };
348
+ };
349
+ }, {
350
+ redirect: true;
351
+ url: string;
352
+ } | {
353
+ redirect: boolean;
354
+ url: string;
355
+ }>;
356
+ oauth2Continue: import("better-auth").StrictEndpoint<"/oauth2/continue", {
357
+ method: "POST";
358
+ body: import("zod").ZodObject<{
359
+ selected: import("zod").ZodOptional<import("zod").ZodBoolean>;
360
+ created: import("zod").ZodOptional<import("zod").ZodBoolean>;
361
+ postLogin: import("zod").ZodOptional<import("zod").ZodBoolean>;
362
+ oauth_query: import("zod").ZodOptional<import("zod").ZodString>;
363
+ }, import("zod/v4/core").$strip>;
364
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
365
+ session: {
366
+ session: Record<string, any> & {
367
+ id: string;
368
+ createdAt: Date;
369
+ updatedAt: Date;
370
+ userId: string;
371
+ expiresAt: Date;
372
+ token: string;
373
+ ipAddress?: string | null | undefined;
374
+ userAgent?: string | null | undefined;
375
+ };
376
+ user: Record<string, any> & {
377
+ id: string;
378
+ createdAt: Date;
379
+ updatedAt: Date;
380
+ email: string;
381
+ emailVerified: boolean;
382
+ name: string;
383
+ image?: string | null | undefined;
384
+ };
385
+ };
386
+ }>>[];
387
+ metadata: {
388
+ openapi: {
389
+ description: string;
390
+ responses: {
391
+ "200": {
392
+ description: string;
393
+ content: {
394
+ "application/json": {
395
+ schema: {
396
+ type: "object";
397
+ properties: {
398
+ redirect: {
399
+ type: string;
400
+ description: string;
401
+ enum: boolean[];
402
+ };
403
+ url: {
404
+ type: string;
405
+ format: string;
406
+ description: string;
407
+ };
408
+ };
409
+ required: string[];
410
+ };
411
+ };
412
+ };
413
+ };
414
+ };
415
+ };
416
+ };
417
+ }, {
418
+ redirect: true;
419
+ url: string;
420
+ }>;
421
+ oauth2Token: import("better-auth").StrictEndpoint<"/oauth2/token", {
422
+ method: "POST";
423
+ cloneRequest: true;
424
+ body: import("zod").ZodObject<{
425
+ grant_type: import("zod").ZodString;
426
+ client_id: import("zod").ZodOptional<import("zod").ZodString>;
427
+ client_secret: import("zod").ZodOptional<import("zod").ZodString>;
428
+ client_assertion: import("zod").ZodOptional<import("zod").ZodString>;
429
+ client_assertion_type: import("zod").ZodOptional<import("zod").ZodString>;
430
+ code: import("zod").ZodOptional<import("zod").ZodString>;
431
+ code_verifier: import("zod").ZodOptional<import("zod").ZodString>;
432
+ redirect_uri: import("zod").ZodOptional<import("zod").ZodURL>;
433
+ refresh_token: import("zod").ZodOptional<import("zod").ZodString>;
434
+ resource: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString>]>>;
435
+ scope: import("zod").ZodOptional<import("zod").ZodString>;
436
+ }, import("zod/v4/core").$loose>;
437
+ errorCodesByField: {
438
+ grant_type: {
439
+ missing: "invalid_request";
440
+ invalid: "unsupported_grant_type";
441
+ };
442
+ resource: {
443
+ invalid: "invalid_target";
444
+ };
445
+ };
446
+ metadata: {
447
+ noStore: boolean;
448
+ allowedMediaTypes: string[];
449
+ openapi: {
450
+ description: string;
451
+ parameters: {
452
+ name: string;
453
+ in: "header";
454
+ required: false;
455
+ schema: {
456
+ type: "string";
457
+ };
458
+ description: string;
459
+ }[];
460
+ requestBody: {
461
+ required: boolean;
462
+ content: {
463
+ "application/json": {
464
+ schema: {
465
+ type: "object";
466
+ properties: {
467
+ grant_type: {
468
+ type: string;
469
+ description: string;
470
+ };
471
+ client_id: {
472
+ type: string;
473
+ description: string;
474
+ };
475
+ client_secret: {
476
+ type: string;
477
+ description: string;
478
+ };
479
+ code: {
480
+ type: string;
481
+ description: string;
482
+ };
483
+ code_verifier: {
484
+ type: string;
485
+ description: string;
486
+ };
487
+ redirect_uri: {
488
+ type: string;
489
+ format: string;
490
+ description: string;
491
+ };
492
+ refresh_token: {
493
+ type: string;
494
+ description: string;
495
+ };
496
+ resource: {
497
+ oneOf: ({
498
+ type: string;
499
+ description: string;
500
+ items?: undefined;
501
+ } | {
502
+ type: string;
503
+ items: {
504
+ type: string;
505
+ };
506
+ description: string;
507
+ })[];
508
+ description: string;
509
+ };
510
+ scope: {
511
+ type: string;
512
+ description: string;
513
+ };
514
+ };
515
+ required: string[];
516
+ };
517
+ };
518
+ };
519
+ };
520
+ responses: {
521
+ "200": {
522
+ description: string;
523
+ content: {
524
+ "application/json": {
525
+ schema: {
526
+ type: "object";
527
+ properties: {
528
+ access_token: {
529
+ type: string;
530
+ description: string;
531
+ };
532
+ token_type: {
533
+ type: string;
534
+ description: string;
535
+ enum: string[];
536
+ };
537
+ expires_in: {
538
+ type: string;
539
+ description: string;
540
+ };
541
+ refresh_token: {
542
+ type: string;
543
+ description: string;
544
+ };
545
+ scope: {
546
+ type: string;
547
+ description: string;
548
+ };
549
+ id_token: {
550
+ type: string;
551
+ description: string;
552
+ };
553
+ };
554
+ required: string[];
555
+ };
556
+ };
557
+ };
558
+ };
559
+ "400": {
560
+ description: string;
561
+ content: {
562
+ "application/json": {
563
+ schema: {
564
+ type: "object";
565
+ properties: {
566
+ error: {
567
+ type: string;
568
+ };
569
+ error_description: {
570
+ type: string;
571
+ };
572
+ error_uri: {
573
+ type: string;
574
+ };
575
+ };
576
+ required: string[];
577
+ };
578
+ };
579
+ };
580
+ };
581
+ };
582
+ };
583
+ };
584
+ }, {
585
+ expires_in: number;
586
+ access_token: string;
587
+ expires_at: number;
588
+ token_type: import("@better-auth/oauth-provider").TokenType;
589
+ refresh_token: string | undefined;
590
+ scope: string;
591
+ id_token: string | undefined;
592
+ }>;
593
+ oauth2Introspect: import("better-auth").StrictEndpoint<"/oauth2/introspect", {
594
+ method: "POST";
595
+ cloneRequest: true;
596
+ body: import("zod").ZodObject<{
597
+ client_id: import("zod").ZodOptional<import("zod").ZodString>;
598
+ client_secret: import("zod").ZodOptional<import("zod").ZodString>;
599
+ client_assertion: import("zod").ZodOptional<import("zod").ZodString>;
600
+ client_assertion_type: import("zod").ZodOptional<import("zod").ZodString>;
601
+ token: import("zod").ZodString;
602
+ token_type_hint: import("zod").ZodOptional<import("zod").ZodString>;
603
+ }, import("zod/v4/core").$strip>;
604
+ metadata: {
605
+ noStore: boolean;
606
+ allowedMediaTypes: string[];
607
+ openapi: {
608
+ description: string;
609
+ requestBody: {
610
+ required: boolean;
611
+ content: {
612
+ "application/json": {
613
+ schema: {
614
+ type: "object";
615
+ properties: {
616
+ client_id: {
617
+ type: string;
618
+ description: string;
619
+ };
620
+ client_secret: {
621
+ type: string;
622
+ description: string;
623
+ };
624
+ token: {
625
+ type: string;
626
+ description: string;
627
+ };
628
+ token_type_hint: {
629
+ type: string;
630
+ description: string;
631
+ };
632
+ };
633
+ required: string[];
634
+ };
635
+ };
636
+ };
637
+ };
638
+ responses: {
639
+ "200": {
640
+ description: string;
641
+ content: {
642
+ "application/json": {
643
+ schema: {
644
+ type: "object";
645
+ properties: {
646
+ active: {
647
+ type: string;
648
+ description: string;
649
+ };
650
+ scope: {
651
+ type: string;
652
+ description: string;
653
+ };
654
+ client_id: {
655
+ type: string;
656
+ description: string;
657
+ };
658
+ username: {
659
+ type: string;
660
+ description: string;
661
+ };
662
+ token_type: {
663
+ type: string;
664
+ description: string;
665
+ };
666
+ exp: {
667
+ type: string;
668
+ description: string;
669
+ };
670
+ iat: {
671
+ type: string;
672
+ description: string;
673
+ };
674
+ nbf: {
675
+ type: string;
676
+ description: string;
677
+ };
678
+ sub: {
679
+ type: string;
680
+ description: string;
681
+ };
682
+ aud: {
683
+ type: string;
684
+ description: string;
685
+ };
686
+ iss: {
687
+ type: string;
688
+ description: string;
689
+ };
690
+ jti: {
691
+ type: string;
692
+ description: string;
693
+ };
694
+ };
695
+ required: string[];
696
+ };
697
+ };
698
+ };
699
+ };
700
+ "400": {
701
+ description: string;
702
+ content: {
703
+ "application/json": {
704
+ schema: {
705
+ type: "object";
706
+ properties: {
707
+ error: {
708
+ type: string;
709
+ };
710
+ error_description: {
711
+ type: string;
712
+ };
713
+ error_uri: {
714
+ type: string;
715
+ };
716
+ };
717
+ required: string[];
718
+ };
719
+ };
720
+ };
721
+ };
722
+ };
723
+ };
724
+ };
725
+ }, import("better-auth").JWTPayload>;
726
+ oauth2Revoke: import("better-auth").StrictEndpoint<"/oauth2/revoke", {
727
+ method: "POST";
728
+ cloneRequest: true;
729
+ body: import("zod").ZodObject<{
730
+ client_id: import("zod").ZodOptional<import("zod").ZodString>;
731
+ client_secret: import("zod").ZodOptional<import("zod").ZodString>;
732
+ client_assertion: import("zod").ZodOptional<import("zod").ZodString>;
733
+ client_assertion_type: import("zod").ZodOptional<import("zod").ZodString>;
734
+ token: import("zod").ZodString;
735
+ token_type_hint: import("zod").ZodOptional<import("zod").ZodString>;
736
+ }, import("zod/v4/core").$strip>;
737
+ metadata: {
738
+ allowedMediaTypes: string[];
739
+ openapi: {
740
+ description: string;
741
+ requestBody: {
742
+ required: boolean;
743
+ content: {
744
+ "application/json": {
745
+ schema: {
746
+ type: "object";
747
+ properties: {
748
+ client_id: {
749
+ type: string;
750
+ description: string;
751
+ };
752
+ client_secret: {
753
+ type: string;
754
+ description: string;
755
+ };
756
+ token: {
757
+ type: string;
758
+ description: string;
759
+ };
760
+ token_type_hint: {
761
+ type: string;
762
+ description: string;
763
+ };
764
+ };
765
+ required: string[];
766
+ };
767
+ };
768
+ };
769
+ };
770
+ responses: {
771
+ "200": {
772
+ description: string;
773
+ content: {
774
+ "application/json": {
775
+ schema: {
776
+ type: "object";
777
+ description: string;
778
+ };
779
+ };
780
+ };
781
+ };
782
+ "400": {
783
+ description: string;
784
+ content: {
785
+ "application/json": {
786
+ schema: {
787
+ type: "object";
788
+ properties: {
789
+ error: {
790
+ type: string;
791
+ };
792
+ error_description: {
793
+ type: string;
794
+ };
795
+ error_uri: {
796
+ type: string;
797
+ };
798
+ };
799
+ required: string[];
800
+ };
801
+ };
802
+ };
803
+ };
804
+ };
805
+ };
806
+ };
807
+ }, null | undefined>;
808
+ oauth2UserInfo: import("better-auth").StrictEndpoint<"/oauth2/userinfo", {
809
+ method: ("GET" | "POST")[];
810
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
811
+ access_token: import("zod").ZodOptional<import("zod").ZodString>;
812
+ }, import("zod/v4/core").$loose>>;
813
+ metadata: {
814
+ noStore: boolean;
815
+ allowedMediaTypes: string[];
816
+ openapi: {
817
+ description: string;
818
+ security: ({
819
+ bearerAuth: never[];
820
+ OAuth2?: undefined;
821
+ } | {
822
+ OAuth2: string[];
823
+ bearerAuth?: undefined;
824
+ })[];
825
+ parameters: {
826
+ name: string;
827
+ in: "header";
828
+ required: false;
829
+ schema: {
830
+ type: "string";
831
+ };
832
+ description: string;
833
+ }[];
834
+ responses: {
835
+ "200": {
836
+ description: string;
837
+ content: {
838
+ "application/json": {
839
+ schema: {
840
+ type: "object";
841
+ properties: {
842
+ sub: {
843
+ type: string;
844
+ description: string;
845
+ };
846
+ email: {
847
+ type: string;
848
+ format: string;
849
+ nullable: boolean;
850
+ description: string;
851
+ };
852
+ name: {
853
+ type: string;
854
+ nullable: boolean;
855
+ description: string;
856
+ };
857
+ picture: {
858
+ type: string;
859
+ format: string;
860
+ nullable: boolean;
861
+ description: string;
862
+ };
863
+ given_name: {
864
+ type: string;
865
+ nullable: boolean;
866
+ description: string;
867
+ };
868
+ family_name: {
869
+ type: string;
870
+ nullable: boolean;
871
+ description: string;
872
+ };
873
+ email_verified: {
874
+ type: string;
875
+ nullable: boolean;
876
+ description: string;
877
+ };
878
+ };
879
+ required: string[];
880
+ };
881
+ };
882
+ };
883
+ };
884
+ "401": {
885
+ description: string;
886
+ content: {
887
+ "application/json": {
888
+ schema: {
889
+ type: "object";
890
+ properties: {
891
+ error: {
892
+ type: string;
893
+ };
894
+ error_description: {
895
+ type: string;
896
+ };
897
+ };
898
+ required: string[];
899
+ };
900
+ };
901
+ };
902
+ };
903
+ "403": {
904
+ description: string;
905
+ content: {
906
+ "application/json": {
907
+ schema: {
908
+ type: "object";
909
+ properties: {
910
+ error: {
911
+ type: string;
912
+ };
913
+ error_description: {
914
+ type: string;
915
+ };
916
+ };
917
+ required: string[];
918
+ };
919
+ };
920
+ };
921
+ };
922
+ };
923
+ };
924
+ };
925
+ }, {
926
+ sub: unknown;
927
+ }>;
928
+ oauth2EndSession: import("better-auth").StrictEndpoint<"/oauth2/end-session", {
929
+ method: ("GET" | "POST")[];
930
+ body: import("zod").ZodOptional<import("zod").ZodObject<{
931
+ id_token_hint: import("zod").ZodOptional<import("zod").ZodString>;
932
+ client_id: import("zod").ZodOptional<import("zod").ZodString>;
933
+ post_logout_redirect_uri: import("zod").ZodOptional<import("zod").ZodURL>;
934
+ state: import("zod").ZodOptional<import("zod").ZodString>;
935
+ }, import("zod/v4/core").$strip>>;
936
+ query: import("zod").ZodOptional<import("zod").ZodObject<{
937
+ id_token_hint: import("zod").ZodOptional<import("zod").ZodString>;
938
+ client_id: import("zod").ZodOptional<import("zod").ZodString>;
939
+ post_logout_redirect_uri: import("zod").ZodOptional<import("zod").ZodURL>;
940
+ state: import("zod").ZodOptional<import("zod").ZodString>;
941
+ }, import("zod/v4/core").$strip>>;
942
+ metadata: {
943
+ noStore: boolean;
944
+ allowedMediaTypes: string[];
945
+ $Infer: {
946
+ body: {
947
+ id_token_hint?: string;
948
+ client_id?: string;
949
+ post_logout_redirect_uri?: string;
950
+ state?: string;
951
+ } | {
952
+ query: {
953
+ id_token_hint?: string;
954
+ client_id?: string;
955
+ post_logout_redirect_uri?: string;
956
+ state?: string;
957
+ };
958
+ };
959
+ query: {
960
+ id_token_hint?: string;
961
+ client_id?: string;
962
+ post_logout_redirect_uri?: string;
963
+ state?: string;
964
+ };
965
+ };
966
+ openapi: {
967
+ description: string;
968
+ responses: {
969
+ "200": {
970
+ description: string;
971
+ content: {
972
+ "application/json": {
973
+ schema: {
974
+ type: "object";
975
+ properties: {
976
+ redirect_uri: {
977
+ type: string;
978
+ format: string;
979
+ description: string;
980
+ };
981
+ message: {
982
+ type: string;
983
+ description: string;
984
+ };
985
+ };
986
+ };
987
+ };
988
+ "text/html": {
989
+ schema: {
990
+ type: "string";
991
+ };
992
+ };
993
+ };
994
+ };
995
+ };
996
+ };
997
+ };
998
+ }, Response | {
999
+ redirect: true;
1000
+ url: string;
1001
+ } | null>;
1002
+ oauth2EndSessionConfirmation: import("better-auth").StrictEndpoint<"/oauth2/end-session/confirm", {
1003
+ method: "POST";
1004
+ body: import("zod").ZodObject<{
1005
+ action: import("zod").ZodLiteral<"confirm">;
1006
+ }, import("zod/v4/core").$strip>;
1007
+ metadata: {
1008
+ noStore: boolean;
1009
+ allowedMediaTypes: string[];
1010
+ scope: "http";
1011
+ };
1012
+ }, Response | {
1013
+ redirect: true;
1014
+ url: string;
1015
+ } | null>;
1016
+ registerOAuthClient: import("better-auth").StrictEndpoint<"/oauth2/register", {
1017
+ method: "POST";
1018
+ body: import("zod").ZodObject<{
1019
+ redirect_uris: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodURL>>;
1020
+ scope: import("zod").ZodOptional<import("zod").ZodString>;
1021
+ client_name: import("zod").ZodOptional<import("zod").ZodString>;
1022
+ client_uri: import("zod").ZodOptional<import("zod").ZodString>;
1023
+ logo_uri: import("zod").ZodOptional<import("zod").ZodString>;
1024
+ contacts: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1025
+ tos_uri: import("zod").ZodOptional<import("zod").ZodString>;
1026
+ policy_uri: import("zod").ZodOptional<import("zod").ZodString>;
1027
+ software_id: import("zod").ZodOptional<import("zod").ZodString>;
1028
+ software_version: import("zod").ZodOptional<import("zod").ZodString>;
1029
+ software_statement: import("zod").ZodOptional<import("zod").ZodString>;
1030
+ post_logout_redirect_uris: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodURL>>;
1031
+ backchannel_logout_uri: import("zod").ZodOptional<import("zod").ZodURL>;
1032
+ backchannel_logout_session_required: import("zod").ZodOptional<import("zod").ZodBoolean>;
1033
+ token_endpoint_auth_method: import("zod").ZodOptional<import("zod").ZodString>;
1034
+ jwks: import("zod").ZodOptional<import("zod").ZodObject<{
1035
+ keys: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1036
+ }, import("zod/v4/core").$strip>>;
1037
+ jwks_uri: import("zod").ZodOptional<import("zod").ZodString>;
1038
+ grant_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1039
+ response_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
1040
+ code: "code";
1041
+ }>>>;
1042
+ application_type: import("zod").ZodOptional<import("zod").ZodEnum<{
1043
+ web: "web";
1044
+ native: "native";
1045
+ }>>;
1046
+ subject_type: import("zod").ZodOptional<import("zod").ZodEnum<{
1047
+ public: "public";
1048
+ pairwise: "pairwise";
1049
+ }>>;
1050
+ dpop_bound_access_tokens: import("zod").ZodOptional<import("zod").ZodBoolean>;
1051
+ resources: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1052
+ skip_consent: import("zod").ZodOptional<import("zod").ZodNever>;
1053
+ }, import("zod/v4/core").$strip>;
1054
+ errorCodesByField: {
1055
+ redirect_uris: "invalid_redirect_uri";
1056
+ post_logout_redirect_uris: "invalid_redirect_uri";
1057
+ software_statement: "invalid_software_statement";
1058
+ resources: "invalid_target";
1059
+ };
1060
+ defaultError: "invalid_client_metadata";
1061
+ metadata: {
1062
+ noStore: boolean;
1063
+ openapi: {
1064
+ description: string;
1065
+ responses: {
1066
+ "201": {
1067
+ description: string;
1068
+ content: {
1069
+ "application/json": {
1070
+ schema: {
1071
+ type: "object";
1072
+ properties: {
1073
+ client_id: {
1074
+ type: string;
1075
+ description: string;
1076
+ };
1077
+ client_secret: {
1078
+ type: string;
1079
+ description: string;
1080
+ };
1081
+ client_secret_expires_at: {
1082
+ type: string;
1083
+ description: string;
1084
+ };
1085
+ scope: {
1086
+ type: string;
1087
+ description: string;
1088
+ };
1089
+ user_id: {
1090
+ type: string;
1091
+ description: string;
1092
+ };
1093
+ client_id_issued_at: {
1094
+ type: string;
1095
+ description: string;
1096
+ };
1097
+ client_name: {
1098
+ type: string;
1099
+ description: string;
1100
+ };
1101
+ client_uri: {
1102
+ type: string;
1103
+ description: string;
1104
+ };
1105
+ logo_uri: {
1106
+ type: string;
1107
+ description: string;
1108
+ };
1109
+ contacts: {
1110
+ type: string;
1111
+ items: {
1112
+ type: string;
1113
+ };
1114
+ description: string;
1115
+ };
1116
+ tos_uri: {
1117
+ type: string;
1118
+ description: string;
1119
+ };
1120
+ policy_uri: {
1121
+ type: string;
1122
+ description: string;
1123
+ };
1124
+ software_id: {
1125
+ type: string;
1126
+ description: string;
1127
+ };
1128
+ software_version: {
1129
+ type: string;
1130
+ description: string;
1131
+ };
1132
+ software_statement: {
1133
+ type: string;
1134
+ description: string;
1135
+ };
1136
+ redirect_uris: {
1137
+ type: string;
1138
+ items: {
1139
+ type: string;
1140
+ format: string;
1141
+ };
1142
+ description: string;
1143
+ };
1144
+ post_logout_redirect_uris: {
1145
+ type: string;
1146
+ items: {
1147
+ type: string;
1148
+ format: string;
1149
+ };
1150
+ description: string;
1151
+ };
1152
+ backchannel_logout_uri: {
1153
+ type: string;
1154
+ format: string;
1155
+ description: string;
1156
+ };
1157
+ backchannel_logout_session_required: {
1158
+ type: string;
1159
+ description: string;
1160
+ };
1161
+ token_endpoint_auth_method: {
1162
+ type: string;
1163
+ description: string;
1164
+ };
1165
+ grant_types: {
1166
+ type: string;
1167
+ items: {
1168
+ type: string;
1169
+ };
1170
+ description: string;
1171
+ };
1172
+ response_types: {
1173
+ type: string;
1174
+ items: {
1175
+ type: string;
1176
+ enum: string[];
1177
+ };
1178
+ description: string;
1179
+ };
1180
+ application_type: {
1181
+ type: string;
1182
+ description: string;
1183
+ enum: string[];
1184
+ };
1185
+ resources: {
1186
+ type: string;
1187
+ items: {
1188
+ type: string;
1189
+ format: string;
1190
+ };
1191
+ description: string;
1192
+ };
1193
+ disabled: {
1194
+ type: string;
1195
+ description: string;
1196
+ };
1197
+ };
1198
+ required: string[];
1199
+ };
1200
+ };
1201
+ };
1202
+ };
1203
+ };
1204
+ };
1205
+ };
1206
+ }, import("@better-auth/oauth-provider").OAuthClientRegistrationResponse>;
1207
+ adminCreateOAuthClient: import("better-auth").StrictEndpoint<"/admin/oauth2/create-client", {
1208
+ method: "POST";
1209
+ body: import("zod").ZodObject<{
1210
+ redirect_uris: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodURL>>;
1211
+ scope: import("zod").ZodOptional<import("zod").ZodString>;
1212
+ client_name: import("zod").ZodOptional<import("zod").ZodString>;
1213
+ client_uri: import("zod").ZodOptional<import("zod").ZodString>;
1214
+ logo_uri: import("zod").ZodOptional<import("zod").ZodString>;
1215
+ contacts: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1216
+ tos_uri: import("zod").ZodOptional<import("zod").ZodString>;
1217
+ policy_uri: import("zod").ZodOptional<import("zod").ZodString>;
1218
+ software_id: import("zod").ZodOptional<import("zod").ZodString>;
1219
+ software_version: import("zod").ZodOptional<import("zod").ZodString>;
1220
+ software_statement: import("zod").ZodOptional<import("zod").ZodString>;
1221
+ post_logout_redirect_uris: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodURL>>;
1222
+ backchannel_logout_uri: import("zod").ZodOptional<import("zod").ZodURL>;
1223
+ backchannel_logout_session_required: import("zod").ZodOptional<import("zod").ZodBoolean>;
1224
+ token_endpoint_auth_method: import("zod").ZodOptional<import("zod").ZodString>;
1225
+ application_type: import("zod").ZodOptional<import("zod").ZodEnum<{
1226
+ web: "web";
1227
+ native: "native";
1228
+ }>>;
1229
+ jwks: import("zod").ZodOptional<import("zod").ZodObject<{
1230
+ keys: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1231
+ }, import("zod/v4/core").$strip>>;
1232
+ jwks_uri: import("zod").ZodOptional<import("zod").ZodString>;
1233
+ grant_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1234
+ client_credentials_scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1235
+ resources: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1236
+ response_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
1237
+ code: "code";
1238
+ }>>>;
1239
+ client_secret_expires_at: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>>;
1240
+ skip_consent: import("zod").ZodOptional<import("zod").ZodBoolean>;
1241
+ enable_end_session: import("zod").ZodOptional<import("zod").ZodBoolean>;
1242
+ require_pkce: import("zod").ZodOptional<import("zod").ZodBoolean>;
1243
+ dpop_bound_access_tokens: import("zod").ZodOptional<import("zod").ZodBoolean>;
1244
+ subject_type: import("zod").ZodOptional<import("zod").ZodEnum<{
1245
+ public: "public";
1246
+ pairwise: "pairwise";
1247
+ }>>;
1248
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1249
+ }, import("zod/v4/core").$strip>;
1250
+ metadata: {
1251
+ noStore: boolean;
1252
+ SERVER_ONLY: true;
1253
+ openapi: {
1254
+ description: string;
1255
+ responses: {
1256
+ "201": {
1257
+ description: string;
1258
+ content: {
1259
+ "application/json": {
1260
+ schema: {
1261
+ type: "object";
1262
+ properties: {
1263
+ client_id: {
1264
+ type: string;
1265
+ description: string;
1266
+ };
1267
+ client_secret: {
1268
+ type: string;
1269
+ description: string;
1270
+ };
1271
+ client_secret_expires_at: {
1272
+ type: string;
1273
+ description: string;
1274
+ };
1275
+ scope: {
1276
+ type: string;
1277
+ description: string;
1278
+ };
1279
+ client_credentials_scopes: {
1280
+ type: string;
1281
+ items: {
1282
+ type: string;
1283
+ };
1284
+ description: string;
1285
+ };
1286
+ user_id: {
1287
+ type: string;
1288
+ description: string;
1289
+ };
1290
+ client_id_issued_at: {
1291
+ type: string;
1292
+ description: string;
1293
+ };
1294
+ client_name: {
1295
+ type: string;
1296
+ description: string;
1297
+ };
1298
+ client_uri: {
1299
+ type: string;
1300
+ description: string;
1301
+ };
1302
+ logo_uri: {
1303
+ type: string;
1304
+ description: string;
1305
+ };
1306
+ contacts: {
1307
+ type: string;
1308
+ items: {
1309
+ type: string;
1310
+ };
1311
+ description: string;
1312
+ };
1313
+ tos_uri: {
1314
+ type: string;
1315
+ description: string;
1316
+ };
1317
+ policy_uri: {
1318
+ type: string;
1319
+ description: string;
1320
+ };
1321
+ software_id: {
1322
+ type: string;
1323
+ description: string;
1324
+ };
1325
+ software_version: {
1326
+ type: string;
1327
+ description: string;
1328
+ };
1329
+ software_statement: {
1330
+ type: string;
1331
+ description: string;
1332
+ };
1333
+ redirect_uris: {
1334
+ type: string;
1335
+ items: {
1336
+ type: string;
1337
+ format: string;
1338
+ };
1339
+ description: string;
1340
+ };
1341
+ token_endpoint_auth_method: {
1342
+ type: string;
1343
+ description: string;
1344
+ };
1345
+ grant_types: {
1346
+ type: string;
1347
+ items: {
1348
+ type: string;
1349
+ };
1350
+ description: string;
1351
+ };
1352
+ response_types: {
1353
+ type: string;
1354
+ items: {
1355
+ type: string;
1356
+ enum: string[];
1357
+ };
1358
+ description: string;
1359
+ };
1360
+ application_type: {
1361
+ type: string;
1362
+ description: string;
1363
+ enum: string[];
1364
+ };
1365
+ resources: {
1366
+ type: string;
1367
+ items: {
1368
+ type: string;
1369
+ format: string;
1370
+ };
1371
+ description: string;
1372
+ };
1373
+ disabled: {
1374
+ type: string;
1375
+ description: string;
1376
+ };
1377
+ require_pkce: {
1378
+ type: string;
1379
+ description: string;
1380
+ default: boolean;
1381
+ };
1382
+ metadata: {
1383
+ type: string;
1384
+ additionalProperties: boolean;
1385
+ nullable: boolean;
1386
+ description: string;
1387
+ };
1388
+ };
1389
+ required: string[];
1390
+ };
1391
+ };
1392
+ };
1393
+ };
1394
+ };
1395
+ };
1396
+ };
1397
+ }, import("@better-auth/oauth-provider").OAuthClientAdministrativeResponse>;
1398
+ createOAuthClient: import("better-auth").StrictEndpoint<"/oauth2/create-client", {
1399
+ method: "POST";
1400
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1401
+ session: {
1402
+ session: Record<string, any> & {
1403
+ id: string;
1404
+ createdAt: Date;
1405
+ updatedAt: Date;
1406
+ userId: string;
1407
+ expiresAt: Date;
1408
+ token: string;
1409
+ ipAddress?: string | null | undefined;
1410
+ userAgent?: string | null | undefined;
1411
+ };
1412
+ user: Record<string, any> & {
1413
+ id: string;
1414
+ createdAt: Date;
1415
+ updatedAt: Date;
1416
+ email: string;
1417
+ emailVerified: boolean;
1418
+ name: string;
1419
+ image?: string | null | undefined;
1420
+ };
1421
+ };
1422
+ }>>[];
1423
+ body: import("zod").ZodObject<{
1424
+ redirect_uris: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodURL>>;
1425
+ scope: import("zod").ZodOptional<import("zod").ZodString>;
1426
+ client_name: import("zod").ZodOptional<import("zod").ZodString>;
1427
+ client_uri: import("zod").ZodOptional<import("zod").ZodString>;
1428
+ logo_uri: import("zod").ZodOptional<import("zod").ZodString>;
1429
+ contacts: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1430
+ tos_uri: import("zod").ZodOptional<import("zod").ZodString>;
1431
+ policy_uri: import("zod").ZodOptional<import("zod").ZodString>;
1432
+ software_id: import("zod").ZodOptional<import("zod").ZodString>;
1433
+ software_version: import("zod").ZodOptional<import("zod").ZodString>;
1434
+ software_statement: import("zod").ZodOptional<import("zod").ZodString>;
1435
+ post_logout_redirect_uris: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodURL>>;
1436
+ backchannel_logout_uri: import("zod").ZodOptional<import("zod").ZodURL>;
1437
+ backchannel_logout_session_required: import("zod").ZodOptional<import("zod").ZodBoolean>;
1438
+ token_endpoint_auth_method: import("zod").ZodOptional<import("zod").ZodString>;
1439
+ application_type: import("zod").ZodOptional<import("zod").ZodEnum<{
1440
+ web: "web";
1441
+ native: "native";
1442
+ }>>;
1443
+ jwks: import("zod").ZodOptional<import("zod").ZodObject<{
1444
+ keys: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1445
+ }, import("zod/v4/core").$strip>>;
1446
+ jwks_uri: import("zod").ZodOptional<import("zod").ZodString>;
1447
+ grant_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1448
+ response_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
1449
+ code: "code";
1450
+ }>>>;
1451
+ dpop_bound_access_tokens: import("zod").ZodOptional<import("zod").ZodBoolean>;
1452
+ }, import("zod/v4/core").$strip>;
1453
+ metadata: {
1454
+ noStore: boolean;
1455
+ openapi: {
1456
+ description: string;
1457
+ responses: {
1458
+ "201": {
1459
+ description: string;
1460
+ content: {
1461
+ "application/json": {
1462
+ schema: {
1463
+ type: "object";
1464
+ properties: {
1465
+ client_id: {
1466
+ type: string;
1467
+ description: string;
1468
+ };
1469
+ client_secret: {
1470
+ type: string;
1471
+ description: string;
1472
+ };
1473
+ client_secret_expires_at: {
1474
+ type: string;
1475
+ description: string;
1476
+ };
1477
+ scope: {
1478
+ type: string;
1479
+ description: string;
1480
+ };
1481
+ user_id: {
1482
+ type: string;
1483
+ description: string;
1484
+ };
1485
+ client_id_issued_at: {
1486
+ type: string;
1487
+ description: string;
1488
+ };
1489
+ client_name: {
1490
+ type: string;
1491
+ description: string;
1492
+ };
1493
+ client_uri: {
1494
+ type: string;
1495
+ description: string;
1496
+ };
1497
+ logo_uri: {
1498
+ type: string;
1499
+ description: string;
1500
+ };
1501
+ contacts: {
1502
+ type: string;
1503
+ items: {
1504
+ type: string;
1505
+ };
1506
+ description: string;
1507
+ };
1508
+ tos_uri: {
1509
+ type: string;
1510
+ description: string;
1511
+ };
1512
+ policy_uri: {
1513
+ type: string;
1514
+ description: string;
1515
+ };
1516
+ software_id: {
1517
+ type: string;
1518
+ description: string;
1519
+ };
1520
+ software_version: {
1521
+ type: string;
1522
+ description: string;
1523
+ };
1524
+ software_statement: {
1525
+ type: string;
1526
+ description: string;
1527
+ };
1528
+ redirect_uris: {
1529
+ type: string;
1530
+ items: {
1531
+ type: string;
1532
+ format: string;
1533
+ };
1534
+ description: string;
1535
+ };
1536
+ token_endpoint_auth_method: {
1537
+ type: string;
1538
+ description: string;
1539
+ };
1540
+ grant_types: {
1541
+ type: string;
1542
+ items: {
1543
+ type: string;
1544
+ };
1545
+ description: string;
1546
+ };
1547
+ response_types: {
1548
+ type: string;
1549
+ items: {
1550
+ type: string;
1551
+ enum: string[];
1552
+ };
1553
+ description: string;
1554
+ };
1555
+ application_type: {
1556
+ type: string;
1557
+ description: string;
1558
+ enum: string[];
1559
+ };
1560
+ resources: {
1561
+ type: string;
1562
+ items: {
1563
+ type: string;
1564
+ format: string;
1565
+ };
1566
+ description: string;
1567
+ };
1568
+ disabled: {
1569
+ type: string;
1570
+ description: string;
1571
+ };
1572
+ metadata: {
1573
+ type: string;
1574
+ additionalProperties: boolean;
1575
+ nullable: boolean;
1576
+ description: string;
1577
+ };
1578
+ };
1579
+ required: string[];
1580
+ };
1581
+ };
1582
+ };
1583
+ };
1584
+ };
1585
+ };
1586
+ };
1587
+ }, import("@better-auth/oauth-provider").OAuthClientRegistrationResponse>;
1588
+ getOAuthClient: import("better-auth").StrictEndpoint<"/oauth2/get-client", {
1589
+ method: "GET";
1590
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1591
+ session: {
1592
+ session: Record<string, any> & {
1593
+ id: string;
1594
+ createdAt: Date;
1595
+ updatedAt: Date;
1596
+ userId: string;
1597
+ expiresAt: Date;
1598
+ token: string;
1599
+ ipAddress?: string | null | undefined;
1600
+ userAgent?: string | null | undefined;
1601
+ };
1602
+ user: Record<string, any> & {
1603
+ id: string;
1604
+ createdAt: Date;
1605
+ updatedAt: Date;
1606
+ email: string;
1607
+ emailVerified: boolean;
1608
+ name: string;
1609
+ image?: string | null | undefined;
1610
+ };
1611
+ };
1612
+ }>>[];
1613
+ query: import("zod").ZodObject<{
1614
+ client_id: import("zod").ZodString;
1615
+ }, import("zod/v4/core").$strip>;
1616
+ metadata: {
1617
+ openapi: {
1618
+ description: string;
1619
+ };
1620
+ };
1621
+ }, import("@better-auth/oauth-provider").OAuthClient>;
1622
+ getOAuthClientPublic: import("better-auth").StrictEndpoint<"/oauth2/public-client", {
1623
+ method: "GET";
1624
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1625
+ session: {
1626
+ session: Record<string, any> & {
1627
+ id: string;
1628
+ createdAt: Date;
1629
+ updatedAt: Date;
1630
+ userId: string;
1631
+ expiresAt: Date;
1632
+ token: string;
1633
+ ipAddress?: string | null | undefined;
1634
+ userAgent?: string | null | undefined;
1635
+ };
1636
+ user: Record<string, any> & {
1637
+ id: string;
1638
+ createdAt: Date;
1639
+ updatedAt: Date;
1640
+ email: string;
1641
+ emailVerified: boolean;
1642
+ name: string;
1643
+ image?: string | null | undefined;
1644
+ };
1645
+ };
1646
+ }>>[];
1647
+ query: import("zod").ZodObject<{
1648
+ client_id: import("zod").ZodString;
1649
+ }, import("zod/v4/core").$strip>;
1650
+ metadata: {
1651
+ openapi: {
1652
+ description: string;
1653
+ };
1654
+ };
1655
+ }, import("@better-auth/oauth-provider").OAuthClient>;
1656
+ getOAuthClientPublicPrelogin: import("better-auth").StrictEndpoint<"/oauth2/public-client-prelogin", {
1657
+ method: "POST";
1658
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>[];
1659
+ body: import("zod").ZodObject<{
1660
+ client_id: import("zod").ZodString;
1661
+ oauth_query: import("zod").ZodOptional<import("zod").ZodString>;
1662
+ }, import("zod/v4/core").$strip>;
1663
+ metadata: {
1664
+ openapi: {
1665
+ description: string;
1666
+ };
1667
+ };
1668
+ }, import("@better-auth/oauth-provider").OAuthClient>;
1669
+ getOAuthClients: import("better-auth").StrictEndpoint<"/oauth2/get-clients", {
1670
+ method: "GET";
1671
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1672
+ session: {
1673
+ session: Record<string, any> & {
1674
+ id: string;
1675
+ createdAt: Date;
1676
+ updatedAt: Date;
1677
+ userId: string;
1678
+ expiresAt: Date;
1679
+ token: string;
1680
+ ipAddress?: string | null | undefined;
1681
+ userAgent?: string | null | undefined;
1682
+ };
1683
+ user: Record<string, any> & {
1684
+ id: string;
1685
+ createdAt: Date;
1686
+ updatedAt: Date;
1687
+ email: string;
1688
+ emailVerified: boolean;
1689
+ name: string;
1690
+ image?: string | null | undefined;
1691
+ };
1692
+ };
1693
+ }>>[];
1694
+ metadata: {
1695
+ openapi: {
1696
+ description: string;
1697
+ };
1698
+ };
1699
+ }, import("@better-auth/oauth-provider").OAuthClient[] | null>;
1700
+ adminUpdateOAuthClient: import("better-auth").StrictEndpoint<"/admin/oauth2/update-client", {
1701
+ method: "PATCH";
1702
+ body: import("zod").ZodObject<{
1703
+ client_id: import("zod").ZodString;
1704
+ update: import("zod").ZodObject<{
1705
+ redirect_uris: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodURL>>;
1706
+ scope: import("zod").ZodOptional<import("zod").ZodString>;
1707
+ client_name: import("zod").ZodOptional<import("zod").ZodString>;
1708
+ client_uri: import("zod").ZodOptional<import("zod").ZodString>;
1709
+ logo_uri: import("zod").ZodOptional<import("zod").ZodString>;
1710
+ contacts: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1711
+ tos_uri: import("zod").ZodOptional<import("zod").ZodString>;
1712
+ policy_uri: import("zod").ZodOptional<import("zod").ZodString>;
1713
+ software_id: import("zod").ZodOptional<import("zod").ZodString>;
1714
+ software_version: import("zod").ZodOptional<import("zod").ZodString>;
1715
+ software_statement: import("zod").ZodOptional<import("zod").ZodString>;
1716
+ post_logout_redirect_uris: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodURL>>;
1717
+ backchannel_logout_uri: import("zod").ZodOptional<import("zod").ZodURL>;
1718
+ backchannel_logout_session_required: import("zod").ZodOptional<import("zod").ZodBoolean>;
1719
+ application_type: import("zod").ZodOptional<import("zod").ZodEnum<{
1720
+ web: "web";
1721
+ native: "native";
1722
+ }>>;
1723
+ grant_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1724
+ client_credentials_scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1725
+ response_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
1726
+ code: "code";
1727
+ }>>>;
1728
+ client_secret_expires_at: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>;
1729
+ skip_consent: import("zod").ZodOptional<import("zod").ZodBoolean>;
1730
+ enable_end_session: import("zod").ZodOptional<import("zod").ZodBoolean>;
1731
+ disabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
1732
+ dpop_bound_access_tokens: import("zod").ZodOptional<import("zod").ZodBoolean>;
1733
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1734
+ }, import("zod/v4/core").$strip>;
1735
+ }, import("zod/v4/core").$strip>;
1736
+ metadata: {
1737
+ SERVER_ONLY: true;
1738
+ openapi: {
1739
+ description: string;
1740
+ };
1741
+ };
1742
+ }, import("@better-auth/oauth-provider").OAuthClientAdministrativeResponse>;
1743
+ updateOAuthClient: import("better-auth").StrictEndpoint<"/oauth2/update-client", {
1744
+ method: "POST";
1745
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1746
+ session: {
1747
+ session: Record<string, any> & {
1748
+ id: string;
1749
+ createdAt: Date;
1750
+ updatedAt: Date;
1751
+ userId: string;
1752
+ expiresAt: Date;
1753
+ token: string;
1754
+ ipAddress?: string | null | undefined;
1755
+ userAgent?: string | null | undefined;
1756
+ };
1757
+ user: Record<string, any> & {
1758
+ id: string;
1759
+ createdAt: Date;
1760
+ updatedAt: Date;
1761
+ email: string;
1762
+ emailVerified: boolean;
1763
+ name: string;
1764
+ image?: string | null | undefined;
1765
+ };
1766
+ };
1767
+ }>>[];
1768
+ body: import("zod").ZodObject<{
1769
+ client_id: import("zod").ZodString;
1770
+ update: import("zod").ZodObject<{
1771
+ redirect_uris: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodURL>>;
1772
+ scope: import("zod").ZodOptional<import("zod").ZodString>;
1773
+ client_name: import("zod").ZodOptional<import("zod").ZodString>;
1774
+ client_uri: import("zod").ZodOptional<import("zod").ZodString>;
1775
+ logo_uri: import("zod").ZodOptional<import("zod").ZodString>;
1776
+ contacts: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1777
+ tos_uri: import("zod").ZodOptional<import("zod").ZodString>;
1778
+ policy_uri: import("zod").ZodOptional<import("zod").ZodString>;
1779
+ software_id: import("zod").ZodOptional<import("zod").ZodString>;
1780
+ software_version: import("zod").ZodOptional<import("zod").ZodString>;
1781
+ software_statement: import("zod").ZodOptional<import("zod").ZodString>;
1782
+ post_logout_redirect_uris: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodURL>>;
1783
+ backchannel_logout_uri: import("zod").ZodOptional<import("zod").ZodURL>;
1784
+ backchannel_logout_session_required: import("zod").ZodOptional<import("zod").ZodBoolean>;
1785
+ application_type: import("zod").ZodOptional<import("zod").ZodEnum<{
1786
+ web: "web";
1787
+ native: "native";
1788
+ }>>;
1789
+ grant_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1790
+ response_types: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
1791
+ code: "code";
1792
+ }>>>;
1793
+ }, import("zod/v4/core").$strip>;
1794
+ }, import("zod/v4/core").$strip>;
1795
+ metadata: {
1796
+ openapi: {
1797
+ description: string;
1798
+ };
1799
+ };
1800
+ }, import("@better-auth/oauth-provider").OAuthClientRegistrationResponse>;
1801
+ rotateClientSecret: import("better-auth").StrictEndpoint<"/oauth2/client/rotate-secret", {
1802
+ method: "POST";
1803
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1804
+ session: {
1805
+ session: Record<string, any> & {
1806
+ id: string;
1807
+ createdAt: Date;
1808
+ updatedAt: Date;
1809
+ userId: string;
1810
+ expiresAt: Date;
1811
+ token: string;
1812
+ ipAddress?: string | null | undefined;
1813
+ userAgent?: string | null | undefined;
1814
+ };
1815
+ user: Record<string, any> & {
1816
+ id: string;
1817
+ createdAt: Date;
1818
+ updatedAt: Date;
1819
+ email: string;
1820
+ emailVerified: boolean;
1821
+ name: string;
1822
+ image?: string | null | undefined;
1823
+ };
1824
+ };
1825
+ }>>[];
1826
+ body: import("zod").ZodObject<{
1827
+ client_id: import("zod").ZodString;
1828
+ }, import("zod/v4/core").$strip>;
1829
+ metadata: {
1830
+ noStore: boolean;
1831
+ openapi: {
1832
+ description: string;
1833
+ };
1834
+ };
1835
+ }, import("@better-auth/oauth-provider").OAuthClient>;
1836
+ rotateClientKeys: import("better-auth").StrictEndpoint<"/oauth2/client/rotate-keys", {
1837
+ method: "POST";
1838
+ body: import("zod").ZodObject<{
1839
+ client_assertion: import("zod").ZodString;
1840
+ client_assertion_type: import("zod").ZodString;
1841
+ jwks: import("zod").ZodObject<{
1842
+ keys: import("zod").ZodArray<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
1843
+ }, import("zod/v4/core").$strip>;
1844
+ }, import("zod/v4/core").$strip>;
1845
+ errorCodesByField: {
1846
+ client_assertion: "invalid_client";
1847
+ client_assertion_type: "invalid_client";
1848
+ jwks: "invalid_client_metadata";
1849
+ };
1850
+ metadata: {
1851
+ noStore: boolean;
1852
+ openapi: {
1853
+ description: string;
1854
+ };
1855
+ };
1856
+ }, {
1857
+ client_id: string;
1858
+ jwks: {
1859
+ keys: Record<string, unknown>[];
1860
+ };
1861
+ }>;
1862
+ deleteOAuthClient: import("better-auth").StrictEndpoint<"/oauth2/delete-client", {
1863
+ method: "POST";
1864
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1865
+ session: {
1866
+ session: Record<string, any> & {
1867
+ id: string;
1868
+ createdAt: Date;
1869
+ updatedAt: Date;
1870
+ userId: string;
1871
+ expiresAt: Date;
1872
+ token: string;
1873
+ ipAddress?: string | null | undefined;
1874
+ userAgent?: string | null | undefined;
1875
+ };
1876
+ user: Record<string, any> & {
1877
+ id: string;
1878
+ createdAt: Date;
1879
+ updatedAt: Date;
1880
+ email: string;
1881
+ emailVerified: boolean;
1882
+ name: string;
1883
+ image?: string | null | undefined;
1884
+ };
1885
+ };
1886
+ }>>[];
1887
+ body: import("zod").ZodObject<{
1888
+ client_id: import("zod").ZodString;
1889
+ }, import("zod/v4/core").$strip>;
1890
+ metadata: {
1891
+ openapi: {
1892
+ description: string;
1893
+ };
1894
+ };
1895
+ }, void>;
1896
+ getOAuthConsent: import("better-auth").StrictEndpoint<"/oauth2/get-consent", {
1897
+ method: "GET";
1898
+ query: import("zod").ZodObject<{
1899
+ id: import("zod").ZodString;
1900
+ }, import("zod/v4/core").$strip>;
1901
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1902
+ session: {
1903
+ session: Record<string, any> & {
1904
+ id: string;
1905
+ createdAt: Date;
1906
+ updatedAt: Date;
1907
+ userId: string;
1908
+ expiresAt: Date;
1909
+ token: string;
1910
+ ipAddress?: string | null | undefined;
1911
+ userAgent?: string | null | undefined;
1912
+ };
1913
+ user: Record<string, any> & {
1914
+ id: string;
1915
+ createdAt: Date;
1916
+ updatedAt: Date;
1917
+ email: string;
1918
+ emailVerified: boolean;
1919
+ name: string;
1920
+ image?: string | null | undefined;
1921
+ };
1922
+ };
1923
+ }>>[];
1924
+ metadata: {
1925
+ openapi: {
1926
+ description: string;
1927
+ };
1928
+ };
1929
+ }, import("@better-auth/oauth-provider").OAuthConsent<ProviderScope[]>>;
1930
+ getOAuthConsents: import("better-auth").StrictEndpoint<"/oauth2/get-consents", {
1931
+ method: "GET";
1932
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1933
+ session: {
1934
+ session: Record<string, any> & {
1935
+ id: string;
1936
+ createdAt: Date;
1937
+ updatedAt: Date;
1938
+ userId: string;
1939
+ expiresAt: Date;
1940
+ token: string;
1941
+ ipAddress?: string | null | undefined;
1942
+ userAgent?: string | null | undefined;
1943
+ };
1944
+ user: Record<string, any> & {
1945
+ id: string;
1946
+ createdAt: Date;
1947
+ updatedAt: Date;
1948
+ email: string;
1949
+ emailVerified: boolean;
1950
+ name: string;
1951
+ image?: string | null | undefined;
1952
+ };
1953
+ };
1954
+ }>>[];
1955
+ metadata: {
1956
+ openapi: {
1957
+ description: string;
1958
+ };
1959
+ };
1960
+ }, import("@better-auth/oauth-provider").OAuthConsent<ProviderScope[]>[]>;
1961
+ updateOAuthConsent: import("better-auth").StrictEndpoint<"/oauth2/update-consent", {
1962
+ method: "POST";
1963
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1964
+ session: {
1965
+ session: Record<string, any> & {
1966
+ id: string;
1967
+ createdAt: Date;
1968
+ updatedAt: Date;
1969
+ userId: string;
1970
+ expiresAt: Date;
1971
+ token: string;
1972
+ ipAddress?: string | null | undefined;
1973
+ userAgent?: string | null | undefined;
1974
+ };
1975
+ user: Record<string, any> & {
1976
+ id: string;
1977
+ createdAt: Date;
1978
+ updatedAt: Date;
1979
+ email: string;
1980
+ emailVerified: boolean;
1981
+ name: string;
1982
+ image?: string | null | undefined;
1983
+ };
1984
+ };
1985
+ }>>[];
1986
+ body: import("zod").ZodObject<{
1987
+ id: import("zod").ZodString;
1988
+ update: import("zod").ZodObject<{
1989
+ scopes: import("zod").ZodArray<import("zod").ZodString>;
1990
+ }, import("zod/v4/core").$strip>;
1991
+ }, import("zod/v4/core").$strip>;
1992
+ metadata: {
1993
+ openapi: {
1994
+ description: string;
1995
+ };
1996
+ };
1997
+ }, import("@better-auth/oauth-provider").OAuthConsent<ProviderScope[]> | null>;
1998
+ deleteOAuthConsent: import("better-auth").StrictEndpoint<"/oauth2/delete-consent", {
1999
+ method: "POST";
2000
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2001
+ session: {
2002
+ session: Record<string, any> & {
2003
+ id: string;
2004
+ createdAt: Date;
2005
+ updatedAt: Date;
2006
+ userId: string;
2007
+ expiresAt: Date;
2008
+ token: string;
2009
+ ipAddress?: string | null | undefined;
2010
+ userAgent?: string | null | undefined;
2011
+ };
2012
+ user: Record<string, any> & {
2013
+ id: string;
2014
+ createdAt: Date;
2015
+ updatedAt: Date;
2016
+ email: string;
2017
+ emailVerified: boolean;
2018
+ name: string;
2019
+ image?: string | null | undefined;
2020
+ };
2021
+ };
2022
+ }>>[];
2023
+ body: import("zod").ZodObject<{
2024
+ id: import("zod").ZodString;
2025
+ }, import("zod/v4/core").$strip>;
2026
+ metadata: {
2027
+ openapi: {
2028
+ description: string;
2029
+ };
2030
+ };
2031
+ }, void>;
2032
+ adminCreateOAuthResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources", {
2033
+ method: "POST";
2034
+ body: import("zod").ZodObject<{
2035
+ identifier: import("zod").ZodNonOptional<import("zod").ZodOptional<import("zod").ZodString>>;
2036
+ name: import("zod").ZodOptional<import("zod").ZodString>;
2037
+ accessTokenTtl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
2038
+ refreshTokenTtl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
2039
+ signingAlgorithm: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEnum<{
2040
+ RS256: "RS256";
2041
+ PS256: "PS256";
2042
+ ES256: "ES256";
2043
+ ES512: "ES512";
2044
+ EdDSA: "EdDSA";
2045
+ }>>>;
2046
+ signingKeyId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
2047
+ allowedScopes: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodString>>>;
2048
+ customClaims: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
2049
+ dpopBoundAccessTokensRequired: import("zod").ZodOptional<import("zod").ZodBoolean>;
2050
+ disabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
2051
+ metadata: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
2052
+ }, import("zod/v4/core").$strip>;
2053
+ metadata: {
2054
+ SERVER_ONLY: true;
2055
+ };
2056
+ }, import("@better-auth/oauth-provider").OAuthResource>;
2057
+ adminListOAuthResources: import("better-auth").StrictEndpoint<"/admin/oauth2/resources", {
2058
+ method: "GET";
2059
+ metadata: {
2060
+ SERVER_ONLY: true;
2061
+ };
2062
+ }, import("@better-auth/oauth-provider").OAuthResource[]>;
2063
+ adminGetOAuthResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources/:identifier", {
2064
+ method: "GET";
2065
+ metadata: {
2066
+ SERVER_ONLY: true;
2067
+ };
2068
+ }, import("@better-auth/oauth-provider").OAuthResource>;
2069
+ adminUpdateOAuthResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources/:identifier", {
2070
+ method: "PATCH";
2071
+ body: import("zod").ZodObject<{
2072
+ identifier: import("zod").ZodOptional<import("zod").ZodString>;
2073
+ name: import("zod").ZodOptional<import("zod").ZodString>;
2074
+ accessTokenTtl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
2075
+ refreshTokenTtl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodNumber>>;
2076
+ signingAlgorithm: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodEnum<{
2077
+ RS256: "RS256";
2078
+ PS256: "PS256";
2079
+ ES256: "ES256";
2080
+ ES512: "ES512";
2081
+ EdDSA: "EdDSA";
2082
+ }>>>;
2083
+ signingKeyId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
2084
+ allowedScopes: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodArray<import("zod").ZodString>>>;
2085
+ customClaims: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
2086
+ dpopBoundAccessTokensRequired: import("zod").ZodOptional<import("zod").ZodBoolean>;
2087
+ disabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
2088
+ metadata: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>>;
2089
+ }, import("zod/v4/core").$strip>;
2090
+ metadata: {
2091
+ SERVER_ONLY: true;
2092
+ };
2093
+ }, import("@better-auth/oauth-provider").OAuthResource>;
2094
+ adminDeleteOAuthResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources/:identifier", {
2095
+ method: "DELETE";
2096
+ metadata: {
2097
+ SERVER_ONLY: true;
2098
+ };
2099
+ }, {
2100
+ deleted: boolean;
2101
+ }>;
2102
+ adminLinkClientResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources/:identifier/clients/:client_id", {
2103
+ method: "POST";
2104
+ metadata: {
2105
+ SERVER_ONLY: true;
2106
+ };
2107
+ }, {
2108
+ linked: boolean;
2109
+ }>;
2110
+ adminUnlinkClientResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources/:identifier/clients/:client_id", {
2111
+ method: "DELETE";
2112
+ metadata: {
2113
+ SERVER_ONLY: true;
2114
+ };
2115
+ }, {
2116
+ unlinked: boolean;
2117
+ }>;
2118
+ };
2119
+ schema: {
2120
+ oauthClient: {
2121
+ modelName: string;
2122
+ fields: {
2123
+ clientId: {
2124
+ type: "string";
2125
+ unique: true;
2126
+ required: true;
2127
+ };
2128
+ clientSecret: {
2129
+ type: "string";
2130
+ required: false;
2131
+ };
2132
+ clientDiscoveryId: {
2133
+ type: "string";
2134
+ required: false;
2135
+ };
2136
+ disabled: {
2137
+ type: "boolean";
2138
+ defaultValue: false;
2139
+ required: false;
2140
+ };
2141
+ skipConsent: {
2142
+ type: "boolean";
2143
+ required: false;
2144
+ };
2145
+ enableEndSession: {
2146
+ type: "boolean";
2147
+ required: false;
2148
+ };
2149
+ subjectType: {
2150
+ type: "string";
2151
+ required: false;
2152
+ };
2153
+ scopes: {
2154
+ type: "string[]";
2155
+ required: false;
2156
+ };
2157
+ clientCredentialsScopes: {
2158
+ type: "string[]";
2159
+ required: false;
2160
+ defaultValue: never[];
2161
+ };
2162
+ userId: {
2163
+ type: "string";
2164
+ required: false;
2165
+ references: {
2166
+ model: string;
2167
+ field: string;
2168
+ };
2169
+ index: true;
2170
+ };
2171
+ createdAt: {
2172
+ type: "date";
2173
+ required: false;
2174
+ };
2175
+ updatedAt: {
2176
+ type: "date";
2177
+ required: false;
2178
+ };
2179
+ name: {
2180
+ type: "string";
2181
+ required: false;
2182
+ };
2183
+ uri: {
2184
+ type: "string";
2185
+ required: false;
2186
+ };
2187
+ icon: {
2188
+ type: "string";
2189
+ required: false;
2190
+ };
2191
+ contacts: {
2192
+ type: "string[]";
2193
+ required: false;
2194
+ };
2195
+ tos: {
2196
+ type: "string";
2197
+ required: false;
2198
+ };
2199
+ policy: {
2200
+ type: "string";
2201
+ required: false;
2202
+ };
2203
+ softwareId: {
2204
+ type: "string";
2205
+ required: false;
2206
+ };
2207
+ softwareVersion: {
2208
+ type: "string";
2209
+ required: false;
2210
+ };
2211
+ softwareStatement: {
2212
+ type: "string";
2213
+ required: false;
2214
+ };
2215
+ redirectUris: {
2216
+ type: "string[]";
2217
+ required: true;
2218
+ };
2219
+ postLogoutRedirectUris: {
2220
+ type: "string[]";
2221
+ required: false;
2222
+ };
2223
+ backchannelLogoutUri: {
2224
+ type: "string";
2225
+ required: false;
2226
+ };
2227
+ backchannelLogoutSessionRequired: {
2228
+ type: "boolean";
2229
+ required: false;
2230
+ };
2231
+ tokenEndpointAuthMethod: {
2232
+ type: "string";
2233
+ required: false;
2234
+ };
2235
+ applicationType: {
2236
+ type: "string";
2237
+ required: false;
2238
+ };
2239
+ jwks: {
2240
+ type: "string";
2241
+ required: false;
2242
+ };
2243
+ jwksUri: {
2244
+ type: "string";
2245
+ required: false;
2246
+ };
2247
+ grantTypes: {
2248
+ type: "string[]";
2249
+ required: false;
2250
+ };
2251
+ responseTypes: {
2252
+ type: "string[]";
2253
+ required: false;
2254
+ };
2255
+ requirePKCE: {
2256
+ type: "boolean";
2257
+ required: false;
2258
+ };
2259
+ dpopBoundAccessTokens: {
2260
+ type: "boolean";
2261
+ required: false;
2262
+ defaultValue: false;
2263
+ };
2264
+ referenceId: {
2265
+ type: "string";
2266
+ required: false;
2267
+ };
2268
+ metadata: {
2269
+ type: "json";
2270
+ required: false;
2271
+ };
2272
+ };
2273
+ };
2274
+ oauthResource: {
2275
+ modelName: string;
2276
+ fields: {
2277
+ identifier: {
2278
+ type: "string";
2279
+ required: true;
2280
+ unique: true;
2281
+ };
2282
+ name: {
2283
+ type: "string";
2284
+ required: true;
2285
+ };
2286
+ accessTokenTtl: {
2287
+ type: "number";
2288
+ required: false;
2289
+ };
2290
+ refreshTokenTtl: {
2291
+ type: "number";
2292
+ required: false;
2293
+ };
2294
+ signingAlgorithm: {
2295
+ type: "string";
2296
+ required: false;
2297
+ };
2298
+ signingKeyId: {
2299
+ type: "string";
2300
+ required: false;
2301
+ };
2302
+ allowedScopes: {
2303
+ type: "string[]";
2304
+ required: false;
2305
+ };
2306
+ customClaims: {
2307
+ type: "json";
2308
+ required: false;
2309
+ };
2310
+ dpopBoundAccessTokensRequired: {
2311
+ type: "boolean";
2312
+ required: false;
2313
+ defaultValue: false;
2314
+ };
2315
+ disabled: {
2316
+ type: "boolean";
2317
+ required: false;
2318
+ defaultValue: false;
2319
+ };
2320
+ createdAt: {
2321
+ type: "date";
2322
+ required: false;
2323
+ };
2324
+ updatedAt: {
2325
+ type: "date";
2326
+ required: false;
2327
+ };
2328
+ policyVersion: {
2329
+ type: "number";
2330
+ required: false;
2331
+ defaultValue: number;
2332
+ };
2333
+ metadata: {
2334
+ type: "json";
2335
+ required: false;
2336
+ };
2337
+ };
2338
+ };
2339
+ oauthClientResource: {
2340
+ modelName: string;
2341
+ fields: {
2342
+ clientId: {
2343
+ type: "string";
2344
+ required: true;
2345
+ references: {
2346
+ model: string;
2347
+ field: string;
2348
+ onDelete: "cascade";
2349
+ };
2350
+ index: true;
2351
+ };
2352
+ resourceId: {
2353
+ type: "string";
2354
+ required: true;
2355
+ references: {
2356
+ model: string;
2357
+ field: string;
2358
+ onDelete: "cascade";
2359
+ };
2360
+ index: true;
2361
+ };
2362
+ metadata: {
2363
+ type: "json";
2364
+ required: false;
2365
+ };
2366
+ createdAt: {
2367
+ type: "date";
2368
+ required: false;
2369
+ };
2370
+ };
2371
+ indexes: {
2372
+ fields: [string, string];
2373
+ unique: true;
2374
+ }[];
2375
+ };
2376
+ oauthRefreshToken: {
2377
+ fields: {
2378
+ token: {
2379
+ type: "string";
2380
+ required: true;
2381
+ unique: true;
2382
+ };
2383
+ clientId: {
2384
+ type: "string";
2385
+ required: true;
2386
+ references: {
2387
+ model: string;
2388
+ field: string;
2389
+ };
2390
+ index: true;
2391
+ };
2392
+ sessionId: {
2393
+ type: "string";
2394
+ required: false;
2395
+ references: {
2396
+ model: string;
2397
+ field: string;
2398
+ onDelete: "set null";
2399
+ };
2400
+ index: true;
2401
+ };
2402
+ userId: {
2403
+ type: "string";
2404
+ required: true;
2405
+ references: {
2406
+ model: string;
2407
+ field: string;
2408
+ };
2409
+ index: true;
2410
+ };
2411
+ referenceId: {
2412
+ type: "string";
2413
+ required: false;
2414
+ };
2415
+ authorizationCodeId: {
2416
+ type: "string";
2417
+ required: false;
2418
+ index: true;
2419
+ };
2420
+ resources: {
2421
+ type: "string[]";
2422
+ required: false;
2423
+ };
2424
+ requestedUserInfoClaims: {
2425
+ type: "string[]";
2426
+ required: false;
2427
+ };
2428
+ expiresAt: {
2429
+ type: "date";
2430
+ };
2431
+ createdAt: {
2432
+ type: "date";
2433
+ };
2434
+ revoked: {
2435
+ type: "date";
2436
+ required: false;
2437
+ };
2438
+ rotatedAt: {
2439
+ type: "date";
2440
+ required: false;
2441
+ };
2442
+ rotationReplayResponse: {
2443
+ type: "string";
2444
+ required: false;
2445
+ };
2446
+ rotationReplayExpiresAt: {
2447
+ type: "date";
2448
+ required: false;
2449
+ };
2450
+ authTime: {
2451
+ type: "date";
2452
+ required: false;
2453
+ };
2454
+ confirmation: {
2455
+ type: "json";
2456
+ required: false;
2457
+ };
2458
+ scopes: {
2459
+ type: "string[]";
2460
+ required: true;
2461
+ };
2462
+ };
2463
+ };
2464
+ oauthAccessToken: {
2465
+ modelName: string;
2466
+ fields: {
2467
+ token: {
2468
+ type: "string";
2469
+ unique: true;
2470
+ };
2471
+ clientId: {
2472
+ type: "string";
2473
+ required: true;
2474
+ references: {
2475
+ model: string;
2476
+ field: string;
2477
+ };
2478
+ index: true;
2479
+ };
2480
+ sessionId: {
2481
+ type: "string";
2482
+ required: false;
2483
+ references: {
2484
+ model: string;
2485
+ field: string;
2486
+ onDelete: "set null";
2487
+ };
2488
+ index: true;
2489
+ };
2490
+ userId: {
2491
+ type: "string";
2492
+ required: false;
2493
+ references: {
2494
+ model: string;
2495
+ field: string;
2496
+ };
2497
+ index: true;
2498
+ };
2499
+ referenceId: {
2500
+ type: "string";
2501
+ required: false;
2502
+ };
2503
+ authorizationCodeId: {
2504
+ type: "string";
2505
+ required: false;
2506
+ index: true;
2507
+ };
2508
+ resources: {
2509
+ type: "string[]";
2510
+ required: false;
2511
+ };
2512
+ requestedUserInfoClaims: {
2513
+ type: "string[]";
2514
+ required: false;
2515
+ };
2516
+ refreshId: {
2517
+ type: "string";
2518
+ required: false;
2519
+ references: {
2520
+ model: string;
2521
+ field: string;
2522
+ };
2523
+ index: true;
2524
+ };
2525
+ expiresAt: {
2526
+ type: "date";
2527
+ };
2528
+ createdAt: {
2529
+ type: "date";
2530
+ };
2531
+ revoked: {
2532
+ type: "date";
2533
+ required: false;
2534
+ };
2535
+ confirmation: {
2536
+ type: "json";
2537
+ required: false;
2538
+ };
2539
+ scopes: {
2540
+ type: "string[]";
2541
+ required: true;
2542
+ };
2543
+ };
2544
+ };
2545
+ oauthConsent: {
2546
+ modelName: string;
2547
+ fields: {
2548
+ clientId: {
2549
+ type: "string";
2550
+ required: true;
2551
+ references: {
2552
+ model: string;
2553
+ field: string;
2554
+ };
2555
+ index: true;
2556
+ };
2557
+ userId: {
2558
+ type: "string";
2559
+ required: false;
2560
+ references: {
2561
+ model: string;
2562
+ field: string;
2563
+ };
2564
+ index: true;
2565
+ };
2566
+ referenceId: {
2567
+ type: "string";
2568
+ required: false;
2569
+ };
2570
+ resources: {
2571
+ type: "string[]";
2572
+ required: false;
2573
+ };
2574
+ requestedUserInfoClaims: {
2575
+ type: "string[]";
2576
+ required: false;
2577
+ };
2578
+ scopes: {
2579
+ type: "string[]";
2580
+ required: true;
2581
+ };
2582
+ createdAt: {
2583
+ type: "date";
2584
+ };
2585
+ updatedAt: {
2586
+ type: "date";
2587
+ };
2588
+ };
2589
+ };
2590
+ oauthClientAssertion: {
2591
+ modelName: string;
2592
+ fields: {
2593
+ expiresAt: {
2594
+ type: "date";
2595
+ required: true;
2596
+ };
2597
+ };
2598
+ };
2599
+ };
2600
+ rateLimit: ({
2601
+ pathMatcher: (path: string) => path is "/oauth2/token";
2602
+ window: number;
2603
+ max: number;
2604
+ } | {
2605
+ pathMatcher: (path: string) => path is "/oauth2/authorize";
2606
+ window: number;
2607
+ max: number;
2608
+ } | {
2609
+ pathMatcher: (path: string) => path is "/oauth2/introspect";
2610
+ window: number;
2611
+ max: number;
2612
+ } | {
2613
+ pathMatcher: (path: string) => path is "/oauth2/revoke";
2614
+ window: number;
2615
+ max: number;
2616
+ } | {
2617
+ pathMatcher: (path: string) => path is "/oauth2/register";
2618
+ window: number;
2619
+ max: number;
2620
+ } | {
2621
+ pathMatcher: (path: string) => path is "/oauth2/client/rotate-keys";
2622
+ window: number;
2623
+ max: number;
2624
+ } | {
2625
+ pathMatcher: (path: string) => path is "/oauth2/userinfo";
2626
+ window: number;
2627
+ max: number;
2628
+ })[];
2629
+ }, {
75
2630
  id: "mcp-auth-grant";
76
2631
  endpoints: {
77
2632
  signInGrant: import("better-auth").StrictEndpoint<"/mcp-auth/sign-in-grant", {