better-auth 0.0.6 → 0.0.7

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.
package/dist/client.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as nanostores from 'nanostores';
2
- import { B as BetterAuthPlugin, a as BetterAuthOptions, F as FieldAttribute, I as InferFieldOutput, A as Auth } from './index-CGeV0d2g.js';
2
+ import { B as BetterAuthPlugin, a as BetterAuthOptions, F as FieldAttribute, I as InferFieldOutput, A as Auth } from './index-W5nXvJ-p.js';
3
3
  import * as zod from 'zod';
4
4
  import { U as UnionToIntersection } from './helper-B5_2Vzba.js';
5
5
  import * as better_call from 'better-call';
6
6
  import * as _better_fetch_fetch from '@better-fetch/fetch';
7
- import { C as ClientOptions, A as AuthPlugin, I as InferRoutes } from './type-tYx_kmry.js';
8
- export { g as getPasskeyActions, p as passkeyClient, t as twoFactorClient } from './client-CaF9eUcv.js';
7
+ import { C as ClientOptions, A as AuthPlugin, I as InferRoutes } from './type-DbMyI3b5.js';
8
+ export { g as getPasskeyActions, p as passkeyClient, t as twoFactorClient } from './client-A2Mt04KQ.js';
9
9
  export { organizationClient, usernameClient } from './client/plugins.js';
10
10
  import './schema-BOszzrbQ.js';
11
11
  import 'arctic';
@@ -24,22 +24,34 @@ import '@simplewebauthn/types';
24
24
  declare const createAuthFetch: (options?: ClientOptions) => _better_fetch_fetch.BetterFetch<{
25
25
  baseURL: string;
26
26
  plugins: (_better_fetch_fetch.BetterFetchPlugin | {
27
+ id: string;
28
+ name: string;
29
+ hooks: {
30
+ onSuccess(context: _better_fetch_fetch.SuccessContext): void;
31
+ };
32
+ } | {
33
+ id: string;
34
+ name: string;
35
+ hooks: {
36
+ onRequest<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>): _better_fetch_fetch.RequestContext<T>;
37
+ };
38
+ } | {
27
39
  id: string;
28
40
  name: string;
29
41
  init(url: string, options: {
30
- cache?: RequestCache | undefined;
31
- credentials?: RequestCredentials | undefined;
32
42
  headers?: (HeadersInit & (HeadersInit | {
33
43
  accept: "application/json" | "text/plain" | "application/octet-stream";
34
44
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
35
45
  authorization: "Bearer" | "Basic";
36
46
  })) | undefined;
47
+ redirect?: RequestRedirect | undefined;
48
+ method?: string | undefined;
49
+ cache?: RequestCache | undefined;
50
+ credentials?: RequestCredentials | undefined;
37
51
  integrity?: string | undefined;
38
52
  keepalive?: boolean | undefined;
39
- method?: string | undefined;
40
53
  mode?: RequestMode | undefined;
41
54
  priority?: RequestPriority | undefined;
42
- redirect?: RequestRedirect | undefined;
43
55
  referrer?: string | undefined;
44
56
  referrerPolicy?: ReferrerPolicy | undefined;
45
57
  signal?: (AbortSignal | null) | undefined;
@@ -93,19 +105,19 @@ declare const createAuthFetch: (options?: ClientOptions) => _better_fetch_fetch.
93
105
  } | undefined): Promise<{
94
106
  url: string;
95
107
  options: {
96
- cache?: RequestCache | undefined;
97
- credentials?: RequestCredentials | undefined;
98
108
  headers?: (HeadersInit & (HeadersInit | {
99
109
  accept: "application/json" | "text/plain" | "application/octet-stream";
100
110
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
101
111
  authorization: "Bearer" | "Basic";
102
112
  })) | undefined;
113
+ redirect?: RequestRedirect | undefined;
114
+ method?: string | undefined;
115
+ cache?: RequestCache | undefined;
116
+ credentials?: RequestCredentials | undefined;
103
117
  integrity?: string | undefined;
104
118
  keepalive?: boolean | undefined;
105
- method?: string | undefined;
106
119
  mode?: RequestMode | undefined;
107
120
  priority?: RequestPriority | undefined;
108
- redirect?: RequestRedirect | undefined;
109
121
  referrer?: string | undefined;
110
122
  referrerPolicy?: ReferrerPolicy | undefined;
111
123
  signal?: (AbortSignal | null) | undefined;
@@ -158,34 +170,22 @@ declare const createAuthFetch: (options?: ClientOptions) => _better_fetch_fetch.
158
170
  disableValidation?: boolean | undefined;
159
171
  };
160
172
  }>;
161
- } | {
162
- id: string;
163
- name: string;
164
- hooks: {
165
- onSuccess(context: _better_fetch_fetch.SuccessContext): void;
166
- };
167
- } | {
168
- id: string;
169
- name: string;
170
- hooks: {
171
- onRequest<T extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T>): _better_fetch_fetch.RequestContext<T>;
172
- };
173
173
  })[];
