@gatwech/auth 1.0.0-beta.19 → 1.0.0-beta.20
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/index.d.mts +16 -16
- package/dist/client/plugins/index.d.mts +45 -45
- package/dist/client/react/index.d.mts +14 -14
- package/dist/{client-DZHNfxuR.d.mts → client-C_qmyez2.d.mts} +4 -4
- package/dist/{client-CSOs1YN7.d.mts → client-F67q-Lbi.d.mts} +1 -1
- package/dist/{index-Blmhq6eA.d.mts → index-4I1YhYhk.d.mts} +4 -4
- package/dist/{index-mxEUX2Gs.d.mts → index-BX7rl07Z.d.mts} +13 -13
- package/dist/{index-xoYsoOiR.d.mts → index-Bml-PCqP.d.mts} +20 -20
- package/dist/{index-DG-X1PK5.d.mts → index-BsSKcKgO.d.mts} +5 -5
- package/dist/{index-CP3FNbOZ.d.mts → index-CBiGsvDd.d.mts} +7 -7
- package/dist/{index-CUknVRZp.d.mts → index-CC920PPp.d.mts} +13 -13
- package/dist/{index-zBdYQGaS.d.mts → index-CNd5jqLl.d.mts} +5 -5
- package/dist/{index-DS-R7st3.d.mts → index-CP8x1TFq.d.mts} +6 -6
- package/dist/{index-CaqpCfE5.d.mts → index-CofuaNMl.d.mts} +6 -6
- package/dist/{index-Cv9iMevV.d.mts → index-CzpdkTdv.d.mts} +9 -9
- package/dist/{index-DRM35ir1.d.mts → index-D57DuhZR.d.mts} +110 -110
- package/dist/{index-DXVU0HGr.d.mts → index-D6ku0rUC.d.mts} +4 -4
- package/dist/{index-BAVzFqII.d.mts → index-DFSRYWFI.d.mts} +6 -6
- package/dist/{index-CgeC2eGC.d.mts → index-DGeoJ4gu.d.mts} +2 -2
- package/dist/{index-DyH_CgmX.d.mts → index-DTkcY7xH.d.mts} +10 -10
- package/dist/{index-COGe8UJx.d.mts → index-Dnd8S4S4.d.mts} +8 -8
- package/dist/{index-Df4SvZaE.d.mts → index-DwPAddfE.d.mts} +3 -3
- package/dist/{index-Db8jqUq2.d.mts → index-DyXi7S2M.d.mts} +9 -9
- package/dist/{index-CKnPAS5n.d.mts → index-KhbNmMmG.d.mts} +165 -165
- package/dist/{index-EABwA_BH.d.mts → index-XfE0WjTN.d.mts} +32 -32
- package/dist/{index-BNDRYfTF.d.mts → index-sb-UFLuo.d.mts} +2 -2
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/react-start.d.mts +4 -4
- package/dist/plugins/admin/index.d.mts +1 -1
- package/dist/plugins/anonymous/index.d.mts +1 -1
- package/dist/plugins/audit-log/client.d.mts +22 -22
- package/dist/plugins/audit-log/index.d.mts +21 -21
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/captcha/index.d.mts +1 -1
- package/dist/plugins/custom-session/index.d.mts +1 -1
- package/dist/plugins/device-authorization/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.d.mts +1 -1
- package/dist/plugins/generic-oauth/index.d.mts +1 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/index.d.mts +21 -21
- package/dist/plugins/index.mjs +1 -1
- package/dist/plugins/jwt/index.d.mts +1 -1
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/multi-session/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-time-token/index.d.mts +1 -1
- package/dist/plugins/one-time-token/index.mjs +1 -1
- package/dist/plugins/organization/index.d.mts +1 -1
- package/dist/plugins/passkey/index.d.mts +1 -1
- package/dist/plugins/phone-number/index.d.mts +1 -1
- package/dist/plugins/sentinel/client.d.mts +22 -22
- package/dist/plugins/sentinel/index.d.mts +21 -21
- package/dist/plugins/sentinel/index.mjs +1 -1
- package/dist/plugins/two-factor/index.d.mts +1 -1
- package/dist/plugins/username/index.d.mts +1 -1
- package/dist/{sentinel-C-D1IHJo.mjs → sentinel-DiPqydKG.mjs} +39 -8
- package/dist/src/plugins/sentinel/email.d.ts +9 -3
- package/dist/test-utils/index.d.mts +1042 -1042
- package/dist/test-utils/index.mjs +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _gatwech_core23 from "@gatwech/core";
|
|
2
|
+
import * as better_call60 from "better-call";
|
|
3
3
|
import * as z$1 from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/oauth-proxy/index.d.ts
|
|
@@ -48,7 +48,7 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
|
|
|
48
48
|
} & {
|
|
49
49
|
asResponse?: boolean;
|
|
50
50
|
returnHeaders?: boolean;
|
|
51
|
-
use?:
|
|
51
|
+
use?: better_call60.Middleware[];
|
|
52
52
|
path?: string;
|
|
53
53
|
} & {
|
|
54
54
|
asResponse?: AsResponse | undefined;
|
|
@@ -63,7 +63,7 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
|
|
|
63
63
|
callbackURL: z$1.ZodString;
|
|
64
64
|
cookies: z$1.ZodString;
|
|
65
65
|
}, z$1.core.$strip>;
|
|
66
|
-
use: ((inputContext:
|
|
66
|
+
use: ((inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<void>)[];
|
|
67
67
|
metadata: {
|
|
68
68
|
openapi: {
|
|
69
69
|
description: string;
|
|
@@ -96,12 +96,12 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
|
|
|
96
96
|
};
|
|
97
97
|
hooks: {
|
|
98
98
|
after: {
|
|
99
|
-
matcher(context:
|
|
100
|
-
handler: (inputContext:
|
|
99
|
+
matcher(context: _gatwech_core23.HookEndpointContext): boolean;
|
|
100
|
+
handler: (inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<void>;
|
|
101
101
|
}[];
|
|
102
102
|
before: ({
|
|
103
103
|
matcher(): true;
|
|
104
|
-
handler: (inputContext:
|
|
104
|
+
handler: (inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<{
|
|
105
105
|
context: {
|
|
106
106
|
context: {
|
|
107
107
|
oauthConfig: {
|
|
@@ -111,9 +111,9 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
|
|
|
111
111
|
};
|
|
112
112
|
} | undefined>;
|
|
113
113
|
} | {
|
|
114
|
-
matcher(context:
|
|
115
|
-
handler: (inputContext:
|
|
116
|
-
context:
|
|
114
|
+
matcher(context: _gatwech_core23.HookEndpointContext): boolean;
|
|
115
|
+
handler: (inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<{
|
|
116
|
+
context: better_call60.MiddlewareContext<better_call60.MiddlewareOptions, _gatwech_core23.AuthContext<_gatwech_core23.PayvoAuthOptions> & {
|
|
117
117
|
returned?: unknown | undefined;
|
|
118
118
|
responseHeaders?: Headers | undefined;
|
|
119
119
|
}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as Awaitable } from "./helper-BgOIGHsu.mjs";
|
|
2
2
|
import { On as index_d_exports, g as User, h as Session } from "./index-BNhJglHC.mjs";
|
|
3
3
|
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _gatwech_core48 from "@gatwech/core";
|
|
5
5
|
import { GenericEndpointContext } from "@gatwech/core";
|
|
6
|
-
import * as
|
|
6
|
+
import * as better_call114 from "better-call";
|
|
7
7
|
import * as z$1 from "zod";
|
|
8
8
|
import * as jose0 from "jose";
|
|
9
9
|
import { JSONWebKeySet, JWTPayload } from "jose";
|
|
@@ -250,7 +250,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
|
|
|
250
250
|
} & {
|
|
251
251
|
asResponse?: boolean;
|
|
252
252
|
returnHeaders?: boolean;
|
|
253
|
-
use?:
|
|
253
|
+
use?: better_call114.Middleware[];
|
|
254
254
|
path?: string;
|
|
255
255
|
} & {
|
|
256
256
|
asResponse?: AsResponse | undefined;
|
|
@@ -355,7 +355,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
|
|
|
355
355
|
} & {
|
|
356
356
|
asResponse?: boolean;
|
|
357
357
|
returnHeaders?: boolean;
|
|
358
|
-
use?:
|
|
358
|
+
use?: better_call114.Middleware[];
|
|
359
359
|
path?: string;
|
|
360
360
|
} & {
|
|
361
361
|
asResponse?: AsResponse | undefined;
|
|
@@ -371,7 +371,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
|
|
|
371
371
|
options: {
|
|
372
372
|
method: "GET";
|
|
373
373
|
requireHeaders: true;
|
|
374
|
-
use: ((inputContext:
|
|
374
|
+
use: ((inputContext: better_call114.MiddlewareInputContext<better_call114.MiddlewareOptions>) => Promise<{
|
|
375
375
|
session: {
|
|
376
376
|
session: Record<string, any> & {
|
|
377
377
|
id: string;
|
|
@@ -440,7 +440,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
|
|
|
440
440
|
} & {
|
|
441
441
|
asResponse?: boolean;
|
|
442
442
|
returnHeaders?: boolean;
|
|
443
|
-
use?:
|
|
443
|
+
use?: better_call114.Middleware[];
|
|
444
444
|
path?: string;
|
|
445
445
|
} & {
|
|
446
446
|
asResponse?: AsResponse | undefined;
|
|
@@ -476,8 +476,8 @@ declare const jwt: (options?: JwtOptions | undefined) => {
|
|
|
476
476
|
};
|
|
477
477
|
hooks: {
|
|
478
478
|
after: {
|
|
479
|
-
matcher(context:
|
|
480
|
-
handler: (inputContext:
|
|
479
|
+
matcher(context: _gatwech_core48.HookEndpointContext): boolean;
|
|
480
|
+
handler: (inputContext: better_call114.MiddlewareInputContext<better_call114.MiddlewareOptions>) => Promise<void>;
|
|
481
481
|
}[];
|
|
482
482
|
};
|
|
483
483
|
schema: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _gatwech_core11 from "@gatwech/core";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/haveibeenpwned/index.d.ts
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ interface HaveIBeenPwnedOptions {
|
|
|
13
13
|
}
|
|
14
14
|
declare const haveIBeenPwned: (options?: HaveIBeenPwnedOptions | undefined) => {
|
|
15
15
|
id: "haveIBeenPwned";
|
|
16
|
-
init(ctx:
|
|
16
|
+
init(ctx: _gatwech_core11.AuthContext<_gatwech_core11.PayvoAuthOptions>): {
|
|
17
17
|
context: {
|
|
18
18
|
password: {
|
|
19
19
|
hash(password: string): Promise<string>;
|
|
@@ -25,7 +25,7 @@ declare const haveIBeenPwned: (options?: HaveIBeenPwnedOptions | undefined) => {
|
|
|
25
25
|
minPasswordLength: number;
|
|
26
26
|
maxPasswordLength: number;
|
|
27
27
|
};
|
|
28
|
-
checkPassword: (userId: string, ctx:
|
|
28
|
+
checkPassword: (userId: string, ctx: _gatwech_core11.GenericEndpointContext<_gatwech_core11.PayvoAuthOptions>) => Promise<boolean>;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as Session, s as User } from "./index-Df0KhQRf-BEa5tdwJ.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _gatwech_core30 from "@gatwech/core";
|
|
3
|
+
import * as better_call83 from "better-call";
|
|
4
4
|
import * as z$1 from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/multi-session/index.d.ts
|
|
@@ -46,7 +46,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
46
46
|
} & {
|
|
47
47
|
asResponse?: boolean;
|
|
48
48
|
returnHeaders?: boolean;
|
|
49
|
-
use?:
|
|
49
|
+
use?: better_call83.Middleware[];
|
|
50
50
|
path?: string;
|
|
51
51
|
} & {
|
|
52
52
|
asResponse?: AsResponse | undefined;
|
|
@@ -102,7 +102,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
102
102
|
} & {
|
|
103
103
|
asResponse?: boolean;
|
|
104
104
|
returnHeaders?: boolean;
|
|
105
|
-
use?:
|
|
105
|
+
use?: better_call83.Middleware[];
|
|
106
106
|
path?: string;
|
|
107
107
|
} & {
|
|
108
108
|
asResponse?: AsResponse | undefined;
|
|
@@ -123,7 +123,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
123
123
|
sessionToken: z$1.ZodString;
|
|
124
124
|
}, z$1.core.$strip>;
|
|
125
125
|
requireHeaders: true;
|
|
126
|
-
use: ((inputContext:
|
|
126
|
+
use: ((inputContext: better_call83.MiddlewareInputContext<better_call83.MiddlewareOptions>) => Promise<{
|
|
127
127
|
session: {
|
|
128
128
|
session: Record<string, any> & {
|
|
129
129
|
id: string;
|
|
@@ -206,7 +206,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
206
206
|
} & {
|
|
207
207
|
asResponse?: boolean;
|
|
208
208
|
returnHeaders?: boolean;
|
|
209
|
-
use?:
|
|
209
|
+
use?: better_call83.Middleware[];
|
|
210
210
|
path?: string;
|
|
211
211
|
} & {
|
|
212
212
|
asResponse?: AsResponse | undefined;
|
|
@@ -225,7 +225,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
225
225
|
sessionToken: z$1.ZodString;
|
|
226
226
|
}, z$1.core.$strip>;
|
|
227
227
|
requireHeaders: true;
|
|
228
|
-
use: ((inputContext:
|
|
228
|
+
use: ((inputContext: better_call83.MiddlewareInputContext<better_call83.MiddlewareOptions>) => Promise<{
|
|
229
229
|
session: {
|
|
230
230
|
session: Record<string, any> & {
|
|
231
231
|
id: string;
|
|
@@ -278,8 +278,8 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
278
278
|
};
|
|
279
279
|
hooks: {
|
|
280
280
|
after: {
|
|
281
|
-
matcher: (context:
|
|
282
|
-
handler: (inputContext:
|
|
281
|
+
matcher: (context: _gatwech_core30.HookEndpointContext) => boolean;
|
|
282
|
+
handler: (inputContext: better_call83.MiddlewareInputContext<better_call83.MiddlewareOptions>) => Promise<void>;
|
|
283
283
|
}[];
|
|
284
284
|
};
|
|
285
285
|
$ERROR_CODES: {
|