@neondatabase/auth 0.1.0-beta.15 → 0.1.0-beta.16
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/README.md +1 -0
- package/dist/{adapter-core-ChIlSbGg.mjs → adapter-core-BQ6ga1zK.mjs} +2 -28
- package/dist/{adapter-core-CtcS7ex8.d.mts → adapter-core-DYWYECKK.d.mts} +112 -112
- package/dist/{better-auth-react-adapter-C3_WRaIy.mjs → better-auth-react-adapter-BLKXYcWM.mjs} +1 -1
- package/dist/{supabase-adapter-Bbn88gZj.d.mts → better-auth-react-adapter-tKs79AwE.d.mts} +303 -389
- package/dist/constants-2bpp2_-f.mjs +30 -0
- package/dist/index-B6dAIdkW.d.mts +100 -0
- package/dist/index.d.mts +5 -105
- package/dist/index.mjs +2 -2
- package/dist/middleware-DXwLKcbA.mjs +305 -0
- package/dist/neon-auth-B_otuPjh.d.mts +105 -0
- package/dist/{neon-auth-sSiNq4zM.mjs → neon-auth-ClDZNB9a.mjs} +1 -1
- package/dist/next/index.d.mts +2 -98
- package/dist/next/index.mjs +4 -309
- package/dist/next/server/index.d.mts +340 -0
- package/dist/next/server/index.mjs +432 -0
- package/dist/react/adapters/index.d.mts +4 -4
- package/dist/react/adapters/index.mjs +2 -2
- package/dist/react/index.d.mts +5 -5
- package/dist/react/index.mjs +4 -5
- package/dist/react/ui/index.d.mts +1 -1
- package/dist/react/ui/index.mjs +2 -3
- package/dist/react/ui/server.mjs +2 -2
- package/dist/{supabase-adapter-DhlcXYb9.mjs → supabase-adapter-Bl576usk.mjs} +2 -1
- package/dist/{better-auth-react-adapter-AucJqubr.d.mts → supabase-adapter-DtT0d6It.d.mts} +141 -55
- package/dist/types/index.d.mts +2 -2
- package/dist/ui/css.css +1 -1
- package/dist/ui/theme.css +1 -1
- package/dist/ui-DLtIc4wi.mjs +4 -0
- package/dist/vanilla/adapters/index.d.mts +4 -4
- package/dist/vanilla/adapters/index.mjs +2 -2
- package/dist/vanilla/index.d.mts +4 -4
- package/dist/vanilla/index.mjs +2 -2
- package/package.json +5 -1
- package/dist/chunk-5DLVHPZS-Bxj7snpZ-EhdAQJMu.mjs +0 -533
- package/dist/ui-C1IRQzLY.mjs +0 -9449
- /package/dist/{adapters-D0mxG3F-.mjs → adapters-CUvhsAvY.mjs} +0 -0
- /package/dist/{adapters-Df6Dd3KK.mjs → adapters-CivF9wql.mjs} +0 -0
- /package/dist/{better-auth-types-VqadyqlG.d.mts → better-auth-types-Kq3kGuiz.d.mts} +0 -0
- /package/dist/{index-ClXLQ1fw.d.mts → index-D8dPsry7.d.mts} +0 -0
- /package/dist/{index-BXlAjlSt.d.mts → index-D_HDtZfY.d.mts} +0 -0
- /package/dist/{index-DCQ5Y2ED.d.mts → index-OEBbnNdr.d.mts} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createAuthClient } from "better-auth/react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as better_auth_client35 from "better-auth/client";
|
|
3
3
|
import { BetterAuthClientOptions, createAuthClient as createAuthClient$1 } from "better-auth/client";
|
|
4
|
-
import * as
|
|
4
|
+
import * as better_auth_client_plugins17 from "better-auth/client/plugins";
|
|
5
5
|
import * as zod0 from "zod";
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
6
|
+
import * as jose2 from "jose";
|
|
7
|
+
import * as better_auth454 from "better-auth";
|
|
8
|
+
import * as _better_fetch_fetch266 from "@better-fetch/fetch";
|
|
9
9
|
import { BetterFetchError as BetterFetchError$1 } from "@better-fetch/fetch";
|
|
10
|
-
import * as
|
|
10
|
+
import * as nanostores7 from "nanostores";
|
|
11
11
|
import * as better_call0 from "better-call";
|
|
12
12
|
import * as better_auth_plugins_email_otp0 from "better-auth/plugins/email-otp";
|
|
13
13
|
import { EmailOTPOptions } from "better-auth/plugins/email-otp";
|
|
@@ -29,7 +29,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
29
29
|
pathMethods: {
|
|
30
30
|
"/token/anonymous": "GET";
|
|
31
31
|
};
|
|
32
|
-
getActions: ($fetch:
|
|
32
|
+
getActions: ($fetch: _better_fetch_fetch266.BetterFetch) => {
|
|
33
33
|
getAnonymousToken: (fetchOptions?: any) => Promise<{
|
|
34
34
|
data: {
|
|
35
35
|
token: string;
|
|
@@ -47,9 +47,9 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
47
47
|
};
|
|
48
48
|
} | {
|
|
49
49
|
id: "better-auth-client";
|
|
50
|
-
$InferServerPlugin: ReturnType<(options?:
|
|
50
|
+
$InferServerPlugin: ReturnType<(options?: better_auth_client_plugins17.JwtOptions | undefined) => {
|
|
51
51
|
id: "jwt";
|
|
52
|
-
options:
|
|
52
|
+
options: better_auth_client_plugins17.JwtOptions | undefined;
|
|
53
53
|
endpoints: {
|
|
54
54
|
getJwks: better_call0.StrictEndpoint<string, {
|
|
55
55
|
method: "GET";
|
|
@@ -129,7 +129,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
129
129
|
};
|
|
130
130
|
} & {
|
|
131
131
|
use: any[];
|
|
132
|
-
},
|
|
132
|
+
}, jose2.JSONWebKeySet>;
|
|
133
133
|
getToken: better_call0.StrictEndpoint<"/token", {
|
|
134
134
|
method: "GET";
|
|
135
135
|
requireHeaders: true;
|
|
@@ -190,15 +190,15 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
190
190
|
SERVER_ONLY: true;
|
|
191
191
|
$Infer: {
|
|
192
192
|
body: {
|
|
193
|
-
payload:
|
|
194
|
-
overrideOptions?:
|
|
193
|
+
payload: jose2.JWTPayload;
|
|
194
|
+
overrideOptions?: better_auth_client_plugins17.JwtOptions | undefined;
|
|
195
195
|
};
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
body: zod0.ZodObject<{
|
|
199
199
|
payload: zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>;
|
|
200
200
|
overrideOptions: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
201
|
-
},
|
|
201
|
+
}, better_auth454.$strip>;
|
|
202
202
|
} & {
|
|
203
203
|
use: any[];
|
|
204
204
|
}, {
|
|
@@ -225,16 +225,16 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
225
225
|
body: zod0.ZodObject<{
|
|
226
226
|
token: zod0.ZodString;
|
|
227
227
|
issuer: zod0.ZodOptional<zod0.ZodString>;
|
|
228
|
-
},
|
|
228
|
+
}, better_auth454.$strip>;
|
|
229
229
|
} & {
|
|
230
230
|
use: any[];
|
|
231
231
|
}, {
|
|
232
|
-
payload: (
|
|
232
|
+
payload: (jose2.JWTPayload & Required<Pick<jose2.JWTPayload, "sub" | "aud">>) | null;
|
|
233
233
|
}>;
|
|
234
234
|
};
|
|
235
235
|
hooks: {
|
|
236
236
|
after: {
|
|
237
|
-
matcher(context:
|
|
237
|
+
matcher(context: better_auth454.HookEndpointContext): boolean;
|
|
238
238
|
handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
|
|
239
239
|
}[];
|
|
240
240
|
};
|
|
@@ -264,7 +264,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
264
264
|
pathMethods: {
|
|
265
265
|
[x: string]: "GET";
|
|
266
266
|
};
|
|
267
|
-
getActions: ($fetch:
|
|
267
|
+
getActions: ($fetch: _better_fetch_fetch266.BetterFetch) => {
|
|
268
268
|
jwks: (fetchOptions?: any) => Promise<{
|
|
269
269
|
data: null;
|
|
270
270
|
error: {
|
|
@@ -273,7 +273,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
273
273
|
statusText: string;
|
|
274
274
|
};
|
|
275
275
|
} | {
|
|
276
|
-
data:
|
|
276
|
+
data: jose2.JSONWebKeySet;
|
|
277
277
|
error: null;
|
|
278
278
|
}>;
|
|
279
279
|
};
|
|
@@ -319,7 +319,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
319
319
|
token: string;
|
|
320
320
|
ipAddress?: string | null | undefined;
|
|
321
321
|
userAgent?: string | null | undefined;
|
|
322
|
-
} & Record<string, unknown>, ctx:
|
|
322
|
+
} & Record<string, unknown>, ctx: better_auth454.GenericEndpointContext | null): Promise<void>;
|
|
323
323
|
};
|
|
324
324
|
};
|
|
325
325
|
};
|
|
@@ -327,8 +327,8 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
327
327
|
};
|
|
328
328
|
hooks: {
|
|
329
329
|
after: {
|
|
330
|
-
matcher(context:
|
|
331
|
-
handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<
|
|
330
|
+
matcher(context: better_auth454.HookEndpointContext): boolean;
|
|
331
|
+
handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<better_auth_client_plugins17.SessionWithImpersonatedBy[] | undefined>;
|
|
332
332
|
}[];
|
|
333
333
|
};
|
|
334
334
|
endpoints: {
|
|
@@ -337,12 +337,12 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
337
337
|
body: zod0.ZodObject<{
|
|
338
338
|
userId: zod0.ZodCoercedString<unknown>;
|
|
339
339
|
role: zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>;
|
|
340
|
-
},
|
|
340
|
+
}, better_auth454.$strip>;
|
|
341
341
|
requireHeaders: true;
|
|
342
342
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
343
343
|
session: {
|
|
344
|
-
user:
|
|
345
|
-
session:
|
|
344
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
345
|
+
session: better_auth454.Session;
|
|
346
346
|
};
|
|
347
347
|
}>)[];
|
|
348
348
|
metadata: {
|
|
@@ -378,17 +378,17 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
378
378
|
} & {
|
|
379
379
|
use: any[];
|
|
380
380
|
}, {
|
|
381
|
-
user:
|
|
381
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
382
382
|
}>;
|
|
383
383
|
getUser: better_call0.StrictEndpoint<"/admin/get-user", {
|
|
384
384
|
method: "GET";
|
|
385
385
|
query: zod0.ZodObject<{
|
|
386
386
|
id: zod0.ZodString;
|
|
387
|
-
},
|
|
387
|
+
}, better_auth454.$strip>;
|
|
388
388
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
389
389
|
session: {
|
|
390
|
-
user:
|
|
391
|
-
session:
|
|
390
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
391
|
+
session: better_auth454.Session;
|
|
392
392
|
};
|
|
393
393
|
}>)[];
|
|
394
394
|
metadata: {
|
|
@@ -434,7 +434,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
434
434
|
name: zod0.ZodString;
|
|
435
435
|
role: zod0.ZodOptional<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodArray<zod0.ZodString>]>>;
|
|
436
436
|
data: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodAny>>;
|
|
437
|
-
},
|
|
437
|
+
}, better_auth454.$strip>;
|
|
438
438
|
metadata: {
|
|
439
439
|
openapi: {
|
|
440
440
|
operationId: string;
|
|
@@ -471,18 +471,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
471
471
|
} & {
|
|
472
472
|
use: any[];
|
|
473
473
|
}, {
|
|
474
|
-
user:
|
|
474
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
475
475
|
}>;
|
|
476
476
|
adminUpdateUser: better_call0.StrictEndpoint<"/admin/update-user", {
|
|
477
477
|
method: "POST";
|
|
478
478
|
body: zod0.ZodObject<{
|
|
479
479
|
userId: zod0.ZodCoercedString<unknown>;
|
|
480
480
|
data: zod0.ZodRecord<zod0.ZodAny, zod0.ZodAny>;
|
|
481
|
-
},
|
|
481
|
+
}, better_auth454.$strip>;
|
|
482
482
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
483
483
|
session: {
|
|
484
|
-
user:
|
|
485
|
-
session:
|
|
484
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
485
|
+
session: better_auth454.Session;
|
|
486
486
|
};
|
|
487
487
|
}>)[];
|
|
488
488
|
metadata: {
|
|
@@ -511,13 +511,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
511
511
|
};
|
|
512
512
|
} & {
|
|
513
513
|
use: any[];
|
|
514
|
-
},
|
|
514
|
+
}, better_auth_client_plugins17.UserWithRole>;
|
|
515
515
|
listUsers: better_call0.StrictEndpoint<"/admin/list-users", {
|
|
516
516
|
method: "GET";
|
|
517
517
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
518
518
|
session: {
|
|
519
|
-
user:
|
|
520
|
-
session:
|
|
519
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
520
|
+
session: better_auth454.Session;
|
|
521
521
|
};
|
|
522
522
|
}>)[];
|
|
523
523
|
query: zod0.ZodObject<{
|
|
@@ -549,7 +549,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
549
549
|
gte: "gte";
|
|
550
550
|
contains: "contains";
|
|
551
551
|
}>>;
|
|
552
|
-
},
|
|
552
|
+
}, better_auth454.$strip>;
|
|
553
553
|
metadata: {
|
|
554
554
|
openapi: {
|
|
555
555
|
operationId: string;
|
|
@@ -590,7 +590,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
590
590
|
} & {
|
|
591
591
|
use: any[];
|
|
592
592
|
}, {
|
|
593
|
-
users:
|
|
593
|
+
users: better_auth_client_plugins17.UserWithRole[];
|
|
594
594
|
total: number;
|
|
595
595
|
limit: number | undefined;
|
|
596
596
|
offset: number | undefined;
|
|
@@ -602,13 +602,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
602
602
|
method: "POST";
|
|
603
603
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
604
604
|
session: {
|
|
605
|
-
user:
|
|
606
|
-
session:
|
|
605
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
606
|
+
session: better_auth454.Session;
|
|
607
607
|
};
|
|
608
608
|
}>)[];
|
|
609
609
|
body: zod0.ZodObject<{
|
|
610
610
|
userId: zod0.ZodCoercedString<unknown>;
|
|
611
|
-
},
|
|
611
|
+
}, better_auth454.$strip>;
|
|
612
612
|
metadata: {
|
|
613
613
|
openapi: {
|
|
614
614
|
operationId: string;
|
|
@@ -639,17 +639,17 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
639
639
|
} & {
|
|
640
640
|
use: any[];
|
|
641
641
|
}, {
|
|
642
|
-
sessions:
|
|
642
|
+
sessions: better_auth_client_plugins17.SessionWithImpersonatedBy[];
|
|
643
643
|
}>;
|
|
644
644
|
unbanUser: better_call0.StrictEndpoint<"/admin/unban-user", {
|
|
645
645
|
method: "POST";
|
|
646
646
|
body: zod0.ZodObject<{
|
|
647
647
|
userId: zod0.ZodCoercedString<unknown>;
|
|
648
|
-
},
|
|
648
|
+
}, better_auth454.$strip>;
|
|
649
649
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
650
650
|
session: {
|
|
651
|
-
user:
|
|
652
|
-
session:
|
|
651
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
652
|
+
session: better_auth454.Session;
|
|
653
653
|
};
|
|
654
654
|
}>)[];
|
|
655
655
|
metadata: {
|
|
@@ -695,11 +695,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
695
695
|
userId: zod0.ZodCoercedString<unknown>;
|
|
696
696
|
banReason: zod0.ZodOptional<zod0.ZodString>;
|
|
697
697
|
banExpiresIn: zod0.ZodOptional<zod0.ZodNumber>;
|
|
698
|
-
},
|
|
698
|
+
}, better_auth454.$strip>;
|
|
699
699
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
700
700
|
session: {
|
|
701
|
-
user:
|
|
702
|
-
session:
|
|
701
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
702
|
+
session: better_auth454.Session;
|
|
703
703
|
};
|
|
704
704
|
}>)[];
|
|
705
705
|
metadata: {
|
|
@@ -743,11 +743,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
743
743
|
method: "POST";
|
|
744
744
|
body: zod0.ZodObject<{
|
|
745
745
|
userId: zod0.ZodCoercedString<unknown>;
|
|
746
|
-
},
|
|
746
|
+
}, better_auth454.$strip>;
|
|
747
747
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
748
748
|
session: {
|
|
749
|
-
user:
|
|
750
|
-
session:
|
|
749
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
750
|
+
session: better_auth454.Session;
|
|
751
751
|
};
|
|
752
752
|
}>)[];
|
|
753
753
|
metadata: {
|
|
@@ -790,7 +790,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
790
790
|
ipAddress?: string | null | undefined;
|
|
791
791
|
userAgent?: string | null | undefined;
|
|
792
792
|
};
|
|
793
|
-
user:
|
|
793
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
794
794
|
}>;
|
|
795
795
|
stopImpersonating: better_call0.StrictEndpoint<"/admin/stop-impersonating", {
|
|
796
796
|
method: "POST";
|
|
@@ -798,18 +798,18 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
798
798
|
} & {
|
|
799
799
|
use: any[];
|
|
800
800
|
}, {
|
|
801
|
-
session:
|
|
802
|
-
user:
|
|
801
|
+
session: better_auth454.Session & Record<string, any>;
|
|
802
|
+
user: better_auth454.User & Record<string, any>;
|
|
803
803
|
}>;
|
|
804
804
|
revokeUserSession: better_call0.StrictEndpoint<"/admin/revoke-user-session", {
|
|
805
805
|
method: "POST";
|
|
806
806
|
body: zod0.ZodObject<{
|
|
807
807
|
sessionToken: zod0.ZodString;
|
|
808
|
-
},
|
|
808
|
+
}, better_auth454.$strip>;
|
|
809
809
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
810
810
|
session: {
|
|
811
|
-
user:
|
|
812
|
-
session:
|
|
811
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
812
|
+
session: better_auth454.Session;
|
|
813
813
|
};
|
|
814
814
|
}>)[];
|
|
815
815
|
metadata: {
|
|
@@ -845,11 +845,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
845
845
|
method: "POST";
|
|
846
846
|
body: zod0.ZodObject<{
|
|
847
847
|
userId: zod0.ZodCoercedString<unknown>;
|
|
848
|
-
},
|
|
848
|
+
}, better_auth454.$strip>;
|
|
849
849
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
850
850
|
session: {
|
|
851
|
-
user:
|
|
852
|
-
session:
|
|
851
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
852
|
+
session: better_auth454.Session;
|
|
853
853
|
};
|
|
854
854
|
}>)[];
|
|
855
855
|
metadata: {
|
|
@@ -885,11 +885,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
885
885
|
method: "POST";
|
|
886
886
|
body: zod0.ZodObject<{
|
|
887
887
|
userId: zod0.ZodCoercedString<unknown>;
|
|
888
|
-
},
|
|
888
|
+
}, better_auth454.$strip>;
|
|
889
889
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
890
890
|
session: {
|
|
891
|
-
user:
|
|
892
|
-
session:
|
|
891
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
892
|
+
session: better_auth454.Session;
|
|
893
893
|
};
|
|
894
894
|
}>)[];
|
|
895
895
|
metadata: {
|
|
@@ -926,11 +926,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
926
926
|
body: zod0.ZodObject<{
|
|
927
927
|
newPassword: zod0.ZodString;
|
|
928
928
|
userId: zod0.ZodCoercedString<unknown>;
|
|
929
|
-
},
|
|
929
|
+
}, better_auth454.$strip>;
|
|
930
930
|
use: ((inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<{
|
|
931
931
|
session: {
|
|
932
|
-
user:
|
|
933
|
-
session:
|
|
932
|
+
user: better_auth_client_plugins17.UserWithRole;
|
|
933
|
+
session: better_auth454.Session;
|
|
934
934
|
};
|
|
935
935
|
}>)[];
|
|
936
936
|
metadata: {
|
|
@@ -967,13 +967,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
967
967
|
body: zod0.ZodIntersection<zod0.ZodObject<{
|
|
968
968
|
userId: zod0.ZodOptional<zod0.ZodCoercedString<unknown>>;
|
|
969
969
|
role: zod0.ZodOptional<zod0.ZodString>;
|
|
970
|
-
},
|
|
970
|
+
}, better_auth454.$strip>, zod0.ZodUnion<readonly [zod0.ZodObject<{
|
|
971
971
|
permission: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
|
|
972
972
|
permissions: zod0.ZodUndefined;
|
|
973
|
-
},
|
|
973
|
+
}, better_auth454.$strip>, zod0.ZodObject<{
|
|
974
974
|
permission: zod0.ZodUndefined;
|
|
975
975
|
permissions: zod0.ZodRecord<zod0.ZodString, zod0.ZodArray<zod0.ZodString>>;
|
|
976
|
-
},
|
|
976
|
+
}, better_auth454.$strip>]>>;
|
|
977
977
|
metadata: {
|
|
978
978
|
openapi: {
|
|
979
979
|
description: string;
|
|
@@ -1130,8 +1130,8 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1130
1130
|
};
|
|
1131
1131
|
} | {
|
|
1132
1132
|
id: "organization";
|
|
1133
|
-
$InferServerPlugin:
|
|
1134
|
-
ac:
|
|
1133
|
+
$InferServerPlugin: better_auth_client35.OrganizationPlugin<{
|
|
1134
|
+
ac: better_auth_client35.AccessControl<{
|
|
1135
1135
|
readonly organization: readonly ["update", "delete"];
|
|
1136
1136
|
readonly member: readonly ["create", "update", "delete"];
|
|
1137
1137
|
readonly invitation: readonly ["create", "cancel"];
|
|
@@ -1139,9 +1139,9 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1139
1139
|
readonly ac: readonly ["create", "read", "update", "delete"];
|
|
1140
1140
|
}>;
|
|
1141
1141
|
roles: {
|
|
1142
|
-
admin:
|
|
1143
|
-
member:
|
|
1144
|
-
owner:
|
|
1142
|
+
admin: better_auth_client35.Role;
|
|
1143
|
+
member: better_auth_client35.Role;
|
|
1144
|
+
owner: better_auth_client35.Role;
|
|
1145
1145
|
};
|
|
1146
1146
|
teams: {
|
|
1147
1147
|
enabled: false;
|
|
@@ -1149,27 +1149,27 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1149
1149
|
schema: {
|
|
1150
1150
|
organization?: {
|
|
1151
1151
|
additionalFields?: {
|
|
1152
|
-
[key: string]:
|
|
1152
|
+
[key: string]: better_auth454.DBFieldAttribute;
|
|
1153
1153
|
};
|
|
1154
1154
|
};
|
|
1155
1155
|
member?: {
|
|
1156
1156
|
additionalFields?: {
|
|
1157
|
-
[key: string]:
|
|
1157
|
+
[key: string]: better_auth454.DBFieldAttribute;
|
|
1158
1158
|
};
|
|
1159
1159
|
};
|
|
1160
1160
|
invitation?: {
|
|
1161
1161
|
additionalFields?: {
|
|
1162
|
-
[key: string]:
|
|
1162
|
+
[key: string]: better_auth454.DBFieldAttribute;
|
|
1163
1163
|
};
|
|
1164
1164
|
};
|
|
1165
1165
|
team?: {
|
|
1166
1166
|
additionalFields?: {
|
|
1167
|
-
[key: string]:
|
|
1167
|
+
[key: string]: better_auth454.DBFieldAttribute;
|
|
1168
1168
|
};
|
|
1169
1169
|
};
|
|
1170
1170
|
organizationRole?: {
|
|
1171
1171
|
additionalFields?: {
|
|
1172
|
-
[key: string]:
|
|
1172
|
+
[key: string]: better_auth454.DBFieldAttribute;
|
|
1173
1173
|
};
|
|
1174
1174
|
};
|
|
1175
1175
|
} | undefined;
|
|
@@ -1177,7 +1177,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1177
1177
|
enabled: false;
|
|
1178
1178
|
};
|
|
1179
1179
|
}>;
|
|
1180
|
-
getActions: ($fetch:
|
|
1180
|
+
getActions: ($fetch: _better_fetch_fetch266.BetterFetch, _$store: better_auth454.ClientStore, co: BetterAuthClientOptions | undefined) => {
|
|
1181
1181
|
$Infer: {
|
|
1182
1182
|
ActiveOrganization: {
|
|
1183
1183
|
members: {
|
|
@@ -1198,7 +1198,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1198
1198
|
organizationId: string;
|
|
1199
1199
|
email: string;
|
|
1200
1200
|
role: "admin" | "member" | "owner";
|
|
1201
|
-
status:
|
|
1201
|
+
status: better_auth_client35.InvitationStatus;
|
|
1202
1202
|
inviterId: string;
|
|
1203
1203
|
expiresAt: Date;
|
|
1204
1204
|
createdAt: Date;
|
|
@@ -1224,7 +1224,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1224
1224
|
organizationId: string;
|
|
1225
1225
|
email: string;
|
|
1226
1226
|
role: "admin" | "member" | "owner";
|
|
1227
|
-
status:
|
|
1227
|
+
status: better_auth_client35.InvitationStatus;
|
|
1228
1228
|
inviterId: string;
|
|
1229
1229
|
expiresAt: Date;
|
|
1230
1230
|
createdAt: Date;
|
|
@@ -1274,13 +1274,13 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1274
1274
|
}) => boolean;
|
|
1275
1275
|
};
|
|
1276
1276
|
};
|
|
1277
|
-
getAtoms: ($fetch:
|
|
1278
|
-
$listOrg:
|
|
1279
|
-
$activeOrgSignal:
|
|
1280
|
-
$activeMemberSignal:
|
|
1281
|
-
$activeMemberRoleSignal:
|
|
1282
|
-
activeOrganization:
|
|
1283
|
-
data:
|
|
1277
|
+
getAtoms: ($fetch: _better_fetch_fetch266.BetterFetch) => {
|
|
1278
|
+
$listOrg: nanostores7.PreinitializedWritableAtom<boolean> & object;
|
|
1279
|
+
$activeOrgSignal: nanostores7.PreinitializedWritableAtom<boolean> & object;
|
|
1280
|
+
$activeMemberSignal: nanostores7.PreinitializedWritableAtom<boolean> & object;
|
|
1281
|
+
$activeMemberRoleSignal: nanostores7.PreinitializedWritableAtom<boolean> & object;
|
|
1282
|
+
activeOrganization: nanostores7.PreinitializedWritableAtom<{
|
|
1283
|
+
data: better_auth454.Prettify<{
|
|
1284
1284
|
id: string;
|
|
1285
1285
|
name: string;
|
|
1286
1286
|
slug: string;
|
|
@@ -1306,20 +1306,20 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1306
1306
|
organizationId: string;
|
|
1307
1307
|
email: string;
|
|
1308
1308
|
role: "admin" | "member" | "owner";
|
|
1309
|
-
status:
|
|
1309
|
+
status: better_auth_client35.InvitationStatus;
|
|
1310
1310
|
inviterId: string;
|
|
1311
1311
|
expiresAt: Date;
|
|
1312
1312
|
createdAt: Date;
|
|
1313
1313
|
}[];
|
|
1314
1314
|
}> | null;
|
|
1315
|
-
error: null |
|
|
1315
|
+
error: null | _better_fetch_fetch266.BetterFetchError;
|
|
1316
1316
|
isPending: boolean;
|
|
1317
1317
|
isRefetching: boolean;
|
|
1318
1318
|
refetch: (queryParams?: {
|
|
1319
|
-
query?:
|
|
1319
|
+
query?: better_auth454.SessionQueryParams;
|
|
1320
1320
|
} | undefined) => Promise<void>;
|
|
1321
1321
|
}> & object;
|
|
1322
|
-
listOrganizations:
|
|
1322
|
+
listOrganizations: nanostores7.PreinitializedWritableAtom<{
|
|
1323
1323
|
data: {
|
|
1324
1324
|
id: string;
|
|
1325
1325
|
name: string;
|
|
@@ -1328,14 +1328,14 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1328
1328
|
logo?: string | null | undefined | undefined;
|
|
1329
1329
|
metadata?: any;
|
|
1330
1330
|
}[] | null;
|
|
1331
|
-
error: null |
|
|
1331
|
+
error: null | _better_fetch_fetch266.BetterFetchError;
|
|
1332
1332
|
isPending: boolean;
|
|
1333
1333
|
isRefetching: boolean;
|
|
1334
1334
|
refetch: (queryParams?: {
|
|
1335
|
-
query?:
|
|
1335
|
+
query?: better_auth454.SessionQueryParams;
|
|
1336
1336
|
} | undefined) => Promise<void>;
|
|
1337
1337
|
}> & object;
|
|
1338
|
-
activeMember:
|
|
1338
|
+
activeMember: nanostores7.PreinitializedWritableAtom<{
|
|
1339
1339
|
data: {
|
|
1340
1340
|
id: string;
|
|
1341
1341
|
organizationId: string;
|
|
@@ -1343,22 +1343,22 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1343
1343
|
role: string;
|
|
1344
1344
|
createdAt: Date;
|
|
1345
1345
|
} | null;
|
|
1346
|
-
error: null |
|
|
1346
|
+
error: null | _better_fetch_fetch266.BetterFetchError;
|
|
1347
1347
|
isPending: boolean;
|
|
1348
1348
|
isRefetching: boolean;
|
|
1349
1349
|
refetch: (queryParams?: {
|
|
1350
|
-
query?:
|
|
1350
|
+
query?: better_auth454.SessionQueryParams;
|
|
1351
1351
|
} | undefined) => Promise<void>;
|
|
1352
1352
|
}> & object;
|
|
1353
|
-
activeMemberRole:
|
|
1353
|
+
activeMemberRole: nanostores7.PreinitializedWritableAtom<{
|
|
1354
1354
|
data: {
|
|
1355
1355
|
role: string;
|
|
1356
1356
|
} | null;
|
|
1357
|
-
error: null |
|
|
1357
|
+
error: null | _better_fetch_fetch266.BetterFetchError;
|
|
1358
1358
|
isPending: boolean;
|
|
1359
1359
|
isRefetching: boolean;
|
|
1360
1360
|
refetch: (queryParams?: {
|
|
1361
|
-
query?:
|
|
1361
|
+
query?: better_auth454.SessionQueryParams;
|
|
1362
1362
|
} | undefined) => Promise<void>;
|
|
1363
1363
|
}> & object;
|
|
1364
1364
|
};
|
|
@@ -1386,11 +1386,11 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1386
1386
|
id: "email-otp";
|
|
1387
1387
|
$InferServerPlugin: ReturnType<(options: better_auth_plugins_email_otp0.EmailOTPOptions) => {
|
|
1388
1388
|
id: "email-otp";
|
|
1389
|
-
init(ctx:
|
|
1389
|
+
init(ctx: better_auth454.AuthContext): {
|
|
1390
1390
|
options: {
|
|
1391
1391
|
emailVerification: {
|
|
1392
1392
|
sendVerificationEmail(data: {
|
|
1393
|
-
user:
|
|
1393
|
+
user: better_auth454.User;
|
|
1394
1394
|
url: string;
|
|
1395
1395
|
token: string;
|
|
1396
1396
|
}, request: Request | undefined): Promise<void>;
|
|
@@ -1407,7 +1407,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1407
1407
|
"email-verification": "email-verification";
|
|
1408
1408
|
"forget-password": "forget-password";
|
|
1409
1409
|
}>;
|
|
1410
|
-
},
|
|
1410
|
+
}, better_auth454.$strip>;
|
|
1411
1411
|
metadata: {
|
|
1412
1412
|
openapi: {
|
|
1413
1413
|
operationId: string;
|
|
@@ -1445,7 +1445,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1445
1445
|
"email-verification": "email-verification";
|
|
1446
1446
|
"forget-password": "forget-password";
|
|
1447
1447
|
}>;
|
|
1448
|
-
},
|
|
1448
|
+
}, better_auth454.$strip>;
|
|
1449
1449
|
metadata: {
|
|
1450
1450
|
SERVER_ONLY: true;
|
|
1451
1451
|
openapi: {
|
|
@@ -1477,7 +1477,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1477
1477
|
"email-verification": "email-verification";
|
|
1478
1478
|
"forget-password": "forget-password";
|
|
1479
1479
|
}>;
|
|
1480
|
-
},
|
|
1480
|
+
}, better_auth454.$strip>;
|
|
1481
1481
|
metadata: {
|
|
1482
1482
|
SERVER_ONLY: true;
|
|
1483
1483
|
openapi: {
|
|
@@ -1522,7 +1522,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1522
1522
|
"forget-password": "forget-password";
|
|
1523
1523
|
}>;
|
|
1524
1524
|
otp: zod0.ZodString;
|
|
1525
|
-
},
|
|
1525
|
+
}, better_auth454.$strip>;
|
|
1526
1526
|
metadata: {
|
|
1527
1527
|
openapi: {
|
|
1528
1528
|
operationId: string;
|
|
@@ -1556,7 +1556,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1556
1556
|
body: zod0.ZodObject<{
|
|
1557
1557
|
email: zod0.ZodString;
|
|
1558
1558
|
otp: zod0.ZodString;
|
|
1559
|
-
},
|
|
1559
|
+
}, better_auth454.$strip>;
|
|
1560
1560
|
metadata: {
|
|
1561
1561
|
openapi: {
|
|
1562
1562
|
description: string;
|
|
@@ -1622,7 +1622,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1622
1622
|
body: zod0.ZodObject<{
|
|
1623
1623
|
email: zod0.ZodString;
|
|
1624
1624
|
otp: zod0.ZodString;
|
|
1625
|
-
},
|
|
1625
|
+
}, better_auth454.$strip>;
|
|
1626
1626
|
metadata: {
|
|
1627
1627
|
openapi: {
|
|
1628
1628
|
operationId: string;
|
|
@@ -1669,7 +1669,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1669
1669
|
method: "POST";
|
|
1670
1670
|
body: zod0.ZodObject<{
|
|
1671
1671
|
email: zod0.ZodString;
|
|
1672
|
-
},
|
|
1672
|
+
}, better_auth454.$strip>;
|
|
1673
1673
|
metadata: {
|
|
1674
1674
|
openapi: {
|
|
1675
1675
|
operationId: string;
|
|
@@ -1705,7 +1705,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1705
1705
|
email: zod0.ZodString;
|
|
1706
1706
|
otp: zod0.ZodString;
|
|
1707
1707
|
password: zod0.ZodString;
|
|
1708
|
-
},
|
|
1708
|
+
}, better_auth454.$strip>;
|
|
1709
1709
|
metadata: {
|
|
1710
1710
|
openapi: {
|
|
1711
1711
|
operationId: string;
|
|
@@ -1737,7 +1737,7 @@ declare const supportedBetterAuthClientPlugins: ({
|
|
|
1737
1737
|
};
|
|
1738
1738
|
hooks: {
|
|
1739
1739
|
after: {
|
|
1740
|
-
matcher(context:
|
|
1740
|
+
matcher(context: better_auth454.HookEndpointContext): boolean;
|
|
1741
1741
|
handler: (inputContext: better_call0.MiddlewareInputContext<better_call0.MiddlewareOptions>) => Promise<void>;
|
|
1742
1742
|
}[];
|
|
1743
1743
|
};
|
package/dist/{better-auth-react-adapter-C3_WRaIy.mjs → better-auth-react-adapter-BLKXYcWM.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as NeonAuthAdapterCore } from "./adapter-core-
|
|
1
|
+
import { t as NeonAuthAdapterCore } from "./adapter-core-BQ6ga1zK.mjs";
|
|
2
2
|
import { createAuthClient } from "better-auth/react";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/better-auth-react/better-auth-react-adapter.ts
|