174
174
  csrfPlugin?: boolean;
175
175
  authPlugins?: AuthPlugin[];
176
- cache?: RequestCache;
177
- credentials?: RequestCredentials;
178
176
  headers?: (HeadersInit & (HeadersInit | {
179
177
  accept: "application/json" | "text/plain" | "application/octet-stream";
180
178
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
181
179
  authorization: "Bearer" | "Basic";
182
180
  })) | undefined;
181
+ redirect?: RequestRedirect;
182
+ method: string;
183
+ cache?: RequestCache;
184
+ credentials?: RequestCredentials;
183
185
  integrity?: string;
184
186
  keepalive?: boolean;
185
- method: string;
186
187
  mode?: RequestMode;
187
188
  priority?: RequestPriority;
188
- redirect?: RequestRedirect;
189
189
  referrer?: string;
190
190
  referrerPolicy?: ReferrerPolicy;
191
191
  signal?: AbortSignal | null;
@@ -251,12 +251,12 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
251
251
  }>>;
252
252
  body: zod.ZodObject<{
253
253
  callbackURL: zod.ZodOptional<zod.ZodString>;
254
- provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
254
+ provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
255
255
  }, "strip", zod.ZodTypeAny, {
256
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
256
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
257
257
  callbackURL?: string | undefined;
258
258
  }, {
259
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
259
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
260
260
  callbackURL?: string | undefined;
261
261
  }>;
262
262
  }>): Promise<{
@@ -278,12 +278,12 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
278
278
  }>>;
279
279
  body: zod.ZodObject<{
280
280
  callbackURL: zod.ZodOptional<zod.ZodString>;
281
- provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
281
+ provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
282
282
  }, "strip", zod.ZodTypeAny, {
283
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
283
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
284
284
  callbackURL?: string | undefined;
285
285
  }, {
286
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
286
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
287
287
  callbackURL?: string | undefined;
288
288
  }>;
289
289
  };
@@ -417,17 +417,17 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
417
417
  image: zod.ZodOptional<zod.ZodString>;
418
418
  callbackURL: zod.ZodOptional<zod.ZodString>;
419
419
  }, "strip", zod.ZodTypeAny, {
420
+ password: string;
420
421
  name: string;
421
422
  email: string;
422
- password: string;
423
- callbackURL?: string | undefined;
424
423
  image?: string | undefined;
424
+ callbackURL?: string | undefined;
425
425
  }, {
426
+ password: string;
426
427
  name: string;
427
428
  email: string;
428
- password: string;
429
- callbackURL?: string | undefined;
430
429
  image?: string | undefined;
430
+ callbackURL?: string | undefined;
431
431
  }>;
