@better-auth-ui/react 1.6.0 → 1.6.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.
@@ -9,6 +9,16 @@ export type { PathToObject } from "better-auth/client";
9
9
  */
10
10
  export type AnyAuthClient = Omit<ReturnType<typeof createAuthClient>, "signUp">;
11
11
  declare const authClient: {
12
+ useListPasskeys: () => {
13
+ data: import("@better-auth/passkey/client").Passkey[] | null;
14
+ error: null | import("better-auth/react").BetterFetchError;
15
+ isPending: boolean;
16
+ isRefetching: boolean;
17
+ refetch: (queryParams?: {
18
+ query?: import("better-auth").SessionQueryParams;
19
+ } | undefined) => Promise<void>;
20
+ };
21
+ } & {
12
22
  deleteUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
13
23
  callbackURL?: string | undefined;
14
24
  password?: string | undefined;
@@ -488,107 +498,250 @@ declare const authClient: {
488
498
  INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
489
499
  };
490
500
  } | {
491
- id: "username";
501
+ id: "passkey";
492
502
  version: string;
493
- $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/username").UsernameOptions | undefined) => {
494
- id: "username";
503
+ $InferServerPlugin: ReturnType<(options?: import("@better-auth/passkey/client").PasskeyOptions | undefined) => {
504
+ id: "passkey";
495
505
  version: string;
496
- init(ctx: import("better-auth").AuthContext): {
497
- options: {
498
- databaseHooks: {
499
- user: {
500
- create: {
501
- before(user: {
502
- id: string;
503
- createdAt: Date;
504
- updatedAt: Date;
505
- email: string;
506
- emailVerified: boolean;
507
- name: string;
508
- image?: string | null | undefined;
509
- } & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
510
- data: {
511
- displayUsername?: string | undefined;
512
- username?: string | undefined;
513
- id: string;
514
- createdAt: Date;
515
- updatedAt: Date;
516
- email: string;
517
- emailVerified: boolean;
518
- name: string;
519
- image?: string | null | undefined;
520
- };
521
- }>;
506
+ endpoints: {
507
+ generatePasskeyRegistrationOptions: import("better-auth").StrictEndpoint<"/passkey/generate-register-options", {
508
+ method: "GET";
509
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
510
+ session: {
511
+ session: Record<string, any> & {
512
+ id: string;
513
+ createdAt: Date;
514
+ updatedAt: Date;
515
+ userId: string;
516
+ expiresAt: Date;
517
+ token: string;
518
+ ipAddress?: string | null | undefined;
519
+ userAgent?: string | null | undefined;
522
520
  };
523
- update: {
524
- before(user: Partial<{
525
- id: string;
526
- createdAt: Date;
527
- updatedAt: Date;
528
- email: string;
529
- emailVerified: boolean;
530
- name: string;
531
- image?: string | null | undefined;
532
- }> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
533
- data: {
534
- displayUsername?: string | undefined;
535
- username?: string | undefined;
536
- id?: string | undefined;
537
- createdAt?: Date | undefined;
538
- updatedAt?: Date | undefined;
539
- email?: string | undefined;
540
- emailVerified?: boolean | undefined;
541
- name?: string | undefined;
542
- image?: string | null | undefined;
543
- };
544
- }>;
521
+ user: Record<string, any> & {
522
+ id: string;
523
+ createdAt: Date;
524
+ updatedAt: Date;
525
+ email: string;
526
+ emailVerified: boolean;
527
+ name: string;
528
+ image?: string | null | undefined;
545
529
  };
546
530
  };
547
- };
548
- };
549
- };
550
- endpoints: {
551
- signInUsername: import("better-auth").StrictEndpoint<"/sign-in/username", {
552
- method: "POST";
553
- body: import("zod").ZodObject<{
554
- username: import("zod").ZodString;
555
- password: import("zod").ZodString;
556
- rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
557
- callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
558
- }, import("zod/v4/core").$strip>;
531
+ }>)[] | undefined;
532
+ query: import("zod").ZodOptional<import("zod").ZodObject<{
533
+ authenticatorAttachment: import("zod").ZodOptional<import("zod").ZodEnum<{
534
+ platform: "platform";
535
+ "cross-platform": "cross-platform";
536
+ }>>;
537
+ name: import("zod").ZodOptional<import("zod").ZodString>;
538
+ context: import("zod").ZodOptional<import("zod").ZodString>;
539
+ }, import("zod/v4/core").$strip>>;
559
540
  metadata: {
560
541
  openapi: {
561
- summary: string;
542
+ operationId: string;
562
543
  description: string;
563
544
  responses: {
564
545
  200: {
565
546
  description: string;
547
+ parameters: {
548
+ query: {
549
+ authenticatorAttachment: {
550
+ description: string;
551
+ required: boolean;
552
+ };
553
+ name: {
554
+ description: string;
555
+ required: boolean;
556
+ };
557
+ context: {
558
+ description: string;
559
+ required: boolean;
560
+ };
561
+ };
562
+ };
566
563
  content: {
567
564
  "application/json": {
568
565
  schema: {
569
566
  type: "object";
570
567
  properties: {
571
- token: {
568
+ challenge: {
572
569
  type: string;
573
- description: string;
570
+ };
571
+ rp: {
572
+ type: string;
573
+ properties: {
574
+ name: {
575
+ type: string;
576
+ };
577
+ id: {
578
+ type: string;
579
+ };
580
+ };
574
581
  };
575
582
  user: {
576
- $ref: string;
583
+ type: string;
584
+ properties: {
585
+ id: {
586
+ type: string;
587
+ };
588
+ name: {
589
+ type: string;
590
+ };
591
+ displayName: {
592
+ type: string;
593
+ };
594
+ };
595
+ };
596
+ pubKeyCredParams: {
597
+ type: string;
598
+ items: {
599
+ type: string;
600
+ properties: {
601
+ type: {
602
+ type: string;
603
+ };
604
+ alg: {
605
+ type: string;
606
+ };
607
+ };
608
+ };
609
+ };
610
+ timeout: {
611
+ type: string;
612
+ };
613
+ excludeCredentials: {
614
+ type: string;
615
+ items: {
616
+ type: string;
617
+ properties: {
618
+ id: {
619
+ type: string;
620
+ };
621
+ type: {
622
+ type: string;
623
+ };
624
+ transports: {
625
+ type: string;
626
+ items: {
627
+ type: string;
628
+ };
629
+ };
630
+ };
631
+ };
632
+ };
633
+ authenticatorSelection: {
634
+ type: string;
635
+ properties: {
636
+ authenticatorAttachment: {
637
+ type: string;
638
+ };
639
+ requireResidentKey: {
640
+ type: string;
641
+ };
642
+ userVerification: {
643
+ type: string;
644
+ };
645
+ };
646
+ };
647
+ attestation: {
648
+ type: string;
649
+ };
650
+ extensions: {
651
+ type: string;
577
652
  };
578
653
  };
579
- required: string[];
580
654
  };
581
655
  };
582
656
  };
583
657
  };
584
- 422: {
658
+ };
659
+ };
660
+ };
661
+ }, import("@better-auth/passkey/client").PublicKeyCredentialCreationOptionsJSON>;
662
+ generatePasskeyAuthenticationOptions: import("better-auth").StrictEndpoint<"/passkey/generate-authenticate-options", {
663
+ method: "GET";
664
+ metadata: {
665
+ openapi: {
666
+ operationId: string;
667
+ description: string;
668
+ responses: {
669
+ 200: {
585
670
  description: string;
586
671
  content: {
587
672
  "application/json": {
588
673
  schema: {
589
674
  type: "object";
590
675
  properties: {
591
- message: {
676
+ challenge: {
677
+ type: string;
678
+ };
679
+ rp: {
680
+ type: string;
681
+ properties: {
682
+ name: {
683
+ type: string;
684
+ };
685
+ id: {
686
+ type: string;
687
+ };
688
+ };
689
+ };
690
+ user: {
691
+ type: string;
692
+ properties: {
693
+ id: {
694
+ type: string;
695
+ };
696
+ name: {
697
+ type: string;
698
+ };
699
+ displayName: {
700
+ type: string;
701
+ };
702
+ };
703
+ };
704
+ timeout: {
705
+ type: string;
706
+ };
707
+ allowCredentials: {
708
+ type: string;
709
+ items: {
710
+ type: string;
711
+ properties: {
712
+ id: {
713
+ type: string;
714
+ };
715
+ type: {
716
+ type: string;
717
+ };
718
+ transports: {
719
+ type: string;
720
+ items: {
721
+ type: string;
722
+ };
723
+ };
724
+ };
725
+ };
726
+ };
727
+ userVerification: {
728
+ type: string;
729
+ };
730
+ authenticatorSelection: {
731
+ type: string;
732
+ properties: {
733
+ authenticatorAttachment: {
734
+ type: string;
735
+ };
736
+ requireResidentKey: {
737
+ type: string;
738
+ };
739
+ userVerification: {
740
+ type: string;
741
+ };
742
+ };
743
+ };
744
+ extensions: {
592
745
  type: string;
593
746
  };
594
747
  };
@@ -599,59 +752,660 @@ declare const authClient: {
599
752
  };
600
753
  };
601
754
  };
602
- }, {
603
- token: string;
604
- user: {
605
- id: string;
606
- createdAt: Date;
607
- updatedAt: Date;
608
- email: string;
609
- emailVerified: boolean;
610
- name: string;
611
- image?: string | null | undefined;
612
- } & {
613
- username: string;
614
- displayUsername: string;
755
+ }, import("@better-auth/passkey/client").PublicKeyCredentialRequestOptionsJSON>;
756
+ verifyPasskeyRegistration: import("better-auth").StrictEndpoint<"/passkey/verify-registration", {
757
+ method: "POST";
758
+ body: import("zod").ZodObject<{
759
+ response: import("zod").ZodAny;
760
+ name: import("zod").ZodOptional<import("zod").ZodString>;
761
+ }, import("zod/v4/core").$strip>;
762
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
763
+ session: {
764
+ session: Record<string, any> & {
765
+ id: string;
766
+ createdAt: Date;
767
+ updatedAt: Date;
768
+ userId: string;
769
+ expiresAt: Date;
770
+ token: string;
771
+ ipAddress?: string | null | undefined;
772
+ userAgent?: string | null | undefined;
773
+ };
774
+ user: Record<string, any> & {
775
+ id: string;
776
+ createdAt: Date;
777
+ updatedAt: Date;
778
+ email: string;
779
+ emailVerified: boolean;
780
+ name: string;
781
+ image?: string | null | undefined;
782
+ };
783
+ };
784
+ }>)[] | undefined;
785
+ metadata: {
786
+ openapi: {
787
+ operationId: string;
788
+ description: string;
789
+ responses: {
790
+ 200: {
791
+ description: string;
792
+ content: {
793
+ "application/json": {
794
+ schema: {
795
+ $ref: string;
796
+ };
797
+ };
798
+ };
799
+ };
800
+ 400: {
801
+ description: string;
802
+ };
803
+ };
804
+ };
615
805
  };
616
- }>;
617
- isUsernameAvailable: import("better-auth").StrictEndpoint<"/is-username-available", {
806
+ }, import("@better-auth/passkey/client").Passkey>;
807
+ verifyPasskeyAuthentication: import("better-auth").StrictEndpoint<"/passkey/verify-authentication", {
618
808
  method: "POST";
619
809
  body: import("zod").ZodObject<{
620
- username: import("zod").ZodString;
810
+ response: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
621
811
  }, import("zod/v4/core").$strip>;
622
- }, {
623
- available: boolean;
624
- }>;
625
- };
626
- schema: {
627
- user: {
628
- fields: {
629
- username: {
630
- type: "string";
631
- required: false;
632
- sortable: true;
633
- unique: true;
634
- returned: true;
635
- transform: {
636
- input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
812
+ metadata: {
813
+ openapi: {
814
+ operationId: string;
815
+ description: string;
816
+ responses: {
817
+ 200: {
818
+ description: string;
819
+ content: {
820
+ "application/json": {
821
+ schema: {
822
+ type: "object";
823
+ properties: {
824
+ session: {
825
+ $ref: string;
826
+ };
827
+ user: {
828
+ $ref: string;
829
+ };
830
+ };
831
+ };
832
+ };
833
+ };
834
+ };
637
835
  };
638
836
  };
639
- displayUsername: {
640
- type: "string";
641
- required: false;
642
- transform: {
643
- input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
837
+ $Infer: {
838
+ body: {
839
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
644
840
  };
645
841
  };
646
842
  };
647
- };
648
- };
649
- hooks: {
650
- before: {
651
- matcher(context: import("better-auth").HookEndpointContext): boolean;
652
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
653
- }[];
654
- };
843
+ }, {
844
+ session: {
845
+ id: string;
846
+ createdAt: Date;
847
+ updatedAt: Date;
848
+ userId: string;
849
+ expiresAt: Date;
850
+ token: string;
851
+ ipAddress?: string | null | undefined;
852
+ userAgent?: string | null | undefined;
853
+ };
854
+ }>;
855
+ listPasskeys: import("better-auth").StrictEndpoint<"/passkey/list-user-passkeys", {
856
+ method: "GET";
857
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
858
+ session: {
859
+ session: Record<string, any> & {
860
+ id: string;
861
+ createdAt: Date;
862
+ updatedAt: Date;
863
+ userId: string;
864
+ expiresAt: Date;
865
+ token: string;
866
+ ipAddress?: string | null | undefined;
867
+ userAgent?: string | null | undefined;
868
+ };
869
+ user: Record<string, any> & {
870
+ id: string;
871
+ createdAt: Date;
872
+ updatedAt: Date;
873
+ email: string;
874
+ emailVerified: boolean;
875
+ name: string;
876
+ image?: string | null | undefined;
877
+ };
878
+ };
879
+ }>)[];
880
+ metadata: {
881
+ openapi: {
882
+ description: string;
883
+ responses: {
884
+ "200": {
885
+ description: string;
886
+ content: {
887
+ "application/json": {
888
+ schema: {
889
+ type: "array";
890
+ items: {
891
+ $ref: string;
892
+ required: string[];
893
+ };
894
+ description: string;
895
+ };
896
+ };
897
+ };
898
+ };
899
+ };
900
+ };
901
+ };
902
+ }, import("@better-auth/passkey/client").Passkey[]>;
903
+ deletePasskey: import("better-auth").StrictEndpoint<"/passkey/delete-passkey", {
904
+ method: "POST";
905
+ body: import("zod").ZodObject<{
906
+ id: import("zod").ZodString;
907
+ }, import("zod/v4/core").$strip>;
908
+ use: (((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
909
+ session: {
910
+ session: Record<string, any> & {
911
+ id: string;
912
+ createdAt: Date;
913
+ updatedAt: Date;
914
+ userId: string;
915
+ expiresAt: Date;
916
+ token: string;
917
+ ipAddress?: string | null | undefined;
918
+ userAgent?: string | null | undefined;
919
+ };
920
+ user: Record<string, any> & {
921
+ id: string;
922
+ createdAt: Date;
923
+ updatedAt: Date;
924
+ email: string;
925
+ emailVerified: boolean;
926
+ name: string;
927
+ image?: string | null | undefined;
928
+ };
929
+ };
930
+ }>) | ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
931
+ verifiedResource: {};
932
+ }>))[];
933
+ metadata: {
934
+ openapi: {
935
+ description: string;
936
+ responses: {
937
+ "200": {
938
+ description: string;
939
+ content: {
940
+ "application/json": {
941
+ schema: {
942
+ type: "object";
943
+ properties: {
944
+ status: {
945
+ type: string;
946
+ description: string;
947
+ };
948
+ };
949
+ required: string[];
950
+ };
951
+ };
952
+ };
953
+ };
954
+ };
955
+ };
956
+ };
957
+ }, {
958
+ status: boolean;
959
+ }>;
960
+ updatePasskey: import("better-auth").StrictEndpoint<"/passkey/update-passkey", {
961
+ method: "POST";
962
+ body: import("zod").ZodObject<{
963
+ id: import("zod").ZodString;
964
+ name: import("zod").ZodString;
965
+ }, import("zod/v4/core").$strip>;
966
+ use: (((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
967
+ session: {
968
+ session: Record<string, any> & {
969
+ id: string;
970
+ createdAt: Date;
971
+ updatedAt: Date;
972
+ userId: string;
973
+ expiresAt: Date;
974
+ token: string;
975
+ ipAddress?: string | null | undefined;
976
+ userAgent?: string | null | undefined;
977
+ };
978
+ user: Record<string, any> & {
979
+ id: string;
980
+ createdAt: Date;
981
+ updatedAt: Date;
982
+ email: string;
983
+ emailVerified: boolean;
984
+ name: string;
985
+ image?: string | null | undefined;
986
+ };
987
+ };
988
+ }>) | ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
989
+ verifiedResource: {};
990
+ }>))[];
991
+ metadata: {
992
+ openapi: {
993
+ description: string;
994
+ responses: {
995
+ "200": {
996
+ description: string;
997
+ content: {
998
+ "application/json": {
999
+ schema: {
1000
+ type: "object";
1001
+ properties: {
1002
+ passkey: {
1003
+ $ref: string;
1004
+ };
1005
+ };
1006
+ required: string[];
1007
+ };
1008
+ };
1009
+ };
1010
+ };
1011
+ };
1012
+ };
1013
+ };
1014
+ }, {
1015
+ passkey: import("@better-auth/passkey/client").Passkey;
1016
+ }>;
1017
+ };
1018
+ schema: {
1019
+ passkey: {
1020
+ fields: {
1021
+ name: {
1022
+ type: "string";
1023
+ required: false;
1024
+ };
1025
+ publicKey: {
1026
+ type: "string";
1027
+ required: true;
1028
+ };
1029
+ userId: {
1030
+ type: "string";
1031
+ references: {
1032
+ model: string;
1033
+ field: string;
1034
+ };
1035
+ required: true;
1036
+ index: true;
1037
+ };
1038
+ credentialID: {
1039
+ type: "string";
1040
+ required: true;
1041
+ index: true;
1042
+ };
1043
+ counter: {
1044
+ type: "number";
1045
+ required: true;
1046
+ };
1047
+ deviceType: {
1048
+ type: "string";
1049
+ required: true;
1050
+ };
1051
+ backedUp: {
1052
+ type: "boolean";
1053
+ required: true;
1054
+ };
1055
+ transports: {
1056
+ type: "string";
1057
+ required: false;
1058
+ };
1059
+ createdAt: {
1060
+ type: "date";
1061
+ required: false;
1062
+ };
1063
+ aaguid: {
1064
+ type: "string";
1065
+ required: false;
1066
+ };
1067
+ };
1068
+ };
1069
+ };
1070
+ $ERROR_CODES: {
1071
+ CHALLENGE_NOT_FOUND: import("better-auth").RawError<"CHALLENGE_NOT_FOUND">;
1072
+ YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
1073
+ FAILED_TO_VERIFY_REGISTRATION: import("better-auth").RawError<"FAILED_TO_VERIFY_REGISTRATION">;
1074
+ PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
1075
+ AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
1076
+ UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
1077
+ FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
1078
+ PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
1079
+ REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
1080
+ AUTH_CANCELLED: import("better-auth").RawError<"AUTH_CANCELLED">;
1081
+ UNKNOWN_ERROR: import("better-auth").RawError<"UNKNOWN_ERROR">;
1082
+ SESSION_REQUIRED: import("better-auth").RawError<"SESSION_REQUIRED">;
1083
+ RESOLVE_USER_REQUIRED: import("better-auth").RawError<"RESOLVE_USER_REQUIRED">;
1084
+ RESOLVED_USER_INVALID: import("better-auth").RawError<"RESOLVED_USER_INVALID">;
1085
+ };
1086
+ options: import("@better-auth/passkey/client").PasskeyOptions | undefined;
1087
+ }>;
1088
+ getActions: ($fetch: import("better-auth/react").BetterFetch, $store: import("better-auth").ClientStore) => {
1089
+ signIn: {
1090
+ passkey: (opts?: {
1091
+ autoFill?: boolean;
1092
+ extensions?: import("@better-auth/passkey/client").AuthenticationExtensionsClientInputs;
1093
+ returnWebAuthnResponse?: boolean;
1094
+ fetchOptions?: import("better-auth").ClientFetchOption;
1095
+ } | undefined, options?: import("better-auth").ClientFetchOption | undefined) => Promise<{
1096
+ data: null;
1097
+ error: {
1098
+ message?: string | undefined;
1099
+ status: number;
1100
+ statusText: string;
1101
+ };
1102
+ } | {
1103
+ data: {
1104
+ session: {
1105
+ id: string;
1106
+ createdAt: Date;
1107
+ updatedAt: Date;
1108
+ userId: string;
1109
+ expiresAt: Date;
1110
+ token: string;
1111
+ ipAddress?: string | null | undefined;
1112
+ userAgent?: string | null | undefined;
1113
+ };
1114
+ user: {
1115
+ id: string;
1116
+ createdAt: Date;
1117
+ updatedAt: Date;
1118
+ email: string;
1119
+ emailVerified: boolean;
1120
+ name: string;
1121
+ image?: string | null | undefined;
1122
+ };
1123
+ };
1124
+ error: null;
1125
+ } | {
1126
+ webauthn: {
1127
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
1128
+ clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
1129
+ };
1130
+ data: null;
1131
+ error: {
1132
+ message?: string | undefined;
1133
+ status: number;
1134
+ statusText: string;
1135
+ };
1136
+ } | {
1137
+ webauthn: {
1138
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
1139
+ clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
1140
+ };
1141
+ data: {
1142
+ session: {
1143
+ id: string;
1144
+ createdAt: Date;
1145
+ updatedAt: Date;
1146
+ userId: string;
1147
+ expiresAt: Date;
1148
+ token: string;
1149
+ ipAddress?: string | null | undefined;
1150
+ userAgent?: string | null | undefined;
1151
+ };
1152
+ user: {
1153
+ id: string;
1154
+ createdAt: Date;
1155
+ updatedAt: Date;
1156
+ email: string;
1157
+ emailVerified: boolean;
1158
+ name: string;
1159
+ image?: string | null | undefined;
1160
+ };
1161
+ };
1162
+ error: null;
1163
+ } | {
1164
+ data: null;
1165
+ error: {
1166
+ code: string;
1167
+ message: string;
1168
+ status: number;
1169
+ statusText: string;
1170
+ };
1171
+ }>;
1172
+ };
1173
+ passkey: {
1174
+ addPasskey: (opts?: {
1175
+ fetchOptions?: import("better-auth").ClientFetchOption;
1176
+ name?: string;
1177
+ authenticatorAttachment?: "platform" | "cross-platform";
1178
+ context?: string | null;
1179
+ extensions?: import("@better-auth/passkey/client").AuthenticationExtensionsClientInputs;
1180
+ useAutoRegister?: boolean;
1181
+ returnWebAuthnResponse?: boolean;
1182
+ } | undefined, fetchOpts?: import("better-auth").ClientFetchOption | undefined) => Promise<{
1183
+ data: null;
1184
+ error: {
1185
+ message?: string | undefined;
1186
+ status: number;
1187
+ statusText: string;
1188
+ };
1189
+ } | {
1190
+ data: import("@better-auth/passkey/client").Passkey;
1191
+ error: null;
1192
+ } | {
1193
+ webauthn: {
1194
+ response: import("@better-auth/passkey/client").RegistrationResponseJSON;
1195
+ clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
1196
+ };
1197
+ data: import("@better-auth/passkey/client").Passkey;
1198
+ error: null;
1199
+ } | {
1200
+ data: null;
1201
+ error: {
1202
+ code: string;
1203
+ message: string;
1204
+ status: number;
1205
+ statusText: string;
1206
+ };
1207
+ }>;
1208
+ };
1209
+ $Infer: {
1210
+ Passkey: import("@better-auth/passkey/client").Passkey;
1211
+ };
1212
+ };
1213
+ getAtoms($fetch: import("better-auth/react").BetterFetch): {
1214
+ listPasskeys: import("better-auth/client").AuthQueryAtom<import("@better-auth/passkey/client").Passkey[]>;
1215
+ $listPasskeys: import("better-auth/react").PreinitializedWritableAtom<any> & object;
1216
+ };
1217
+ pathMethods: {
1218
+ "/passkey/register": "POST";
1219
+ "/passkey/authenticate": "POST";
1220
+ };
1221
+ atomListeners: ({
1222
+ matcher(path: string): path is "/passkey/delete-passkey" | "/passkey/update-passkey" | "/passkey/verify-registration" | "/sign-out";
1223
+ signal: "$listPasskeys";
1224
+ } | {
1225
+ matcher: (path: string) => path is "/passkey/verify-authentication";
1226
+ signal: "$sessionSignal";
1227
+ })[];
1228
+ $ERROR_CODES: {
1229
+ CHALLENGE_NOT_FOUND: import("better-auth").RawError<"CHALLENGE_NOT_FOUND">;
1230
+ YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
1231
+ FAILED_TO_VERIFY_REGISTRATION: import("better-auth").RawError<"FAILED_TO_VERIFY_REGISTRATION">;
1232
+ PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
1233
+ AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
1234
+ UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
1235
+ FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
1236
+ PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
1237
+ REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
1238
+ AUTH_CANCELLED: import("better-auth").RawError<"AUTH_CANCELLED">;
1239
+ UNKNOWN_ERROR: import("better-auth").RawError<"UNKNOWN_ERROR">;
1240
+ SESSION_REQUIRED: import("better-auth").RawError<"SESSION_REQUIRED">;
1241
+ RESOLVE_USER_REQUIRED: import("better-auth").RawError<"RESOLVE_USER_REQUIRED">;
1242
+ RESOLVED_USER_INVALID: import("better-auth").RawError<"RESOLVED_USER_INVALID">;
1243
+ };
1244
+ } | {
1245
+ id: "username";
1246
+ version: string;
1247
+ $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/username").UsernameOptions | undefined) => {
1248
+ id: "username";
1249
+ version: string;
1250
+ init(ctx: import("better-auth").AuthContext): {
1251
+ options: {
1252
+ databaseHooks: {
1253
+ user: {
1254
+ create: {
1255
+ before(user: {
1256
+ id: string;
1257
+ createdAt: Date;
1258
+ updatedAt: Date;
1259
+ email: string;
1260
+ emailVerified: boolean;
1261
+ name: string;
1262
+ image?: string | null | undefined;
1263
+ } & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
1264
+ data: {
1265
+ displayUsername?: string | undefined;
1266
+ username?: string | undefined;
1267
+ id: string;
1268
+ createdAt: Date;
1269
+ updatedAt: Date;
1270
+ email: string;
1271
+ emailVerified: boolean;
1272
+ name: string;
1273
+ image?: string | null | undefined;
1274
+ };
1275
+ }>;
1276
+ };
1277
+ update: {
1278
+ before(user: Partial<{
1279
+ id: string;
1280
+ createdAt: Date;
1281
+ updatedAt: Date;
1282
+ email: string;
1283
+ emailVerified: boolean;
1284
+ name: string;
1285
+ image?: string | null | undefined;
1286
+ }> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
1287
+ data: {
1288
+ displayUsername?: string | undefined;
1289
+ username?: string | undefined;
1290
+ id?: string | undefined;
1291
+ createdAt?: Date | undefined;
1292
+ updatedAt?: Date | undefined;
1293
+ email?: string | undefined;
1294
+ emailVerified?: boolean | undefined;
1295
+ name?: string | undefined;
1296
+ image?: string | null | undefined;
1297
+ };
1298
+ }>;
1299
+ };
1300
+ };
1301
+ };
1302
+ };
1303
+ };
1304
+ endpoints: {
1305
+ signInUsername: import("better-auth").StrictEndpoint<"/sign-in/username", {
1306
+ method: "POST";
1307
+ body: import("zod").ZodObject<{
1308
+ username: import("zod").ZodString;
1309
+ password: import("zod").ZodString;
1310
+ rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
1311
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1312
+ }, import("zod/v4/core").$strip>;
1313
+ metadata: {
1314
+ openapi: {
1315
+ summary: string;
1316
+ description: string;
1317
+ responses: {
1318
+ 200: {
1319
+ description: string;
1320
+ content: {
1321
+ "application/json": {
1322
+ schema: {
1323
+ type: "object";
1324
+ properties: {
1325
+ token: {
1326
+ type: string;
1327
+ description: string;
1328
+ };
1329
+ user: {
1330
+ $ref: string;
1331
+ };
1332
+ };
1333
+ required: string[];
1334
+ };
1335
+ };
1336
+ };
1337
+ };
1338
+ 422: {
1339
+ description: string;
1340
+ content: {
1341
+ "application/json": {
1342
+ schema: {
1343
+ type: "object";
1344
+ properties: {
1345
+ message: {
1346
+ type: string;
1347
+ };
1348
+ };
1349
+ };
1350
+ };
1351
+ };
1352
+ };
1353
+ };
1354
+ };
1355
+ };
1356
+ }, {
1357
+ token: string;
1358
+ user: {
1359
+ id: string;
1360
+ createdAt: Date;
1361
+ updatedAt: Date;
1362
+ email: string;
1363
+ emailVerified: boolean;
1364
+ name: string;
1365
+ image?: string | null | undefined;
1366
+ } & {
1367
+ username: string;
1368
+ displayUsername: string;
1369
+ };
1370
+ }>;
1371
+ isUsernameAvailable: import("better-auth").StrictEndpoint<"/is-username-available", {
1372
+ method: "POST";
1373
+ body: import("zod").ZodObject<{
1374
+ username: import("zod").ZodString;
1375
+ }, import("zod/v4/core").$strip>;
1376
+ }, {
1377
+ available: boolean;
1378
+ }>;
1379
+ };
1380
+ schema: {
1381
+ user: {
1382
+ fields: {
1383
+ username: {
1384
+ type: "string";
1385
+ required: false;
1386
+ sortable: true;
1387
+ unique: true;
1388
+ returned: true;
1389
+ transform: {
1390
+ input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
1391
+ };
1392
+ };
1393
+ displayUsername: {
1394
+ type: "string";
1395
+ required: false;
1396
+ transform: {
1397
+ input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
1398
+ };
1399
+ };
1400
+ };
1401
+ };
1402
+ };
1403
+ hooks: {
1404
+ before: {
1405
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
1406
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
1407
+ }[];
1408
+ };
655
1409
  options: import("better-auth/plugins/username").UsernameOptions | undefined;
656
1410
  $ERROR_CODES: {
657
1411
  EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
@@ -844,11 +1598,296 @@ declare const authClient: {
844
1598
  body: import("zod").ZodObject<{
845
1599
  email: import("zod").ZodEmail;
846
1600
  name: import("zod").ZodOptional<import("zod").ZodString>;
847
- callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
848
- newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
849
- errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
850
- metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
851
- }, import("zod/v4/core").$strip>;
1601
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1602
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1603
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1604
+ metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
1605
+ }, import("zod/v4/core").$strip>;
1606
+ metadata: {
1607
+ openapi: {
1608
+ operationId: string;
1609
+ description: string;
1610
+ responses: {
1611
+ 200: {
1612
+ description: string;
1613
+ content: {
1614
+ "application/json": {
1615
+ schema: {
1616
+ type: "object";
1617
+ properties: {
1618
+ status: {
1619
+ type: string;
1620
+ };
1621
+ };
1622
+ };
1623
+ };
1624
+ };
1625
+ };
1626
+ };
1627
+ };
1628
+ };
1629
+ }, {
1630
+ status: boolean;
1631
+ }>;
1632
+ magicLinkVerify: import("better-auth").StrictEndpoint<"/magic-link/verify", {
1633
+ method: "GET";
1634
+ query: import("zod").ZodObject<{
1635
+ token: import("zod").ZodString;
1636
+ callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1637
+ errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1638
+ newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
1639
+ }, import("zod/v4/core").$strip>;
1640
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>)[];
1641
+ requireHeaders: true;
1642
+ metadata: {
1643
+ openapi: {
1644
+ operationId: string;
1645
+ description: string;
1646
+ responses: {
1647
+ 200: {
1648
+ description: string;
1649
+ content: {
1650
+ "application/json": {
1651
+ schema: {
1652
+ type: "object";
1653
+ properties: {
1654
+ session: {
1655
+ $ref: string;
1656
+ };
1657
+ user: {
1658
+ $ref: string;
1659
+ };
1660
+ };
1661
+ };
1662
+ };
1663
+ };
1664
+ };
1665
+ };
1666
+ };
1667
+ };
1668
+ }, {
1669
+ token: string;
1670
+ user: {
1671
+ id: string;
1672
+ createdAt: Date;
1673
+ updatedAt: Date;
1674
+ email: string;
1675
+ emailVerified: boolean;
1676
+ name: string;
1677
+ image?: string | null | undefined;
1678
+ };
1679
+ session: {
1680
+ id: string;
1681
+ createdAt: Date;
1682
+ updatedAt: Date;
1683
+ userId: string;
1684
+ expiresAt: Date;
1685
+ token: string;
1686
+ ipAddress?: string | null | undefined;
1687
+ userAgent?: string | null | undefined;
1688
+ };
1689
+ }>;
1690
+ };
1691
+ rateLimit: {
1692
+ pathMatcher(path: string): boolean;
1693
+ window: number;
1694
+ max: number;
1695
+ }[];
1696
+ options: import("better-auth/plugins/magic-link").MagicLinkOptions;
1697
+ }>;
1698
+ } | {
1699
+ id: "multi-session";
1700
+ version: string;
1701
+ $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined) => {
1702
+ id: "multi-session";
1703
+ version: string;
1704
+ endpoints: {
1705
+ listDeviceSessions: import("better-auth").StrictEndpoint<"/multi-session/list-device-sessions", {
1706
+ method: "GET";
1707
+ requireHeaders: true;
1708
+ }, {
1709
+ session: {
1710
+ id: string;
1711
+ createdAt: Date;
1712
+ updatedAt: Date;
1713
+ userId: string;
1714
+ expiresAt: Date;
1715
+ token: string;
1716
+ ipAddress?: string | null | undefined;
1717
+ userAgent?: string | null | undefined;
1718
+ };
1719
+ user: {
1720
+ id: string;
1721
+ createdAt: Date;
1722
+ updatedAt: Date;
1723
+ email: string;
1724
+ emailVerified: boolean;
1725
+ name: string;
1726
+ image?: string | null | undefined;
1727
+ };
1728
+ }[]>;
1729
+ setActiveSession: import("better-auth").StrictEndpoint<"/multi-session/set-active", {
1730
+ method: "POST";
1731
+ body: import("zod").ZodObject<{
1732
+ sessionToken: import("zod").ZodString;
1733
+ }, import("zod/v4/core").$strip>;
1734
+ requireHeaders: true;
1735
+ metadata: {
1736
+ openapi: {
1737
+ description: string;
1738
+ responses: {
1739
+ 200: {
1740
+ description: string;
1741
+ content: {
1742
+ "application/json": {
1743
+ schema: {
1744
+ type: "object";
1745
+ properties: {
1746
+ session: {
1747
+ $ref: string;
1748
+ };
1749
+ };
1750
+ };
1751
+ };
1752
+ };
1753
+ };
1754
+ };
1755
+ };
1756
+ };
1757
+ }, {
1758
+ session: {
1759
+ id: string;
1760
+ createdAt: Date;
1761
+ updatedAt: Date;
1762
+ userId: string;
1763
+ expiresAt: Date;
1764
+ token: string;
1765
+ ipAddress?: string | null | undefined;
1766
+ userAgent?: string | null | undefined;
1767
+ } & Record<string, any>;
1768
+ user: {
1769
+ id: string;
1770
+ createdAt: Date;
1771
+ updatedAt: Date;
1772
+ email: string;
1773
+ emailVerified: boolean;
1774
+ name: string;
1775
+ image?: string | null | undefined;
1776
+ } & Record<string, any>;
1777
+ }>;
1778
+ revokeDeviceSession: import("better-auth").StrictEndpoint<"/multi-session/revoke", {
1779
+ method: "POST";
1780
+ body: import("zod").ZodObject<{
1781
+ sessionToken: import("zod").ZodString;
1782
+ }, import("zod/v4/core").$strip>;
1783
+ requireHeaders: true;
1784
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1785
+ session: {
1786
+ session: Record<string, any> & {
1787
+ id: string;
1788
+ createdAt: Date;
1789
+ updatedAt: Date;
1790
+ userId: string;
1791
+ expiresAt: Date;
1792
+ token: string;
1793
+ ipAddress?: string | null | undefined;
1794
+ userAgent?: string | null | undefined;
1795
+ };
1796
+ user: Record<string, any> & {
1797
+ id: string;
1798
+ createdAt: Date;
1799
+ updatedAt: Date;
1800
+ email: string;
1801
+ emailVerified: boolean;
1802
+ name: string;
1803
+ image?: string | null | undefined;
1804
+ };
1805
+ };
1806
+ }>)[];
1807
+ metadata: {
1808
+ openapi: {
1809
+ description: string;
1810
+ responses: {
1811
+ 200: {
1812
+ description: string;
1813
+ content: {
1814
+ "application/json": {
1815
+ schema: {
1816
+ type: "object";
1817
+ properties: {
1818
+ status: {
1819
+ type: string;
1820
+ };
1821
+ };
1822
+ };
1823
+ };
1824
+ };
1825
+ };
1826
+ };
1827
+ };
1828
+ };
1829
+ }, {
1830
+ status: boolean;
1831
+ }>;
1832
+ };
1833
+ hooks: {
1834
+ after: {
1835
+ matcher: (context: import("better-auth").HookEndpointContext) => boolean;
1836
+ handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
1837
+ }[];
1838
+ };
1839
+ options: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined;
1840
+ $ERROR_CODES: {
1841
+ INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
1842
+ };
1843
+ }>;
1844
+ atomListeners: {
1845
+ matcher(path: string): path is "/multi-session/set-active";
1846
+ signal: "$sessionSignal";
1847
+ }[];
1848
+ $ERROR_CODES: {
1849
+ INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
1850
+ };
1851
+ } | {
1852
+ id: "passkey";
1853
+ version: string;
1854
+ $InferServerPlugin: ReturnType<(options?: import("@better-auth/passkey/client").PasskeyOptions | undefined) => {
1855
+ id: "passkey";
1856
+ version: string;
1857
+ endpoints: {
1858
+ generatePasskeyRegistrationOptions: import("better-auth").StrictEndpoint<"/passkey/generate-register-options", {
1859
+ method: "GET";
1860
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1861
+ session: {
1862
+ session: Record<string, any> & {
1863
+ id: string;
1864
+ createdAt: Date;
1865
+ updatedAt: Date;
1866
+ userId: string;
1867
+ expiresAt: Date;
1868
+ token: string;
1869
+ ipAddress?: string | null | undefined;
1870
+ userAgent?: string | null | undefined;
1871
+ };
1872
+ user: Record<string, any> & {
1873
+ id: string;
1874
+ createdAt: Date;
1875
+ updatedAt: Date;
1876
+ email: string;
1877
+ emailVerified: boolean;
1878
+ name: string;
1879
+ image?: string | null | undefined;
1880
+ };
1881
+ };
1882
+ }>)[] | undefined;
1883
+ query: import("zod").ZodOptional<import("zod").ZodObject<{
1884
+ authenticatorAttachment: import("zod").ZodOptional<import("zod").ZodEnum<{
1885
+ platform: "platform";
1886
+ "cross-platform": "cross-platform";
1887
+ }>>;
1888
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1889
+ context: import("zod").ZodOptional<import("zod").ZodString>;
1890
+ }, import("zod/v4/core").$strip>>;
852
1891
  metadata: {
853
1892
  openapi: {
854
1893
  operationId: string;
@@ -856,12 +1895,110 @@ declare const authClient: {
856
1895
  responses: {
857
1896
  200: {
858
1897
  description: string;
1898
+ parameters: {
1899
+ query: {
1900
+ authenticatorAttachment: {
1901
+ description: string;
1902
+ required: boolean;
1903
+ };
1904
+ name: {
1905
+ description: string;
1906
+ required: boolean;
1907
+ };
1908
+ context: {
1909
+ description: string;
1910
+ required: boolean;
1911
+ };
1912
+ };
1913
+ };
859
1914
  content: {
860
1915
  "application/json": {
861
1916
  schema: {
862
1917
  type: "object";
863
1918
  properties: {
864
- status: {
1919
+ challenge: {
1920
+ type: string;
1921
+ };
1922
+ rp: {
1923
+ type: string;
1924
+ properties: {
1925
+ name: {
1926
+ type: string;
1927
+ };
1928
+ id: {
1929
+ type: string;
1930
+ };
1931
+ };
1932
+ };
1933
+ user: {
1934
+ type: string;
1935
+ properties: {
1936
+ id: {
1937
+ type: string;
1938
+ };
1939
+ name: {
1940
+ type: string;
1941
+ };
1942
+ displayName: {
1943
+ type: string;
1944
+ };
1945
+ };
1946
+ };
1947
+ pubKeyCredParams: {
1948
+ type: string;
1949
+ items: {
1950
+ type: string;
1951
+ properties: {
1952
+ type: {
1953
+ type: string;
1954
+ };
1955
+ alg: {
1956
+ type: string;
1957
+ };
1958
+ };
1959
+ };
1960
+ };
1961
+ timeout: {
1962
+ type: string;
1963
+ };
1964
+ excludeCredentials: {
1965
+ type: string;
1966
+ items: {
1967
+ type: string;
1968
+ properties: {
1969
+ id: {
1970
+ type: string;
1971
+ };
1972
+ type: {
1973
+ type: string;
1974
+ };
1975
+ transports: {
1976
+ type: string;
1977
+ items: {
1978
+ type: string;
1979
+ };
1980
+ };
1981
+ };
1982
+ };
1983
+ };
1984
+ authenticatorSelection: {
1985
+ type: string;
1986
+ properties: {
1987
+ authenticatorAttachment: {
1988
+ type: string;
1989
+ };
1990
+ requireResidentKey: {
1991
+ type: string;
1992
+ };
1993
+ userVerification: {
1994
+ type: string;
1995
+ };
1996
+ };
1997
+ };
1998
+ attestation: {
1999
+ type: string;
2000
+ };
2001
+ extensions: {
865
2002
  type: string;
866
2003
  };
867
2004
  };
@@ -872,19 +2009,157 @@ declare const authClient: {
872
2009
  };
873
2010
  };
874
2011
  };
875
- }, {
876
- status: boolean;
877
- }>;
878
- magicLinkVerify: import("better-auth").StrictEndpoint<"/magic-link/verify", {
2012
+ }, import("@better-auth/passkey/client").PublicKeyCredentialCreationOptionsJSON>;
2013
+ generatePasskeyAuthenticationOptions: import("better-auth").StrictEndpoint<"/passkey/generate-authenticate-options", {
879
2014
  method: "GET";
880
- query: import("zod").ZodObject<{
881
- token: import("zod").ZodString;
882
- callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
883
- errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
884
- newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
2015
+ metadata: {
2016
+ openapi: {
2017
+ operationId: string;
2018
+ description: string;
2019
+ responses: {
2020
+ 200: {
2021
+ description: string;
2022
+ content: {
2023
+ "application/json": {
2024
+ schema: {
2025
+ type: "object";
2026
+ properties: {
2027
+ challenge: {
2028
+ type: string;
2029
+ };
2030
+ rp: {
2031
+ type: string;
2032
+ properties: {
2033
+ name: {
2034
+ type: string;
2035
+ };
2036
+ id: {
2037
+ type: string;
2038
+ };
2039
+ };
2040
+ };
2041
+ user: {
2042
+ type: string;
2043
+ properties: {
2044
+ id: {
2045
+ type: string;
2046
+ };
2047
+ name: {
2048
+ type: string;
2049
+ };
2050
+ displayName: {
2051
+ type: string;
2052
+ };
2053
+ };
2054
+ };
2055
+ timeout: {
2056
+ type: string;
2057
+ };
2058
+ allowCredentials: {
2059
+ type: string;
2060
+ items: {
2061
+ type: string;
2062
+ properties: {
2063
+ id: {
2064
+ type: string;
2065
+ };
2066
+ type: {
2067
+ type: string;
2068
+ };
2069
+ transports: {
2070
+ type: string;
2071
+ items: {
2072
+ type: string;
2073
+ };
2074
+ };
2075
+ };
2076
+ };
2077
+ };
2078
+ userVerification: {
2079
+ type: string;
2080
+ };
2081
+ authenticatorSelection: {
2082
+ type: string;
2083
+ properties: {
2084
+ authenticatorAttachment: {
2085
+ type: string;
2086
+ };
2087
+ requireResidentKey: {
2088
+ type: string;
2089
+ };
2090
+ userVerification: {
2091
+ type: string;
2092
+ };
2093
+ };
2094
+ };
2095
+ extensions: {
2096
+ type: string;
2097
+ };
2098
+ };
2099
+ };
2100
+ };
2101
+ };
2102
+ };
2103
+ };
2104
+ };
2105
+ };
2106
+ }, import("@better-auth/passkey/client").PublicKeyCredentialRequestOptionsJSON>;
2107
+ verifyPasskeyRegistration: import("better-auth").StrictEndpoint<"/passkey/verify-registration", {
2108
+ method: "POST";
2109
+ body: import("zod").ZodObject<{
2110
+ response: import("zod").ZodAny;
2111
+ name: import("zod").ZodOptional<import("zod").ZodString>;
2112
+ }, import("zod/v4/core").$strip>;
2113
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2114
+ session: {
2115
+ session: Record<string, any> & {
2116
+ id: string;
2117
+ createdAt: Date;
2118
+ updatedAt: Date;
2119
+ userId: string;
2120
+ expiresAt: Date;
2121
+ token: string;
2122
+ ipAddress?: string | null | undefined;
2123
+ userAgent?: string | null | undefined;
2124
+ };
2125
+ user: Record<string, any> & {
2126
+ id: string;
2127
+ createdAt: Date;
2128
+ updatedAt: Date;
2129
+ email: string;
2130
+ emailVerified: boolean;
2131
+ name: string;
2132
+ image?: string | null | undefined;
2133
+ };
2134
+ };
2135
+ }>)[] | undefined;
2136
+ metadata: {
2137
+ openapi: {
2138
+ operationId: string;
2139
+ description: string;
2140
+ responses: {
2141
+ 200: {
2142
+ description: string;
2143
+ content: {
2144
+ "application/json": {
2145
+ schema: {
2146
+ $ref: string;
2147
+ };
2148
+ };
2149
+ };
2150
+ };
2151
+ 400: {
2152
+ description: string;
2153
+ };
2154
+ };
2155
+ };
2156
+ };
2157
+ }, import("@better-auth/passkey/client").Passkey>;
2158
+ verifyPasskeyAuthentication: import("better-auth").StrictEndpoint<"/passkey/verify-authentication", {
2159
+ method: "POST";
2160
+ body: import("zod").ZodObject<{
2161
+ response: import("zod").ZodRecord<import("zod").ZodAny, import("zod").ZodAny>;
885
2162
  }, import("zod/v4/core").$strip>;
886
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>)[];
887
- requireHeaders: true;
888
2163
  metadata: {
889
2164
  openapi: {
890
2165
  operationId: string;
@@ -910,18 +2185,13 @@ declare const authClient: {
910
2185
  };
911
2186
  };
912
2187
  };
2188
+ $Infer: {
2189
+ body: {
2190
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
2191
+ };
2192
+ };
913
2193
  };
914
2194
  }, {
915
- token: string;
916
- user: {
917
- id: string;
918
- createdAt: Date;
919
- updatedAt: Date;
920
- email: string;
921
- emailVerified: boolean;
922
- name: string;
923
- image?: string | null | undefined;
924
- };
925
2195
  session: {
926
2196
  id: string;
927
2197
  createdAt: Date;
@@ -933,66 +2203,101 @@ declare const authClient: {
933
2203
  userAgent?: string | null | undefined;
934
2204
  };
935
2205
  }>;
936
- };
937
- rateLimit: {
938
- pathMatcher(path: string): boolean;
939
- window: number;
940
- max: number;
941
- }[];
942
- options: import("better-auth/plugins/magic-link").MagicLinkOptions;
943
- }>;
944
- } | {
945
- id: "multi-session";
946
- version: string;
947
- $InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined) => {
948
- id: "multi-session";
949
- version: string;
950
- endpoints: {
951
- listDeviceSessions: import("better-auth").StrictEndpoint<"/multi-session/list-device-sessions", {
2206
+ listPasskeys: import("better-auth").StrictEndpoint<"/passkey/list-user-passkeys", {
952
2207
  method: "GET";
953
- requireHeaders: true;
954
- }, {
955
- session: {
956
- id: string;
957
- createdAt: Date;
958
- updatedAt: Date;
959
- userId: string;
960
- expiresAt: Date;
961
- token: string;
962
- ipAddress?: string | null | undefined;
963
- userAgent?: string | null | undefined;
964
- };
965
- user: {
966
- id: string;
967
- createdAt: Date;
968
- updatedAt: Date;
969
- email: string;
970
- emailVerified: boolean;
971
- name: string;
972
- image?: string | null | undefined;
2208
+ use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2209
+ session: {
2210
+ session: Record<string, any> & {
2211
+ id: string;
2212
+ createdAt: Date;
2213
+ updatedAt: Date;
2214
+ userId: string;
2215
+ expiresAt: Date;
2216
+ token: string;
2217
+ ipAddress?: string | null | undefined;
2218
+ userAgent?: string | null | undefined;
2219
+ };
2220
+ user: Record<string, any> & {
2221
+ id: string;
2222
+ createdAt: Date;
2223
+ updatedAt: Date;
2224
+ email: string;
2225
+ emailVerified: boolean;
2226
+ name: string;
2227
+ image?: string | null | undefined;
2228
+ };
2229
+ };
2230
+ }>)[];
2231
+ metadata: {
2232
+ openapi: {
2233
+ description: string;
2234
+ responses: {
2235
+ "200": {
2236
+ description: string;
2237
+ content: {
2238
+ "application/json": {
2239
+ schema: {
2240
+ type: "array";
2241
+ items: {
2242
+ $ref: string;
2243
+ required: string[];
2244
+ };
2245
+ description: string;
2246
+ };
2247
+ };
2248
+ };
2249
+ };
2250
+ };
2251
+ };
973
2252
  };
974
- }[]>;
975
- setActiveSession: import("better-auth").StrictEndpoint<"/multi-session/set-active", {
2253
+ }, import("@better-auth/passkey/client").Passkey[]>;
2254
+ deletePasskey: import("better-auth").StrictEndpoint<"/passkey/delete-passkey", {
976
2255
  method: "POST";
977
2256
  body: import("zod").ZodObject<{
978
- sessionToken: import("zod").ZodString;
2257
+ id: import("zod").ZodString;
979
2258
  }, import("zod/v4/core").$strip>;
980
- requireHeaders: true;
2259
+ use: (((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2260
+ session: {
2261
+ session: Record<string, any> & {
2262
+ id: string;
2263
+ createdAt: Date;
2264
+ updatedAt: Date;
2265
+ userId: string;
2266
+ expiresAt: Date;
2267
+ token: string;
2268
+ ipAddress?: string | null | undefined;
2269
+ userAgent?: string | null | undefined;
2270
+ };
2271
+ user: Record<string, any> & {
2272
+ id: string;
2273
+ createdAt: Date;
2274
+ updatedAt: Date;
2275
+ email: string;
2276
+ emailVerified: boolean;
2277
+ name: string;
2278
+ image?: string | null | undefined;
2279
+ };
2280
+ };
2281
+ }>) | ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2282
+ verifiedResource: {};
2283
+ }>))[];
981
2284
  metadata: {
982
2285
  openapi: {
983
2286
  description: string;
984
2287
  responses: {
985
- 200: {
2288
+ "200": {
986
2289
  description: string;
987
2290
  content: {
988
2291
  "application/json": {
989
2292
  schema: {
990
2293
  type: "object";
991
2294
  properties: {
992
- session: {
993
- $ref: string;
2295
+ status: {
2296
+ type: string;
2297
+ description: string;
994
2298
  };
995
2299
  };
2300
+ required: string[];
996
2301
  };
997
2302
  };
998
2303
  };
@@ -1001,33 +2306,15 @@ declare const authClient: {
1001
2306
  };
1002
2307
  };
1003
2308
  }, {
1004
- session: {
1005
- id: string;
1006
- createdAt: Date;
1007
- updatedAt: Date;
1008
- userId: string;
1009
- expiresAt: Date;
1010
- token: string;
1011
- ipAddress?: string | null | undefined;
1012
- userAgent?: string | null | undefined;
1013
- } & Record<string, any>;
1014
- user: {
1015
- id: string;
1016
- createdAt: Date;
1017
- updatedAt: Date;
1018
- email: string;
1019
- emailVerified: boolean;
1020
- name: string;
1021
- image?: string | null | undefined;
1022
- } & Record<string, any>;
2309
+ status: boolean;
1023
2310
  }>;
1024
- revokeDeviceSession: import("better-auth").StrictEndpoint<"/multi-session/revoke", {
2311
+ updatePasskey: import("better-auth").StrictEndpoint<"/passkey/update-passkey", {
1025
2312
  method: "POST";
1026
2313
  body: import("zod").ZodObject<{
1027
- sessionToken: import("zod").ZodString;
2314
+ id: import("zod").ZodString;
2315
+ name: import("zod").ZodString;
1028
2316
  }, import("zod/v4/core").$strip>;
1029
- requireHeaders: true;
1030
- use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2317
+ use: (((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1031
2318
  session: {
1032
2319
  session: Record<string, any> & {
1033
2320
  id: string;
@@ -1049,22 +2336,25 @@ declare const authClient: {
1049
2336
  image?: string | null | undefined;
1050
2337
  };
1051
2338
  };
1052
- }>)[];
2339
+ }>) | ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2340
+ verifiedResource: {};
2341
+ }>))[];
1053
2342
  metadata: {
1054
2343
  openapi: {
1055
2344
  description: string;
1056
2345
  responses: {
1057
- 200: {
2346
+ "200": {
1058
2347
  description: string;
1059
2348
  content: {
1060
2349
  "application/json": {
1061
2350
  schema: {
1062
2351
  type: "object";
1063
2352
  properties: {
1064
- status: {
1065
- type: string;
2353
+ passkey: {
2354
+ $ref: string;
1066
2355
  };
1067
2356
  };
2357
+ required: string[];
1068
2358
  };
1069
2359
  };
1070
2360
  };
@@ -1073,26 +2363,234 @@ declare const authClient: {
1073
2363
  };
1074
2364
  };
1075
2365
  }, {
1076
- status: boolean;
2366
+ passkey: import("@better-auth/passkey/client").Passkey;
1077
2367
  }>;
1078
2368
  };
1079
- hooks: {
1080
- after: {
1081
- matcher: (context: import("better-auth").HookEndpointContext) => boolean;
1082
- handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
1083
- }[];
2369
+ schema: {
2370
+ passkey: {
2371
+ fields: {
2372
+ name: {
2373
+ type: "string";
2374
+ required: false;
2375
+ };
2376
+ publicKey: {
2377
+ type: "string";
2378
+ required: true;
2379
+ };
2380
+ userId: {
2381
+ type: "string";
2382
+ references: {
2383
+ model: string;
2384
+ field: string;
2385
+ };
2386
+ required: true;
2387
+ index: true;
2388
+ };
2389
+ credentialID: {
2390
+ type: "string";
2391
+ required: true;
2392
+ index: true;
2393
+ };
2394
+ counter: {
2395
+ type: "number";
2396
+ required: true;
2397
+ };
2398
+ deviceType: {
2399
+ type: "string";
2400
+ required: true;
2401
+ };
2402
+ backedUp: {
2403
+ type: "boolean";
2404
+ required: true;
2405
+ };
2406
+ transports: {
2407
+ type: "string";
2408
+ required: false;
2409
+ };
2410
+ createdAt: {
2411
+ type: "date";
2412
+ required: false;
2413
+ };
2414
+ aaguid: {
2415
+ type: "string";
2416
+ required: false;
2417
+ };
2418
+ };
2419
+ };
1084
2420
  };
1085
- options: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined;
1086
2421
  $ERROR_CODES: {
1087
- INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
2422
+ CHALLENGE_NOT_FOUND: import("better-auth").RawError<"CHALLENGE_NOT_FOUND">;
2423
+ YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
2424
+ FAILED_TO_VERIFY_REGISTRATION: import("better-auth").RawError<"FAILED_TO_VERIFY_REGISTRATION">;
2425
+ PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
2426
+ AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
2427
+ UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
2428
+ FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
2429
+ PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
2430
+ REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
2431
+ AUTH_CANCELLED: import("better-auth").RawError<"AUTH_CANCELLED">;
2432
+ UNKNOWN_ERROR: import("better-auth").RawError<"UNKNOWN_ERROR">;
2433
+ SESSION_REQUIRED: import("better-auth").RawError<"SESSION_REQUIRED">;
2434
+ RESOLVE_USER_REQUIRED: import("better-auth").RawError<"RESOLVE_USER_REQUIRED">;
2435
+ RESOLVED_USER_INVALID: import("better-auth").RawError<"RESOLVED_USER_INVALID">;
1088
2436
  };
2437
+ options: import("@better-auth/passkey/client").PasskeyOptions | undefined;
1089
2438
  }>;
1090
- atomListeners: {
1091
- matcher(path: string): path is "/multi-session/set-active";
2439
+ getActions: ($fetch: import("better-auth/react").BetterFetch, $store: import("better-auth").ClientStore) => {
2440
+ signIn: {
2441
+ passkey: (opts?: {
2442
+ autoFill?: boolean;
2443
+ extensions?: import("@better-auth/passkey/client").AuthenticationExtensionsClientInputs;
2444
+ returnWebAuthnResponse?: boolean;
2445
+ fetchOptions?: import("better-auth").ClientFetchOption;
2446
+ } | undefined, options?: import("better-auth").ClientFetchOption | undefined) => Promise<{
2447
+ data: null;
2448
+ error: {
2449
+ message?: string | undefined;
2450
+ status: number;
2451
+ statusText: string;
2452
+ };
2453
+ } | {
2454
+ data: {
2455
+ session: {
2456
+ id: string;
2457
+ createdAt: Date;
2458
+ updatedAt: Date;
2459
+ userId: string;
2460
+ expiresAt: Date;
2461
+ token: string;
2462
+ ipAddress?: string | null | undefined;
2463
+ userAgent?: string | null | undefined;
2464
+ };
2465
+ user: {
2466
+ id: string;
2467
+ createdAt: Date;
2468
+ updatedAt: Date;
2469
+ email: string;
2470
+ emailVerified: boolean;
2471
+ name: string;
2472
+ image?: string | null | undefined;
2473
+ };
2474
+ };
2475
+ error: null;
2476
+ } | {
2477
+ webauthn: {
2478
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
2479
+ clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
2480
+ };
2481
+ data: null;
2482
+ error: {
2483
+ message?: string | undefined;
2484
+ status: number;
2485
+ statusText: string;
2486
+ };
2487
+ } | {
2488
+ webauthn: {
2489
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
2490
+ clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
2491
+ };
2492
+ data: {
2493
+ session: {
2494
+ id: string;
2495
+ createdAt: Date;
2496
+ updatedAt: Date;
2497
+ userId: string;
2498
+ expiresAt: Date;
2499
+ token: string;
2500
+ ipAddress?: string | null | undefined;
2501
+ userAgent?: string | null | undefined;
2502
+ };
2503
+ user: {
2504
+ id: string;
2505
+ createdAt: Date;
2506
+ updatedAt: Date;
2507
+ email: string;
2508
+ emailVerified: boolean;
2509
+ name: string;
2510
+ image?: string | null | undefined;
2511
+ };
2512
+ };
2513
+ error: null;
2514
+ } | {
2515
+ data: null;
2516
+ error: {
2517
+ code: string;
2518
+ message: string;
2519
+ status: number;
2520
+ statusText: string;
2521
+ };
2522
+ }>;
2523
+ };
2524
+ passkey: {
2525
+ addPasskey: (opts?: {
2526
+ fetchOptions?: import("better-auth").ClientFetchOption;
2527
+ name?: string;
2528
+ authenticatorAttachment?: "platform" | "cross-platform";
2529
+ context?: string | null;
2530
+ extensions?: import("@better-auth/passkey/client").AuthenticationExtensionsClientInputs;
2531
+ useAutoRegister?: boolean;
2532
+ returnWebAuthnResponse?: boolean;
2533
+ } | undefined, fetchOpts?: import("better-auth").ClientFetchOption | undefined) => Promise<{
2534
+ data: null;
2535
+ error: {
2536
+ message?: string | undefined;
2537
+ status: number;
2538
+ statusText: string;
2539
+ };
2540
+ } | {
2541
+ data: import("@better-auth/passkey/client").Passkey;
2542
+ error: null;
2543
+ } | {
2544
+ webauthn: {
2545
+ response: import("@better-auth/passkey/client").RegistrationResponseJSON;
2546
+ clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
2547
+ };
2548
+ data: import("@better-auth/passkey/client").Passkey;
2549
+ error: null;
2550
+ } | {
2551
+ data: null;
2552
+ error: {
2553
+ code: string;
2554
+ message: string;
2555
+ status: number;
2556
+ statusText: string;
2557
+ };
2558
+ }>;
2559
+ };
2560
+ $Infer: {
2561
+ Passkey: import("@better-auth/passkey/client").Passkey;
2562
+ };
2563
+ };
2564
+ getAtoms($fetch: import("better-auth/react").BetterFetch): {
2565
+ listPasskeys: import("better-auth/client").AuthQueryAtom<import("@better-auth/passkey/client").Passkey[]>;
2566
+ $listPasskeys: import("better-auth/react").PreinitializedWritableAtom<any> & object;
2567
+ };
2568
+ pathMethods: {
2569
+ "/passkey/register": "POST";
2570
+ "/passkey/authenticate": "POST";
2571
+ };
2572
+ atomListeners: ({
2573
+ matcher(path: string): path is "/passkey/delete-passkey" | "/passkey/update-passkey" | "/passkey/verify-registration" | "/sign-out";
2574
+ signal: "$listPasskeys";
2575
+ } | {
2576
+ matcher: (path: string) => path is "/passkey/verify-authentication";
1092
2577
  signal: "$sessionSignal";
1093
- }[];
2578
+ })[];
1094
2579
  $ERROR_CODES: {
1095
- INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
2580
+ CHALLENGE_NOT_FOUND: import("better-auth").RawError<"CHALLENGE_NOT_FOUND">;
2581
+ YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
2582
+ FAILED_TO_VERIFY_REGISTRATION: import("better-auth").RawError<"FAILED_TO_VERIFY_REGISTRATION">;
2583
+ PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
2584
+ AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
2585
+ UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
2586
+ FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
2587
+ PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
2588
+ REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
2589
+ AUTH_CANCELLED: import("better-auth").RawError<"AUTH_CANCELLED">;
2590
+ UNKNOWN_ERROR: import("better-auth").RawError<"UNKNOWN_ERROR">;
2591
+ SESSION_REQUIRED: import("better-auth").RawError<"SESSION_REQUIRED">;
2592
+ RESOLVE_USER_REQUIRED: import("better-auth").RawError<"RESOLVE_USER_REQUIRED">;
2593
+ RESOLVED_USER_INVALID: import("better-auth").RawError<"RESOLVED_USER_INVALID">;
1096
2594
  };
1097
2595
  } | {
1098
2596
  id: "username";
@@ -1715,6 +3213,115 @@ declare const authClient: {
1715
3213
  message?: string | undefined;
1716
3214
  }, FetchOptions["throw"] extends true ? true : false>>;
1717
3215
  };
3216
+ } & {
3217
+ passkey: {
3218
+ generateRegisterOptions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
3219
+ authenticatorAttachment?: "platform" | "cross-platform" | undefined;
3220
+ name?: string | undefined;
3221
+ context?: string | undefined;
3222
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
3223
+ query?: {
3224
+ authenticatorAttachment?: "platform" | "cross-platform" | undefined;
3225
+ name?: string | undefined;
3226
+ context?: string | undefined;
3227
+ } | undefined;
3228
+ fetchOptions?: FetchOptions | undefined;
3229
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<import("@better-auth/passkey/client").PublicKeyCredentialCreationOptionsJSON, {
3230
+ code?: string | undefined;
3231
+ message?: string | undefined;
3232
+ }, FetchOptions["throw"] extends true ? true : false>>;
3233
+ };
3234
+ } & {
3235
+ passkey: {
3236
+ generateAuthenticateOptions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
3237
+ query?: Record<string, any> | undefined;
3238
+ fetchOptions?: FetchOptions | undefined;
3239
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<import("@better-auth/passkey/client").PublicKeyCredentialRequestOptionsJSON, {
3240
+ code?: string | undefined;
3241
+ message?: string | undefined;
3242
+ }, FetchOptions["throw"] extends true ? true : false>>;
3243
+ };
3244
+ } & {
3245
+ passkey: {
3246
+ verifyRegistration: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
3247
+ response: any;
3248
+ name?: string | undefined;
3249
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
3250
+ response: any;
3251
+ name?: string | undefined;
3252
+ } & {
3253
+ fetchOptions?: FetchOptions | undefined;
3254
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<import("@better-auth/passkey/client").Passkey, {
3255
+ code?: string | undefined;
3256
+ message?: string | undefined;
3257
+ }, FetchOptions["throw"] extends true ? true : false>>;
3258
+ };
3259
+ } & {
3260
+ passkey: {
3261
+ verifyAuthentication: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
3262
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
3263
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
3264
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
3265
+ } & {
3266
+ fetchOptions?: FetchOptions | undefined;
3267
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
3268
+ session: {
3269
+ id: string;
3270
+ createdAt: Date;
3271
+ updatedAt: Date;
3272
+ userId: string;
3273
+ expiresAt: Date;
3274
+ token: string;
3275
+ ipAddress?: string | null | undefined;
3276
+ userAgent?: string | null | undefined;
3277
+ };
3278
+ }, {
3279
+ code?: string | undefined;
3280
+ message?: string | undefined;
3281
+ }, FetchOptions["throw"] extends true ? true : false>>;
3282
+ };
3283
+ } & {
3284
+ passkey: {
3285
+ listUserPasskeys: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
3286
+ query?: Record<string, any> | undefined;
3287
+ fetchOptions?: FetchOptions | undefined;
3288
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<import("@better-auth/passkey/client").Passkey[], {
3289
+ code?: string | undefined;
3290
+ message?: string | undefined;
3291
+ }, FetchOptions["throw"] extends true ? true : false>>;
3292
+ };
3293
+ } & {
3294
+ passkey: {
3295
+ deletePasskey: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
3296
+ id: string;
3297
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
3298
+ id: string;
3299
+ } & {
3300
+ fetchOptions?: FetchOptions | undefined;
3301
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
3302
+ status: boolean;
3303
+ }, {
3304
+ code?: string | undefined;
3305
+ message?: string | undefined;
3306
+ }, FetchOptions["throw"] extends true ? true : false>>;
3307
+ };
3308
+ } & {
3309
+ passkey: {
3310
+ updatePasskey: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
3311
+ id: string;
3312
+ name: string;
3313
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
3314
+ id: string;
3315
+ name: string;
3316
+ } & {
3317
+ fetchOptions?: FetchOptions | undefined;
3318
+ }>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
3319
+ passkey: import("@better-auth/passkey/client").Passkey;
3320
+ }, {
3321
+ code?: string | undefined;
3322
+ message?: string | undefined;
3323
+ }, FetchOptions["throw"] extends true ? true : false>>;
3324
+ };
1718
3325
  } & {
1719
3326
  signIn: {
1720
3327
  username: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
@@ -1774,6 +3381,96 @@ declare const authClient: {
1774
3381
  code?: string | undefined;
1775
3382
  message?: string | undefined;
1776
3383
  }, FetchOptions["throw"] extends true ? true : false>>;
3384
+ } & {
3385
+ signIn: {
3386
+ passkey: (opts?: {
3387
+ autoFill?: boolean;
3388
+ extensions?: import("@better-auth/passkey/client").AuthenticationExtensionsClientInputs;
3389
+ returnWebAuthnResponse?: boolean;
3390
+ fetchOptions?: import("better-auth").ClientFetchOption;
3391
+ } | undefined, options?: import("better-auth").ClientFetchOption | undefined) => Promise<{
3392
+ data: null;
3393
+ error: {
3394
+ message?: string | undefined;
3395
+ status: number;
3396
+ statusText: string;
3397
+ };
3398
+ } | {
3399
+ data: {
3400
+ session: import("better-auth").Session;
3401
+ user: import("better-auth").User;
3402
+ };
3403
+ error: null;
3404
+ } | {
3405
+ webauthn: {
3406
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
3407
+ clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
3408
+ };
3409
+ data: null;
3410
+ error: {
3411
+ message?: string | undefined;
3412
+ status: number;
3413
+ statusText: string;
3414
+ };
3415
+ } | {
3416
+ webauthn: {
3417
+ response: import("@better-auth/passkey/client").AuthenticationResponseJSON;
3418
+ clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
3419
+ };
3420
+ data: {
3421
+ session: import("better-auth").Session;
3422
+ user: import("better-auth").User;
3423
+ };
3424
+ error: null;
3425
+ } | {
3426
+ data: null;
3427
+ error: {
3428
+ code: string;
3429
+ message: string;
3430
+ status: number;
3431
+ statusText: string;
3432
+ };
3433
+ }>;
3434
+ };
3435
+ passkey: {
3436
+ addPasskey: (opts?: {
3437
+ fetchOptions?: import("better-auth").ClientFetchOption;
3438
+ name?: string;
3439
+ authenticatorAttachment?: "platform" | "cross-platform";
3440
+ context?: string | null;
3441
+ extensions?: import("@better-auth/passkey/client").AuthenticationExtensionsClientInputs;
3442
+ useAutoRegister?: boolean;
3443
+ returnWebAuthnResponse?: boolean;
3444
+ } | undefined, fetchOpts?: import("better-auth").ClientFetchOption | undefined) => Promise<{
3445
+ data: null;
3446
+ error: {
3447
+ message?: string | undefined;
3448
+ status: number;
3449
+ statusText: string;
3450
+ };
3451
+ } | {
3452
+ data: import("@better-auth/passkey/client").Passkey;
3453
+ error: null;
3454
+ } | {
3455
+ webauthn: {
3456
+ response: import("@better-auth/passkey/client").RegistrationResponseJSON;
3457
+ clientExtensionResults: import("@better-auth/passkey/client").AuthenticationExtensionsClientOutputs;
3458
+ };
3459
+ data: import("@better-auth/passkey/client").Passkey;
3460
+ error: null;
3461
+ } | {
3462
+ data: null;
3463
+ error: {
3464
+ code: string;
3465
+ message: string;
3466
+ status: number;
3467
+ statusText: string;
3468
+ };
3469
+ }>;
3470
+ };
3471
+ $Infer: {
3472
+ Passkey: import("@better-auth/passkey/client").Passkey;
3473
+ };
1777
3474
  } & {
1778
3475
  useSession: () => {
1779
3476
  data: {
@@ -1906,6 +3603,21 @@ declare const authClient: {
1906
3603
  };
1907
3604
  $ERROR_CODES: {
1908
3605
  INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
3606
+ } & {
3607
+ CHALLENGE_NOT_FOUND: import("better-auth").RawError<"CHALLENGE_NOT_FOUND">;
3608
+ YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: import("better-auth").RawError<"YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY">;
3609
+ FAILED_TO_VERIFY_REGISTRATION: import("better-auth").RawError<"FAILED_TO_VERIFY_REGISTRATION">;
3610
+ PASSKEY_NOT_FOUND: import("better-auth").RawError<"PASSKEY_NOT_FOUND">;
3611
+ AUTHENTICATION_FAILED: import("better-auth").RawError<"AUTHENTICATION_FAILED">;
3612
+ UNABLE_TO_CREATE_SESSION: import("better-auth").RawError<"UNABLE_TO_CREATE_SESSION">;
3613
+ FAILED_TO_UPDATE_PASSKEY: import("better-auth").RawError<"FAILED_TO_UPDATE_PASSKEY">;
3614
+ PREVIOUSLY_REGISTERED: import("better-auth").RawError<"PREVIOUSLY_REGISTERED">;
3615
+ REGISTRATION_CANCELLED: import("better-auth").RawError<"REGISTRATION_CANCELLED">;
3616
+ AUTH_CANCELLED: import("better-auth").RawError<"AUTH_CANCELLED">;
3617
+ UNKNOWN_ERROR: import("better-auth").RawError<"UNKNOWN_ERROR">;
3618
+ SESSION_REQUIRED: import("better-auth").RawError<"SESSION_REQUIRED">;
3619
+ RESOLVE_USER_REQUIRED: import("better-auth").RawError<"RESOLVE_USER_REQUIRED">;
3620
+ RESOLVED_USER_INVALID: import("better-auth").RawError<"RESOLVED_USER_INVALID">;
1909
3621
  } & {
1910
3622
  EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
1911
3623
  UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;