432
432
  }>): Promise<{
433
433
  user: {
@@ -457,17 +457,17 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
457
457
  image: zod.ZodOptional<zod.ZodString>;
458
458
  callbackURL: zod.ZodOptional<zod.ZodString>;
459
459
  }, "strip", zod.ZodTypeAny, {
460
+ password: string;
460
461
  name: string;
461
462
  email: string;
462
- password: string;
463
- callbackURL?: string | undefined;
464
463
  image?: string | undefined;
464
+ callbackURL?: string | undefined;
465
465
  }, {
466
+ password: string;
466
467
  name: string;
467
468
  email: string;
468
- password: string;
469
- callbackURL?: string | undefined;
470
469
  image?: string | undefined;
470
+ callbackURL?: string | undefined;
471
471
  }>;
472
472
  };
473
473
  method: better_call.Method | better_call.Method[];
@@ -482,13 +482,13 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
482
482
  callbackURL: zod.ZodOptional<zod.ZodString>;
483
483
  dontRememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
484
484
  }, "strip", zod.ZodTypeAny, {
485
- email: string;
486
485
  password: string;
486
+ email: string;
487
487
  callbackURL?: string | undefined;
488
488
  dontRememberMe?: boolean | undefined;
489
489
  }, {
490
- email: string;
491
490
  password: string;
491
+ email: string;
492
492
  callbackURL?: string | undefined;
493
493
  dontRememberMe?: boolean | undefined;
494
494
  }>;
@@ -521,13 +521,13 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
521
521
  callbackURL: zod.ZodOptional<zod.ZodString>;
522
522
  dontRememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
523
523
  }, "strip", zod.ZodTypeAny, {
524
- email: string;
525
524
  password: string;
525
+ email: string;
526
526
  callbackURL?: string | undefined;
527
527
  dontRememberMe?: boolean | undefined;
528
528
  }, {
529
- email: string;
530
529
  password: string;
530
+ email: string;
531
531
  callbackURL?: string | undefined;
532
532
  dontRememberMe?: boolean | undefined;
533
533
  }>;
@@ -612,11 +612,11 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
612
612
  token: zod.ZodString;
613
613
  callbackURL: zod.ZodString;
614
614
  }, "strip", zod.ZodTypeAny, {
615
- callbackURL: string;
616
615
  token: string;
617
- }, {
618
616
  callbackURL: string;
617
+ }, {
619
618
  token: string;
619
+ callbackURL: string;
620
620
  }>;
621
621
  }>): Promise<{
622
622
  status: boolean;
@@ -628,11 +628,11 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
628
628
  token: zod.ZodString;
629
629
  callbackURL: zod.ZodString;
630
630
  }, "strip", zod.ZodTypeAny, {
631
- callbackURL: string;
632
631
  token: string;
633
- }, {
634
632
  callbackURL: string;
633
+ }, {
635
634
  token: string;
635
+ callbackURL: string;
636
636
  }>;
637
637
  };
638
638
  method: better_call.Method | better_call.Method[];
@@ -685,12 +685,12 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
685
685
  }>>;
686
686
  body: zod.ZodObject<{
687
687
  callbackURL: zod.ZodOptional<zod.ZodString>;
688
- provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
688
+ provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
689
689
  }, "strip", zod.ZodTypeAny, {
690
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
690
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
691
691
  callbackURL?: string | undefined;
692
692
  }, {
693
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
693
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
694
694
  callbackURL?: string | undefined;
695
695
  }>;
696
696
  }>): Promise<{
@@ -712,12 +712,12 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
712
712
  }>>;
713
713
  body: zod.ZodObject<{
714
714
  callbackURL: zod.ZodOptional<zod.ZodString>;
715
- provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
715
+ provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
716
716
  }, "strip", zod.ZodTypeAny, {
717
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
717
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
718
718
  callbackURL?: string | undefined;
719
719
  }, {
720
- provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
720
+ provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
721
721
  callbackURL?: string | undefined;
722
722
  }>;
723
723
  };
@@ -851,17 +851,17 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
851
851
  image: zod.ZodOptional<zod.ZodString>;
852
852
  callbackURL: zod.ZodOptional<zod.ZodString>;
853
853
  }, "strip", zod.ZodTypeAny, {
854
+ password: string;
854
855
  name: string;
855
856
  email: string;
856
- password: string;
857
- callbackURL?: string | undefined;
858
857
  image?: string | undefined;
858
+ callbackURL?: string | undefined;
859
859
  }, {
860
+ password: string;
860
861
  name: string;
861
862
  email: string;
862
- password: string;
863
- callbackURL?: string | undefined;
864
863
  image?: string | undefined;
864
+ callbackURL?: string | undefined;
865
865
  }>;
866
866
  }>): Promise<{
867
867
  user: {
@@ -891,17 +891,17 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
891
891
  image: zod.ZodOptional<zod.ZodString>;
892
892
  callbackURL: zod.ZodOptional<zod.ZodString>;
893
893
  }, "strip", zod.ZodTypeAny, {
894
+ password: string;
894
895
  name: string;
895
896
  email: string;
896
- password: string;
897
- callbackURL?: string | undefined;
898
897
  image?: string | undefined;
898
+ callbackURL?: string | undefined;
899
899
  }, {
900
+ password: string;
900
901
  name: string;
901
902
  email: string;
902
- password: string;
903
- callbackURL?: string | undefined;
904
903
  image?: string | undefined;
904
+ callbackURL?: string | undefined;
905
905
  }>;
906
906
  };
907
907
  method: better_call.Method | better_call.Method[];
@@ -916,13 +916,13 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
916
916
  callbackURL: zod.ZodOptional<zod.ZodString>;
917
917
  dontRememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
918
918
  }, "strip", zod.ZodTypeAny, {
919
- email: string;
920
919
  password: string;
920
+ email: string;
921
921
  callbackURL?: string | undefined;
922
922
  dontRememberMe?: boolean | undefined;
923
923
  }, {
924
- email: string;
925
924
  password: string;
925
+ email: string;
926
926
  callbackURL?: string | undefined;
927
927
  dontRememberMe?: boolean | undefined;
928
928
  }>;
@@ -955,13 +955,13 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
955
955
  callbackURL: zod.ZodOptional<zod.ZodString>;
956
956
  dontRememberMe: zod.ZodOptional<zod.ZodDefault<zod.ZodBoolean>>;
957
957
  }, "strip", zod.ZodTypeAny, {
958
- email: string;
959
958
  password: string;
959
+ email: string;
960
960
  callbackURL?: string | undefined;
961
961
  dontRememberMe?: boolean | undefined;
962
962
  }, {
963
- email: string;
964
963
  password: string;
964
+ email: string;
965
965
  callbackURL?: string | undefined;
966
966
  dontRememberMe?: boolean | undefined;
967
967
  }>;
@@ -1046,11 +1046,11 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
1046
1046
  token: zod.ZodString;
1047
1047
  callbackURL: zod.ZodString;
1048
1048
  }, "strip", zod.ZodTypeAny, {
1049
- callbackURL: string;
1050
1049
  token: string;
1051
- }, {
1052
1050
  callbackURL: string;
1051
+ }, {
1053
1052
  token: string;
1053
+ callbackURL: string;
1054
1054
  }>;
1055
1055
  }>): Promise<{
1056
1056
  status: boolean;
@@ -1062,11 +1062,11 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
1062
1062
  token: zod.ZodString;
1063
1063
  callbackURL: zod.ZodString;
1064
1064
  }, "strip", zod.ZodTypeAny, {
1065
- callbackURL: string;
1066
1065
  token: string;
1067
- }, {
1068
1066
  callbackURL: string;
1067
+ }, {
1069
1068
  token: string;
1069
+ callbackURL: string;
1070
1070
  }>;
1071
1071
  };
1072
1072
  method: better_call.Method | better_call.Method[];
@@ -1215,22 +1215,34 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
1215
1215
  $fetch: _better_fetch_fetch.BetterFetch<{
1216
1216
  baseURL: string;
1217
1217
  plugins: (_better_fetch_fetch.BetterFetchPlugin | {
1218
+ id: string;
1219
+ name: string;
1220
+ hooks: {
1221
+ onSuccess(context: _better_fetch_fetch.SuccessContext): void;
1222
+ };
1223
+ } | {
1224
+ id: string;
1225
+ name: string;
1226
+ hooks: {
1227
+ onRequest<T_7 extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T_7>): _better_fetch_fetch.RequestContext<T_7>;
1228
+ };
1229
+ } | {
1218
1230
  id: string;
1219
1231
  name: string;
1220
1232
  init(url: string, options: {
1221
- cache?: RequestCache | undefined;
1222
- credentials?: RequestCredentials | undefined;
1223
1233
  headers?: (HeadersInit & (HeadersInit | {
1224
1234
  accept: "application/json" | "text/plain" | "application/octet-stream";
1225
1235
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1226
1236
  authorization: "Bearer" | "Basic";
1227
1237
  })) | undefined;
1238
+ redirect?: RequestRedirect | undefined;
1239
+ method?: string | undefined;
1240
+ cache?: RequestCache | undefined;
1241
+ credentials?: RequestCredentials | undefined;
1228
1242
  integrity?: string | undefined;
1229
1243
  keepalive?: boolean | undefined;
1230
- method?: string | undefined;
1231
1244
  mode?: RequestMode | undefined;
1232
1245
  priority?: RequestPriority | undefined;
1233
- redirect?: RequestRedirect | undefined;
1234
1246
  referrer?: string | undefined;
1235
1247
  referrerPolicy?: ReferrerPolicy | undefined;
1236
1248
  signal?: (AbortSignal | null) | undefined;
@@ -1284,19 +1296,19 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
1284
1296
  } | undefined): Promise<{
1285
1297
  url: string;
1286
1298
  options: {
1287
- cache?: RequestCache | undefined;
1288
- credentials?: RequestCredentials | undefined;
1289
1299
  headers?: (HeadersInit & (HeadersInit | {
1290
1300
  accept: "application/json" | "text/plain" | "application/octet-stream";
1291
1301
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1292
1302
  authorization: "Bearer" | "Basic";
1293
1303
  })) | undefined;
1304
+ redirect?: RequestRedirect | undefined;
1305
+ method?: string | undefined;
1306
+ cache?: RequestCache | undefined;
1307
+ credentials?: RequestCredentials | undefined;
1294
1308
  integrity?: string | undefined;
1295
1309
  keepalive?: boolean | undefined;
1296
- method?: string | undefined;
1297
1310
  mode?: RequestMode | undefined;
1298
1311
  priority?: RequestPriority | undefined;
1299
- redirect?: RequestRedirect | undefined;
1300
1312
  referrer?: string | undefined;
1301
1313
  referrerPolicy?: ReferrerPolicy | undefined;
1302
1314
  signal?: (AbortSignal | null) | undefined;
@@ -1349,34 +1361,22 @@ declare const createAuthClient: <O extends ClientOptions = ClientOptions, AT ext
1349
1361
  disableValidation?: boolean | undefined;
1350
1362
  };
1351
1363
  }>;
1352
- } | {
1353
- id: string;
1354
- name: string;
1355
- hooks: {
1356
- onSuccess(context: _better_fetch_fetch.SuccessContext): void;
1357
- };
1358
- } | {
1359
- id: string;
1360
- name: string;
1361
- hooks: {
1362
- onRequest<T_7 extends Record<string, any>>(context: _better_fetch_fetch.RequestContext<T_7>): _better_fetch_fetch.RequestContext<T_7>;
1363
- };
1364
1364
  })[];
1365
1365
  csrfPlugin?: boolean;
1366
1366
  authPlugins?: AuthPlugin[];
1367
- cache?: RequestCache;
1368
- credentials?: RequestCredentials;
1369
1367
  headers?: (HeadersInit & (HeadersInit | {
1370
1368
  accept: "application/json" | "text/plain" | "application/octet-stream";
1371
1369
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1372
1370
  authorization: "Bearer" | "Basic";
1373
1371
  })) | undefined;
1372
+ redirect?: RequestRedirect;
1373
+ method: string;
1374
+ cache?: RequestCache;
1375
+ credentials?: RequestCredentials;
1374
1376
  integrity?: string;
1375
1377
  keepalive?: boolean;
1376
- method: string;
1377
1378
  mode?: RequestMode;
1378
1379
  priority?: RequestPriority;
1379
- redirect?: RequestRedirect;
1380
1380
  referrer?: string;
1381
1381
  referrerPolicy?: ReferrerPolicy;
1382
1382
  signal?: AbortSignal | null;
@@ -641,12 +641,12 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
641
641
  }>>;
642
642
  body: zod.ZodObject<{
643
643
  callbackURL: zod.ZodOptional<zod.ZodString>;
644
- provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
644
+ provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
645
645
  }, "strip", zod.ZodTypeAny, {
646
- provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
646
+ provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
647
647
  callbackURL?: string | undefined;
648
648
  }, {
649
- provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
649
+ provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
650
650
  callbackURL?: string | undefined;
651
651
  }>;
652
652
  }>): Promise<{
@@ -668,12 +668,12 @@ declare const router: <C extends AuthContext, Option extends BetterAuthOptions>(
668
668
  }>>;
669
669
  body: zod.ZodObject<{
670
670
  callbackURL: zod.ZodOptional<zod.ZodString>;
671
- provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
671
+ provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
672
672
  }, "strip", zod.ZodTypeAny, {
673
- provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
673
+ provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
674
674
  callbackURL?: string | undefined;
675
675
  }, {
676
- provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
676
+ provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
677
677
  callbackURL?: string | undefined;
678
678
  }>;
679
679
  };
@@ -1066,12 +1066,12 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
1066
1066
  }>>;
1067
1067
  body: zod.ZodObject<{
1068
1068
  callbackURL: zod.ZodOptional<zod.ZodString>;
1069
- provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
1069
+ provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
1070
1070
  }, "strip", zod.ZodTypeAny, {
1071
- provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
1071
+ provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
1072
1072
  callbackURL?: string | undefined;
1073
1073
  }, {
1074
- provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
1074
+ provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
1075
1075
  callbackURL?: string | undefined;
1076
1076
  }>;
1077
1077
  }>): Promise<{
@@ -1093,12 +1093,12 @@ declare const betterAuth: <O extends BetterAuthOptions>(options: O) => {
1093
1093
  }>>;
1094
1094
  body: zod.ZodObject<{
1095
1095
  callbackURL: zod.ZodOptional<zod.ZodString>;
1096
- provider: zod.ZodEnum<["github", ...("apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter")[]]>;
1096
+ provider: zod.ZodEnum<["github", ...("github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter")[]]>;
1097
1097
  }, "strip", zod.ZodTypeAny, {
1098
- provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
1098
+ provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
1099
1099
  callbackURL?: string | undefined;
1100
1100
  }, {
1101
- provider: "apple" | "discord" | "facebook" | "github" | "google" | "spotify" | "twitch" | "twitter";
1101
+ provider: "github" | "apple" | "discord" | "facebook" | "google" | "spotify" | "twitch" | "twitter";
1102
1102
  callbackURL?: string | undefined;
1103
1103
  }>;
1104
1104
  };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as Auth, F as FieldAttribute, j as FieldAttributeConfig, h as FieldType, I as InferFieldOutput, i as InferValueType, f as InternalAdapter, d as betterAuth, g as createFieldAttribute, e as createInternalAdapter } from './index-CGeV0d2g.js';
1
+ export { A as Auth, F as FieldAttribute, j as FieldAttributeConfig, h as FieldType, I as InferFieldOutput, i as InferValueType, f as InternalAdapter, d as betterAuth, g as createFieldAttribute, e as createInternalAdapter } from './index-W5nXvJ-p.js';
2
2
  import 'better-call';
3
3
  import 'zod';
4
4
  import './helper-B5_2Vzba.js';