@gatwech/auth 1.0.0-beta.18 → 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/README.md +8 -14
- package/dist/{access-C6O_osEz.mjs → access-CrwEFPHE.mjs} +1 -1
- package/dist/{access-DT1f6l5k.mjs → access-bhklJd7m.mjs} +1 -1
- package/dist/{adapter-factory-BZ2Qiqpn.mjs → adapter-factory-xbLUJt85.mjs} +2 -2
- package/dist/adapters/drizzle-adapter/index.mjs +6 -5
- package/dist/adapters/index.d.mts +5 -5
- package/dist/adapters/index.mjs +6 -5
- package/dist/adapters/kysely-adapter/index.d.mts +1 -1
- package/dist/adapters/kysely-adapter/index.mjs +8 -7
- package/dist/adapters/memory-adapter/index.d.mts +1 -1
- package/dist/adapters/memory-adapter/index.mjs +6 -5
- package/dist/adapters/mongodb-adapter/index.mjs +6 -5
- package/dist/adapters/prisma-adapter/index.mjs +6 -5
- package/dist/adapters/test.mjs +4 -3
- package/dist/{admin-Bcq53Nwj.mjs → admin-BzUJL6tr.mjs} +6 -6
- package/dist/{anonymous-CRt1imBW.mjs → anonymous-BjlTk4gl.mjs} +5 -5
- package/dist/api/index.d.mts +5 -5
- package/dist/api/index.mjs +12 -11
- package/dist/{api-0pR_I-Nx.mjs → api-Dk8Yj_J5.mjs} +15 -5
- package/dist/audit-log-DKsUWR8O.mjs +772 -0
- package/dist/{auth-CBUoBX6o.mjs → auth-vfCyIIeV.mjs} +8 -8
- package/dist/{bearer-Djf_awfo.mjs → bearer-DvQLM00l.mjs} +2 -2
- package/dist/client/index.d.mts +19 -19
- package/dist/client/index.mjs +4 -4
- package/dist/client/plugins/index.d.mts +42 -34
- package/dist/client/plugins/index.mjs +16 -12
- package/dist/client/react/index.d.mts +5 -5
- package/dist/client/react/index.mjs +2 -2
- package/dist/client-4QEb0rUr.mjs +95 -0
- package/dist/client-C_qmyez2.d.mts +75 -0
- package/dist/client-DzOqXJUm.mjs +15 -0
- package/dist/client-F67q-Lbi.d.mts +14 -0
- package/dist/{client-aExCkfwm.mjs → client-xga7yFIX.mjs} +2 -2
- package/dist/cookies/index.d.mts +6 -6
- package/dist/cookies/index.mjs +2 -2
- package/dist/{cookies-cJObLwn1.mjs → cookies-BuvlgcA-.mjs} +1 -1
- package/dist/crypto/index.mjs +2 -1
- package/dist/{crypto-Bb42eMrH.mjs → crypto-CCyta8xj.mjs} +1 -6
- package/dist/{custom-session-L3t7ecsd.mjs → custom-session-DN_-pfi_.mjs} +2 -2
- package/dist/db/index.d.mts +5 -5
- package/dist/db/index.mjs +9 -8
- package/dist/{db-BrstmDhc.mjs → db-7vHnL1XA.mjs} +15 -9
- package/dist/{device-authorization-V4s3h4Mj.mjs → device-authorization-BKnNhlsz.mjs} +4 -4
- package/dist/{dialect-CeddeGHf.mjs → dialect-HsWUfpYY.mjs} +2 -2
- package/dist/{email-otp-BtDHSw14.mjs → email-otp-Dw0DypjQ.mjs} +7 -6
- package/dist/{generic-oauth-CL5X27ZI.mjs → generic-oauth-DFj27JY8.mjs} +4 -4
- package/dist/{has-permission-BpAr7uCn.mjs → has-permission-Bvg8de8g.mjs} +1 -1
- package/dist/{haveibeenpwned-cMpJvmzI.mjs → haveibeenpwned-CzNda7Tn.mjs} +28 -15
- package/dist/{index-BYMI9r_d.d.mts → index-4I1YhYhk.d.mts} +4 -4
- package/dist/{index-Cxi7TbLE.d.mts → index-BNhJglHC.d.mts} +122 -122
- package/dist/{index-DlaMq1nb.d.mts → index-BX7rl07Z.d.mts} +14 -14
- package/dist/{client-BOX93C3d.d.mts → index-Bml-PCqP.d.mts} +52 -52
- package/dist/{index-zjjNBRY2.d.mts → index-BsSKcKgO.d.mts} +6 -6
- package/dist/{index-Buhn3hkR.d.mts → index-CBiGsvDd.d.mts} +8 -8
- package/dist/{index-D_k662QG.d.mts → index-CC920PPp.d.mts} +14 -14
- package/dist/{index-B3n8e37d.d.mts → index-CNd5jqLl.d.mts} +7 -7
- package/dist/{index-BqhKCbPH.d.mts → index-CP8x1TFq.d.mts} +6 -6
- package/dist/{index-DKNNV1kb.d.mts → index-CofuaNMl.d.mts} +8 -8
- package/dist/{index-DR0xXno9.d.mts → index-CsxtcAO0.d.mts} +1 -1
- package/dist/{index-C7fQuk-V.d.mts → index-CxlWnL9c.d.mts} +1 -1
- package/dist/{index-CuFzhoS6.d.mts → index-CzpdkTdv.d.mts} +10 -10
- package/dist/index-D57DuhZR.d.mts +3769 -0
- package/dist/{index-C-u1h_WX.d.mts → index-D6ku0rUC.d.mts} +5 -5
- package/dist/{client-CNY0tn9g.d.mts → index-DFSRYWFI.d.mts} +21 -21
- package/dist/{index-BBm8nQ9Q.d.mts → index-DGeoJ4gu.d.mts} +2 -2
- package/dist/{index-G6V0Z_Mn.d.mts → index-DTkcY7xH.d.mts} +10 -10
- package/dist/{index-65G5U5DB-DSdjzreF.d.mts → index-Df0KhQRf-BEa5tdwJ.d.mts} +3 -2
- package/dist/{index-34ONrP8l.d.mts → index-Dnd8S4S4.d.mts} +11 -11
- package/dist/{index-B-XKqFvY.d.mts → index-DwPAddfE.d.mts} +11 -4
- package/dist/{index-DoXZYQpq.d.mts → index-DyXi7S2M.d.mts} +10 -10
- package/dist/{index-BHoQlf7a.d.mts → index-KhbNmMmG.d.mts} +178 -178
- package/dist/{index-z0KSvE5i.d.mts → index-QmocqGM-.d.mts} +1 -1
- package/dist/{admin-DtfO1PLg.d.mts → index-XfE0WjTN.d.mts} +36 -36
- package/dist/{index-DaBcikv9.d.mts → index-sb-UFLuo.d.mts} +2 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +16 -15
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/next-js.mjs +2 -2
- package/dist/integrations/node.d.mts +5 -5
- package/dist/integrations/react-start.d.mts +4 -4
- package/dist/integrations/react-start.mjs +2 -2
- package/dist/{jwt-lHV4QHpD.mjs → jwt-DBN2mu0r.mjs} +4 -4
- package/dist/{kysely-adapter-DpzYO8Yf.mjs → kysely-adapter-Bkm1liPW.mjs} +1 -1
- package/dist/{magic-link-Bk-ueorR.mjs → magic-link-D9Em1aOR.mjs} +3 -3
- package/dist/{multi-session-DRrLKrg9.mjs → multi-session-Dno_8DxC.mjs} +5 -5
- package/dist/{oauth-proxy-D1sWh9B_.mjs → oauth-proxy-DW-zt8wv.mjs} +2 -2
- package/dist/oauth2/index.d.mts +5 -5
- package/dist/oauth2/index.mjs +12 -11
- package/dist/{one-tap-DMswkTEc.mjs → one-tap-CodeyQb8.mjs} +2 -2
- package/dist/{organization-BArHO_5v.mjs → organization-CkTKs7bx.mjs} +9 -9
- package/dist/{passkey-CcD4CnhM.mjs → passkey-JNQTz5a0.mjs} +5 -5
- package/dist/{phone-number-rHDIlh-2.mjs → phone-number-Dqz8aeyF.mjs} +4 -4
- package/dist/plugins/access/index.d.mts +2 -2
- package/dist/plugins/access/index.mjs +1 -1
- package/dist/plugins/admin/access/index.d.mts +2 -2
- package/dist/plugins/admin/access/index.mjs +2 -2
- package/dist/plugins/admin/index.d.mts +7 -8
- package/dist/plugins/admin/index.mjs +17 -16
- package/dist/plugins/anonymous/index.d.mts +6 -6
- package/dist/plugins/anonymous/index.mjs +13 -12
- package/dist/plugins/audit-log/client.d.mts +30 -0
- package/dist/plugins/audit-log/client.mjs +3 -0
- package/dist/plugins/audit-log/index.d.mts +29 -0
- package/dist/plugins/audit-log/index.mjs +20 -0
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/bearer/index.mjs +3 -3
- package/dist/plugins/captcha/index.d.mts +1 -1
- package/dist/plugins/captcha/index.mjs +1 -1
- package/dist/plugins/custom-session/index.d.mts +6 -6
- package/dist/plugins/custom-session/index.mjs +14 -13
- package/dist/plugins/device-authorization/index.d.mts +3 -3
- package/dist/plugins/device-authorization/index.mjs +13 -12
- package/dist/plugins/email-otp/index.d.mts +2 -2
- package/dist/plugins/email-otp/index.mjs +14 -13
- package/dist/plugins/generic-oauth/index.d.mts +6 -6
- package/dist/plugins/generic-oauth/index.mjs +13 -12
- package/dist/plugins/haveibeenpwned/index.d.mts +2 -2
- package/dist/plugins/haveibeenpwned/index.mjs +14 -13
- package/dist/plugins/index.d.mts +29 -139
- package/dist/plugins/index.mjs +47 -42
- package/dist/plugins/jwt/index.d.mts +6 -6
- package/dist/plugins/jwt/index.mjs +13 -12
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/magic-link/index.mjs +13 -12
- package/dist/plugins/multi-session/index.d.mts +2 -2
- package/dist/plugins/multi-session/index.mjs +13 -12
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +13 -12
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-tap/index.mjs +13 -12
- package/dist/plugins/one-time-token/index.d.mts +6 -6
- package/dist/plugins/one-time-token/index.mjs +46 -41
- package/dist/plugins/organization/access/index.d.mts +3 -3
- package/dist/plugins/organization/access/index.mjs +2 -2
- package/dist/plugins/organization/index.d.mts +8 -8
- package/dist/plugins/organization/index.mjs +17 -16
- package/dist/plugins/passkey/index.d.mts +6 -6
- package/dist/plugins/passkey/index.mjs +13 -12
- package/dist/plugins/phone-number/index.d.mts +6 -6
- package/dist/plugins/phone-number/index.mjs +13 -12
- package/dist/plugins/sentinel/client.d.mts +30 -0
- package/dist/plugins/sentinel/client.mjs +5 -0
- package/dist/plugins/sentinel/index.d.mts +29 -0
- package/dist/plugins/sentinel/index.mjs +22 -0
- package/dist/plugins/two-factor/index.d.mts +6 -6
- package/dist/plugins/two-factor/index.mjs +15 -14
- package/dist/plugins/username/index.d.mts +3 -3
- package/dist/plugins/username/index.mjs +13 -12
- package/dist/{plugins-hFZT3hmK.d.mts → plugins-Dy_FrD4Y.d.mts} +1 -1
- package/dist/{plugins-3jfNste3.mjs → plugins-yF8CFUDR.mjs} +11 -8
- package/dist/pow-OK01yPG3.mjs +61 -0
- package/dist/{proxy-CL9PZXJA.mjs → proxy-C_KXfOhk.mjs} +1 -1
- package/dist/random-32E3cU5o.mjs +7 -0
- package/dist/registry-CqG_3Qnx.mjs +194 -0
- package/dist/sentinel-DiPqydKG.mjs +1426 -0
- package/dist/{session-Dgp133Yt.mjs → session-BB3oqApE.mjs} +2 -2
- package/dist/src/adapters/memory-adapter/memory-adapter.d.ts +1 -1
- package/dist/src/adapters/prisma-adapter/test/auth.d.ts +1 -1
- package/dist/src/adapters/tests/auth-flow.d.ts +3 -3
- package/dist/src/adapters/tests/normal.d.ts +1 -1
- package/dist/src/adapters/tests/number-id.d.ts +3 -3
- package/dist/src/adapters/tests/performance.d.ts +3 -3
- package/dist/src/adapters/tests/transactions.d.ts +3 -3
- package/dist/src/api/index.d.ts +8 -8
- package/dist/src/client/plugins/index.d.ts +2 -0
- package/dist/src/plugins/admin/admin.d.ts +2 -2
- package/dist/src/plugins/api-key/index.d.ts +2 -2
- package/dist/src/plugins/audit-log/client.d.ts +10 -0
- package/dist/src/plugins/audit-log/events.d.ts +90 -0
- package/dist/src/plugins/audit-log/index.d.ts +614 -0
- package/dist/src/plugins/audit-log/registry.d.ts +13 -0
- package/dist/src/plugins/audit-log/remote.d.ts +34 -0
- package/dist/src/plugins/audit-log/schema.d.ts +50 -0
- package/dist/src/plugins/audit-log/types.d.ts +117 -0
- package/dist/src/plugins/email-otp/index.d.ts +1 -1
- package/dist/src/plugins/haveibeenpwned/index.d.ts +6 -0
- package/dist/src/plugins/index.d.ts +2 -0
- package/dist/src/plugins/multi-session/index.d.ts +8 -8
- package/dist/src/plugins/organization/organization.d.ts +5 -5
- package/dist/src/plugins/organization/routes/crud-access-control.d.ts +8 -8
- package/dist/src/plugins/organization/routes/crud-invites.d.ts +46 -46
- package/dist/src/plugins/organization/routes/crud-members.d.ts +40 -40
- package/dist/src/plugins/organization/routes/crud-org.d.ts +36 -36
- package/dist/src/plugins/organization/routes/crud-team.d.ts +50 -50
- package/dist/src/plugins/sentinel/actions.d.ts +64 -0
- package/dist/src/plugins/sentinel/client.d.ts +67 -0
- package/dist/src/plugins/sentinel/email.d.ts +28 -0
- package/dist/src/plugins/sentinel/geo.d.ts +22 -0
- package/dist/src/plugins/sentinel/index.d.ts +326 -0
- package/dist/src/plugins/sentinel/intel.d.ts +45 -0
- package/dist/src/plugins/sentinel/pow.d.ts +21 -0
- package/dist/src/plugins/sentinel/schema.d.ts +110 -0
- package/dist/src/plugins/sentinel/store.d.ts +37 -0
- package/dist/src/plugins/sentinel/types.d.ts +412 -0
- package/dist/src/test-utils/memory-secondary-storage.d.ts +16 -0
- package/dist/src/test-utils/password.d.ts +12 -0
- package/dist/src/test-utils/test-instance.d.ts +25 -25
- package/dist/test-utils/index.d.mts +293 -293
- package/dist/test-utils/index.mjs +53 -48
- package/dist/{two-factor-ClUXxom2.mjs → two-factor-CDVjxx4f.mjs} +6 -5
- package/dist/types/index.d.mts +5 -5
- package/dist/types/index.mjs +1 -1
- package/dist/{username-DiGklOGl.mjs → username-BHNvcvsY.mjs} +3 -3
- package/dist/{utils-SOMB4Px5.mjs → utils-B03WRaGi.mjs} +2 -1
- package/package.json +36 -3
- package/dist/index-CM-CFWwr.d.mts +0 -1919
- package/dist/index-DB7t8whN.d.mts +0 -1
- /package/dist/{access-BO2g7QVe.mjs → access-BM6jSA5j.mjs} +0 -0
- /package/dist/{bun-sqlite-dialect-CeNvMaZz.mjs → bun-sqlite-dialect-CDGusFqF.mjs} +0 -0
- /package/dist/{captcha-BqaMxlKC.mjs → captcha-DGP9lCRe.mjs} +0 -0
- /package/dist/{client-CygJhqeB.mjs → client-BuveH3MN.mjs} +0 -0
- /package/dist/{client-WiN43tAS.mjs → client-cBiytuOL.mjs} +0 -0
- /package/dist/{date-Cx2yCiC4.mjs → date-CMr04reD.mjs} +0 -0
- /package/dist/{esm-C-QicDNz.mjs → esm-BbvI87Z2.mjs} +0 -0
- /package/dist/{get-tables-BQP7YW9c.mjs → get-tables-CKvSyDST.mjs} +0 -0
- /package/dist/{helper-tmxW3BHj.d.mts → helper-BgOIGHsu.d.mts} +0 -0
- /package/dist/{misc-beA1w3XV.mjs → misc-fKH4d5XQ.mjs} +0 -0
- /package/dist/{node-sqlite-dialect-BcKxBQnm.mjs → node-sqlite-dialect-CIOjcg31.mjs} +0 -0
- /package/dist/{parser-DcrIEuXE.mjs → parser-D7EkhAjZ.mjs} +0 -0
- /package/dist/{password-sVC4nePO.mjs → password-5CdcAVaH.mjs} +0 -0
- /package/dist/{permission-DLYUF3cW.mjs → permission-CDDWgA_O.mjs} +0 -0
- /package/dist/{plugin-helper-4L-lzsjZ.mjs → plugin-helper-RJJBTOba.mjs} +0 -0
- /package/dist/{promise-8rrEHRXd.mjs → promise-D7Oo6_cY.mjs} +0 -0
- /package/dist/{types-Bjn15Uy6.mjs → types-DCPpFKUB.mjs} +0 -0
- /package/dist/{types-B1OL7hyf.d.mts → types-DNQ9XQrB.d.mts} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as User, h as Session } from "./index-
|
|
2
|
-
import { s as User$1 } from "./index-
|
|
3
|
-
import { t as InferOptionSchema } from "./plugins-
|
|
4
|
-
import { a as Role, i as AccessControl, o as Statements } from "./index-
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
1
|
+
import { g as User, h as Session } from "./index-BNhJglHC.mjs";
|
|
2
|
+
import { s as User$1 } from "./index-Df0KhQRf-BEa5tdwJ.mjs";
|
|
3
|
+
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
4
|
+
import { a as Role, i as AccessControl, o as Statements } from "./index-CxlWnL9c.mjs";
|
|
5
|
+
import * as _gatwech_core60 from "@gatwech/core";
|
|
6
|
+
import * as better_call248 from "better-call";
|
|
7
7
|
import * as z$1 from "zod";
|
|
8
8
|
|
|
9
9
|
//#region src/plugins/admin/schema.d.ts
|
|
@@ -159,7 +159,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
159
159
|
token: string;
|
|
160
160
|
ipAddress?: string | null | undefined;
|
|
161
161
|
userAgent?: string | null | undefined;
|
|
162
|
-
} & Record<string, unknown>, ctx:
|
|
162
|
+
} & Record<string, unknown>, ctx: _gatwech_core60.GenericEndpointContext<_gatwech_core60.PayvoAuthOptions> | undefined): Promise<void>;
|
|
163
163
|
};
|
|
164
164
|
};
|
|
165
165
|
};
|
|
@@ -167,8 +167,8 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
167
167
|
};
|
|
168
168
|
hooks: {
|
|
169
169
|
after: {
|
|
170
|
-
matcher(context:
|
|
171
|
-
handler: (inputContext:
|
|
170
|
+
matcher(context: _gatwech_core60.HookEndpointContext): boolean;
|
|
171
|
+
handler: (inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<SessionWithImpersonatedBy[] | undefined>;
|
|
172
172
|
}[];
|
|
173
173
|
};
|
|
174
174
|
endpoints: {
|
|
@@ -206,7 +206,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
206
206
|
} & {
|
|
207
207
|
asResponse?: boolean;
|
|
208
208
|
returnHeaders?: boolean;
|
|
209
|
-
use?:
|
|
209
|
+
use?: better_call248.Middleware[];
|
|
210
210
|
path?: string;
|
|
211
211
|
} & {
|
|
212
212
|
asResponse?: AsResponse | undefined;
|
|
@@ -226,7 +226,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
226
226
|
role: z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodArray<z$1.ZodString>]>;
|
|
227
227
|
}, z$1.core.$strip>;
|
|
228
228
|
requireHeaders: true;
|
|
229
|
-
use: ((inputContext:
|
|
229
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
230
230
|
session: {
|
|
231
231
|
user: UserWithRole;
|
|
232
232
|
session: Session;
|
|
@@ -285,7 +285,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
285
285
|
} & {
|
|
286
286
|
asResponse?: boolean;
|
|
287
287
|
returnHeaders?: boolean;
|
|
288
|
-
use?:
|
|
288
|
+
use?: better_call248.Middleware[];
|
|
289
289
|
path?: string;
|
|
290
290
|
} & {
|
|
291
291
|
asResponse?: AsResponse | undefined;
|
|
@@ -315,7 +315,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
315
315
|
query: z$1.ZodObject<{
|
|
316
316
|
id: z$1.ZodString;
|
|
317
317
|
}, z$1.core.$strip>;
|
|
318
|
-
use: ((inputContext:
|
|
318
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
319
319
|
session: {
|
|
320
320
|
user: UserWithRole;
|
|
321
321
|
session: Session;
|
|
@@ -387,7 +387,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
387
387
|
} & {
|
|
388
388
|
asResponse?: boolean;
|
|
389
389
|
returnHeaders?: boolean;
|
|
390
|
-
use?:
|
|
390
|
+
use?: better_call248.Middleware[];
|
|
391
391
|
path?: string;
|
|
392
392
|
} & {
|
|
393
393
|
asResponse?: AsResponse | undefined;
|
|
@@ -481,7 +481,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
481
481
|
} & {
|
|
482
482
|
asResponse?: boolean;
|
|
483
483
|
returnHeaders?: boolean;
|
|
484
|
-
use?:
|
|
484
|
+
use?: better_call248.Middleware[];
|
|
485
485
|
path?: string;
|
|
486
486
|
} & {
|
|
487
487
|
asResponse?: AsResponse | undefined;
|
|
@@ -496,7 +496,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
496
496
|
userId: z$1.ZodCoercedString<unknown>;
|
|
497
497
|
data: z$1.ZodRecord<z$1.ZodAny, z$1.ZodAny>;
|
|
498
498
|
}, z$1.core.$strip>;
|
|
499
|
-
use: ((inputContext:
|
|
499
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
500
500
|
session: {
|
|
501
501
|
user: UserWithRole;
|
|
502
502
|
session: Session;
|
|
@@ -558,7 +558,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
558
558
|
} & {
|
|
559
559
|
asResponse?: boolean;
|
|
560
560
|
returnHeaders?: boolean;
|
|
561
|
-
use?:
|
|
561
|
+
use?: better_call248.Middleware[];
|
|
562
562
|
path?: string;
|
|
563
563
|
} & {
|
|
564
564
|
asResponse?: AsResponse | undefined;
|
|
@@ -585,7 +585,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
585
585
|
}>;
|
|
586
586
|
options: {
|
|
587
587
|
method: "GET";
|
|
588
|
-
use: ((inputContext:
|
|
588
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
589
589
|
session: {
|
|
590
590
|
user: UserWithRole;
|
|
591
591
|
session: Session;
|
|
@@ -696,7 +696,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
696
696
|
} & {
|
|
697
697
|
asResponse?: boolean;
|
|
698
698
|
returnHeaders?: boolean;
|
|
699
|
-
use?:
|
|
699
|
+
use?: better_call248.Middleware[];
|
|
700
700
|
path?: string;
|
|
701
701
|
} & {
|
|
702
702
|
asResponse?: AsResponse | undefined;
|
|
@@ -711,7 +711,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
711
711
|
}>;
|
|
712
712
|
options: {
|
|
713
713
|
method: "POST";
|
|
714
|
-
use: ((inputContext:
|
|
714
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
715
715
|
session: {
|
|
716
716
|
user: UserWithRole;
|
|
717
717
|
session: Session;
|
|
@@ -785,7 +785,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
785
785
|
} & {
|
|
786
786
|
asResponse?: boolean;
|
|
787
787
|
returnHeaders?: boolean;
|
|
788
|
-
use?:
|
|
788
|
+
use?: better_call248.Middleware[];
|
|
789
789
|
path?: string;
|
|
790
790
|
} & {
|
|
791
791
|
asResponse?: AsResponse | undefined;
|
|
@@ -803,7 +803,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
803
803
|
body: z$1.ZodObject<{
|
|
804
804
|
userId: z$1.ZodCoercedString<unknown>;
|
|
805
805
|
}, z$1.core.$strip>;
|
|
806
|
-
use: ((inputContext:
|
|
806
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
807
807
|
session: {
|
|
808
808
|
user: UserWithRole;
|
|
809
809
|
session: Session;
|
|
@@ -873,7 +873,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
873
873
|
} & {
|
|
874
874
|
asResponse?: boolean;
|
|
875
875
|
returnHeaders?: boolean;
|
|
876
|
-
use?:
|
|
876
|
+
use?: better_call248.Middleware[];
|
|
877
877
|
path?: string;
|
|
878
878
|
} & {
|
|
879
879
|
asResponse?: AsResponse | undefined;
|
|
@@ -893,7 +893,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
893
893
|
banReason: z$1.ZodOptional<z$1.ZodString>;
|
|
894
894
|
banExpiresIn: z$1.ZodOptional<z$1.ZodNumber>;
|
|
895
895
|
}, z$1.core.$strip>;
|
|
896
|
-
use: ((inputContext:
|
|
896
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
897
897
|
session: {
|
|
898
898
|
user: UserWithRole;
|
|
899
899
|
session: Session;
|
|
@@ -961,7 +961,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
961
961
|
} & {
|
|
962
962
|
asResponse?: boolean;
|
|
963
963
|
returnHeaders?: boolean;
|
|
964
|
-
use?:
|
|
964
|
+
use?: better_call248.Middleware[];
|
|
965
965
|
path?: string;
|
|
966
966
|
} & {
|
|
967
967
|
asResponse?: AsResponse | undefined;
|
|
@@ -1015,7 +1015,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
1015
1015
|
body: z$1.ZodObject<{
|
|
1016
1016
|
userId: z$1.ZodCoercedString<unknown>;
|
|
1017
1017
|
}, z$1.core.$strip>;
|
|
1018
|
-
use: ((inputContext:
|
|
1018
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
1019
1019
|
session: {
|
|
1020
1020
|
user: UserWithRole;
|
|
1021
1021
|
session: Session;
|
|
@@ -1084,7 +1084,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
1084
1084
|
} & {
|
|
1085
1085
|
asResponse?: boolean;
|
|
1086
1086
|
returnHeaders?: boolean;
|
|
1087
|
-
use?:
|
|
1087
|
+
use?: better_call248.Middleware[];
|
|
1088
1088
|
path?: string;
|
|
1089
1089
|
} & {
|
|
1090
1090
|
asResponse?: AsResponse | undefined;
|
|
@@ -1140,7 +1140,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
1140
1140
|
} & {
|
|
1141
1141
|
asResponse?: boolean;
|
|
1142
1142
|
returnHeaders?: boolean;
|
|
1143
|
-
use?:
|
|
1143
|
+
use?: better_call248.Middleware[];
|
|
1144
1144
|
path?: string;
|
|
1145
1145
|
} & {
|
|
1146
1146
|
asResponse?: AsResponse | undefined;
|
|
@@ -1158,7 +1158,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
1158
1158
|
body: z$1.ZodObject<{
|
|
1159
1159
|
sessionToken: z$1.ZodString;
|
|
1160
1160
|
}, z$1.core.$strip>;
|
|
1161
|
-
use: ((inputContext:
|
|
1161
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
1162
1162
|
session: {
|
|
1163
1163
|
user: UserWithRole;
|
|
1164
1164
|
session: Session;
|
|
@@ -1226,7 +1226,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
1226
1226
|
} & {
|
|
1227
1227
|
asResponse?: boolean;
|
|
1228
1228
|
returnHeaders?: boolean;
|
|
1229
|
-
use?:
|
|
1229
|
+
use?: better_call248.Middleware[];
|
|
1230
1230
|
path?: string;
|
|
1231
1231
|
} & {
|
|
1232
1232
|
asResponse?: AsResponse | undefined;
|
|
@@ -1244,7 +1244,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
1244
1244
|
body: z$1.ZodObject<{
|
|
1245
1245
|
userId: z$1.ZodCoercedString<unknown>;
|
|
1246
1246
|
}, z$1.core.$strip>;
|
|
1247
|
-
use: ((inputContext:
|
|
1247
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
1248
1248
|
session: {
|
|
1249
1249
|
user: UserWithRole;
|
|
1250
1250
|
session: Session;
|
|
@@ -1312,7 +1312,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
1312
1312
|
} & {
|
|
1313
1313
|
asResponse?: boolean;
|
|
1314
1314
|
returnHeaders?: boolean;
|
|
1315
|
-
use?:
|
|
1315
|
+
use?: better_call248.Middleware[];
|
|
1316
1316
|
path?: string;
|
|
1317
1317
|
} & {
|
|
1318
1318
|
asResponse?: AsResponse | undefined;
|
|
@@ -1330,7 +1330,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
1330
1330
|
body: z$1.ZodObject<{
|
|
1331
1331
|
userId: z$1.ZodCoercedString<unknown>;
|
|
1332
1332
|
}, z$1.core.$strip>;
|
|
1333
|
-
use: ((inputContext:
|
|
1333
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
1334
1334
|
session: {
|
|
1335
1335
|
user: UserWithRole;
|
|
1336
1336
|
session: Session;
|
|
@@ -1399,7 +1399,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
1399
1399
|
} & {
|
|
1400
1400
|
asResponse?: boolean;
|
|
1401
1401
|
returnHeaders?: boolean;
|
|
1402
|
-
use?:
|
|
1402
|
+
use?: better_call248.Middleware[];
|
|
1403
1403
|
path?: string;
|
|
1404
1404
|
} & {
|
|
1405
1405
|
asResponse?: AsResponse | undefined;
|
|
@@ -1418,7 +1418,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
1418
1418
|
newPassword: z$1.ZodString;
|
|
1419
1419
|
userId: z$1.ZodCoercedString<unknown>;
|
|
1420
1420
|
}, z$1.core.$strip>;
|
|
1421
|
-
use: ((inputContext:
|
|
1421
|
+
use: ((inputContext: better_call248.MiddlewareInputContext<better_call248.MiddlewareOptions>) => Promise<{
|
|
1422
1422
|
session: {
|
|
1423
1423
|
user: UserWithRole;
|
|
1424
1424
|
session: Session;
|
|
@@ -1514,7 +1514,7 @@ declare const admin: <O extends AdminOptions>(options?: O | undefined) => {
|
|
|
1514
1514
|
} & {
|
|
1515
1515
|
asResponse?: boolean;
|
|
1516
1516
|
returnHeaders?: boolean;
|
|
1517
|
-
use?:
|
|
1517
|
+
use?: better_call248.Middleware[];
|
|
1518
1518
|
path?: string;
|
|
1519
1519
|
} & {
|
|
1520
1520
|
asResponse?: AsResponse | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as better_call113 from "better-call";
|
|
2
2
|
import * as z$1 from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/one-tap/index.d.ts
|
|
@@ -38,7 +38,7 @@ declare const oneTap: (options?: OneTapOptions | undefined) => {
|
|
|
38
38
|
} & {
|
|
39
39
|
asResponse?: boolean;
|
|
40
40
|
returnHeaders?: boolean;
|
|
41
|
-
use?:
|
|
41
|
+
use?: better_call113.Middleware[];
|
|
42
42
|
path?: string;
|
|
43
43
|
} & {
|
|
44
44
|
asResponse?: AsResponse | undefined;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h as UnionToIntersection, u as Prettify } from "./helper-
|
|
2
|
-
import { A as Where, An as generateId, B as InferPluginsFromClient, C as AdapterInstance, Cn as StandardSchemaV1, D as DBAdapterSchemaCreation, Dn as getTelemetryAuthConfig, E as DBAdapterInstance, En as getCurrentAdapter, F as ClientStore, G as PayvoAuthClientPlugin, H as InferUserFromClient, I as InferActions, K as SessionQueryParams, L as InferAdditionalFromClient, M as AtomListener, Mn as generateState, N as ClientAtomListener, Nn as parseState, O as DBTransactionAdapter, P as ClientOptions, Q as APIError, R as InferClientAPI, S as Adapter, T as DBAdapter, Tn as createTelemetry, U as IsSignal, V as InferSessionFromClient, W as PayvoAuthClientOptions, X as WithJsDoc, Y as Auth, Z as payvoAuth, _ as Verification, a as PayvoAuthRateLimitOptions, b as InferAPI, c as AdditionalSessionFieldsOutput, d as InferPluginTypes, f as InferSession, g as User, h as Session, i as PayvoAuthPlugin, j as init, jn as HIDE_METADATA, k as TransactionAdapter, kn as capitalizeFirstLetter, l as AdditionalUserFieldsInput, m as RateLimit, n as PayvoAuthCookies, o as Account, p as InferUser, q as Store, r as PayvoAuthOptions, s as AdditionalSessionFieldsInput, t as PayvoAuthAdvancedOptions, u as AdditionalUserFieldsOutput, v as FilterActions, w as AdapterSchemaCreation, wn as TelemetryEvent, x as InferSessionAPI, y as FilteredAPI, z as InferErrorCodes } from "./index-
|
|
3
|
-
import "./types-
|
|
4
|
-
import "./index-
|
|
5
|
-
import { n as InferPluginErrorCodes, t as InferOptionSchema } from "./plugins-
|
|
1
|
+
import { h as UnionToIntersection, u as Prettify } from "./helper-BgOIGHsu.mjs";
|
|
2
|
+
import { A as Where, An as generateId, B as InferPluginsFromClient, C as AdapterInstance, Cn as StandardSchemaV1, D as DBAdapterSchemaCreation, Dn as getTelemetryAuthConfig, E as DBAdapterInstance, En as getCurrentAdapter, F as ClientStore, G as PayvoAuthClientPlugin, H as InferUserFromClient, I as InferActions, K as SessionQueryParams, L as InferAdditionalFromClient, M as AtomListener, Mn as generateState, N as ClientAtomListener, Nn as parseState, O as DBTransactionAdapter, P as ClientOptions, Q as APIError, R as InferClientAPI, S as Adapter, T as DBAdapter, Tn as createTelemetry, U as IsSignal, V as InferSessionFromClient, W as PayvoAuthClientOptions, X as WithJsDoc, Y as Auth, Z as payvoAuth, _ as Verification, a as PayvoAuthRateLimitOptions, b as InferAPI, c as AdditionalSessionFieldsOutput, d as InferPluginTypes, f as InferSession, g as User, h as Session, i as PayvoAuthPlugin, j as init, jn as HIDE_METADATA, k as TransactionAdapter, kn as capitalizeFirstLetter, l as AdditionalUserFieldsInput, m as RateLimit, n as PayvoAuthCookies, o as Account, p as InferUser, q as Store, r as PayvoAuthOptions, s as AdditionalSessionFieldsInput, t as PayvoAuthAdvancedOptions, u as AdditionalUserFieldsOutput, v as FilterActions, w as AdapterSchemaCreation, wn as TelemetryEvent, x as InferSessionAPI, y as FilteredAPI, z as InferErrorCodes } from "./index-BNhJglHC.mjs";
|
|
3
|
+
import "./types-DNQ9XQrB.mjs";
|
|
4
|
+
import "./index-Df0KhQRf-BEa5tdwJ.mjs";
|
|
5
|
+
import { n as InferPluginErrorCodes, t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
6
6
|
export * from "@gatwech/core";
|
|
7
7
|
export * from "@gatwech/core/env";
|
|
8
8
|
export * from "@gatwech/core/error";
|
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { i as parseState, n as HIDE_METADATA, r as generateState, t as generateId } from "./utils-
|
|
1
|
+
import { i as parseState, n as HIDE_METADATA, r as generateState, t as generateId } from "./utils-B03WRaGi.mjs";
|
|
2
2
|
import "./url-VB2gAbTI.mjs";
|
|
3
|
-
import { t as APIError } from "./api-
|
|
3
|
+
import { t as APIError } from "./api-Dk8Yj_J5.mjs";
|
|
4
4
|
import "./get-request-ip-DSjrEpGo.mjs";
|
|
5
5
|
import "./json-D0TBLy4q.mjs";
|
|
6
|
-
import "./crypto-
|
|
6
|
+
import "./crypto-CCyta8xj.mjs";
|
|
7
7
|
import "./jwt-CmxZAGe2.mjs";
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import
|
|
15
|
-
import "./
|
|
16
|
-
import "./
|
|
17
|
-
import "./
|
|
18
|
-
import
|
|
19
|
-
import "./
|
|
8
|
+
import "./random-32E3cU5o.mjs";
|
|
9
|
+
import "./cookies-BuvlgcA-.mjs";
|
|
10
|
+
import "./date-CMr04reD.mjs";
|
|
11
|
+
import "./db-7vHnL1XA.mjs";
|
|
12
|
+
import "./dialect-HsWUfpYY.mjs";
|
|
13
|
+
import "./get-tables-CKvSyDST.mjs";
|
|
14
|
+
import "./types-DCPpFKUB.mjs";
|
|
15
|
+
import { t as capitalizeFirstLetter } from "./misc-fKH4d5XQ.mjs";
|
|
16
|
+
import "./session-BB3oqApE.mjs";
|
|
17
|
+
import "./adapter-factory-xbLUJt85.mjs";
|
|
18
|
+
import "./kysely-adapter-Bkm1liPW.mjs";
|
|
19
|
+
import { t as payvoAuth } from "./auth-vfCyIIeV.mjs";
|
|
20
|
+
import "./password-5CdcAVaH.mjs";
|
|
20
21
|
import { getCurrentAdapter } from "@gatwech/core/context";
|
|
21
22
|
import { createTelemetry, getTelemetryAuthConfig } from "@gatwech/telemetry";
|
|
22
23
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _gatwech_core29 from "@gatwech/core";
|
|
2
|
+
import * as better_call81 from "better-call";
|
|
3
3
|
|
|
4
4
|
//#region src/integrations/next-js.d.ts
|
|
5
5
|
declare function toNextJsHandler(auth: {
|
|
@@ -12,8 +12,8 @@ declare const nextCookies: () => {
|
|
|
12
12
|
id: "next-cookies";
|
|
13
13
|
hooks: {
|
|
14
14
|
after: {
|
|
15
|
-
matcher(ctx:
|
|
16
|
-
handler: (inputContext:
|
|
15
|
+
matcher(ctx: _gatwech_core29.HookEndpointContext): true;
|
|
16
|
+
handler: (inputContext: better_call81.MiddlewareInputContext<better_call81.MiddlewareOptions>) => Promise<void>;
|
|
17
17
|
}[];
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../url-VB2gAbTI.mjs";
|
|
2
2
|
import "../json-D0TBLy4q.mjs";
|
|
3
3
|
import "../jwt-CmxZAGe2.mjs";
|
|
4
|
-
import { l as parseSetCookieHeader } from "../cookies-
|
|
5
|
-
import "../date-
|
|
4
|
+
import { l as parseSetCookieHeader } from "../cookies-BuvlgcA-.mjs";
|
|
5
|
+
import "../date-CMr04reD.mjs";
|
|
6
6
|
import { createAuthMiddleware } from "@gatwech/core/api";
|
|
7
7
|
|
|
8
8
|
//#region src/integrations/next-js.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../helper-
|
|
2
|
-
import { Y as Auth } from "../index-
|
|
3
|
-
import "../types-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../plugins-
|
|
1
|
+
import "../helper-BgOIGHsu.mjs";
|
|
2
|
+
import { Y as Auth } from "../index-BNhJglHC.mjs";
|
|
3
|
+
import "../types-DNQ9XQrB.mjs";
|
|
4
|
+
import "../index-Df0KhQRf-BEa5tdwJ.mjs";
|
|
5
|
+
import "../plugins-Dy_FrD4Y.mjs";
|
|
6
6
|
import * as http0 from "http";
|
|
7
7
|
import { IncomingHttpHeaders } from "http";
|
|
8
8
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _gatwech_core52 from "@gatwech/core";
|
|
2
|
+
import * as better_call135 from "better-call";
|
|
3
3
|
|
|
4
4
|
//#region src/integrations/react-start.d.ts
|
|
5
5
|
declare const reactStartCookies: () => {
|
|
6
6
|
id: "react-start-cookies";
|
|
7
7
|
hooks: {
|
|
8
8
|
after: {
|
|
9
|
-
matcher(ctx:
|
|
10
|
-
handler: (inputContext:
|
|
9
|
+
matcher(ctx: _gatwech_core52.HookEndpointContext): true;
|
|
10
|
+
handler: (inputContext: better_call135.MiddlewareInputContext<better_call135.MiddlewareOptions>) => Promise<void>;
|
|
11
11
|
}[];
|
|
12
12
|
};
|
|
13
13
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../url-VB2gAbTI.mjs";
|
|
2
2
|
import "../json-D0TBLy4q.mjs";
|
|
3
3
|
import "../jwt-CmxZAGe2.mjs";
|
|
4
|
-
import { l as parseSetCookieHeader } from "../cookies-
|
|
5
|
-
import "../date-
|
|
4
|
+
import { l as parseSetCookieHeader } from "../cookies-BuvlgcA-.mjs";
|
|
5
|
+
import "../date-CMr04reD.mjs";
|
|
6
6
|
import { createAuthMiddleware } from "@gatwech/core/api";
|
|
7
7
|
|
|
8
8
|
//#region src/integrations/react-start.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as APIError } from "./api-
|
|
2
|
-
import { n as symmetricEncrypt, t as symmetricDecrypt } from "./crypto-
|
|
3
|
-
import { n as mergeSchema } from "./date-
|
|
4
|
-
import { u as sessionMiddleware } from "./session-
|
|
1
|
+
import { t as APIError } from "./api-Dk8Yj_J5.mjs";
|
|
2
|
+
import { n as symmetricEncrypt, t as symmetricDecrypt } from "./crypto-CCyta8xj.mjs";
|
|
3
|
+
import { n as mergeSchema } from "./date-CMr04reD.mjs";
|
|
4
|
+
import { u as sessionMiddleware } from "./session-BB3oqApE.mjs";
|
|
5
5
|
import { PayvoAuthError } from "@gatwech/core/error";
|
|
6
6
|
import { createAuthEndpoint, createAuthMiddleware } from "@gatwech/core/api";
|
|
7
7
|
import * as z$1 from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { R as originCheck } from "./api-
|
|
2
|
-
import {
|
|
3
|
-
import { c as setSessionCookie } from "./cookies-
|
|
1
|
+
import { R as originCheck } from "./api-Dk8Yj_J5.mjs";
|
|
2
|
+
import { t as generateRandomString } from "./random-32E3cU5o.mjs";
|
|
3
|
+
import { c as setSessionCookie } from "./cookies-BuvlgcA-.mjs";
|
|
4
4
|
import { BASE_ERROR_CODES } from "@gatwech/core/error";
|
|
5
5
|
import { APIError } from "better-call";
|
|
6
6
|
import { createAuthEndpoint } from "@gatwech/core/api";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as APIError } from "./api-
|
|
2
|
-
import { c as setSessionCookie, l as parseSetCookieHeader, n as deleteSessionCookie, o as parseCookies } from "./cookies-
|
|
3
|
-
import { u as sessionMiddleware } from "./session-
|
|
1
|
+
import { t as APIError } from "./api-Dk8Yj_J5.mjs";
|
|
2
|
+
import { c as setSessionCookie, l as parseSetCookieHeader, n as deleteSessionCookie, o as parseCookies } from "./cookies-BuvlgcA-.mjs";
|
|
3
|
+
import { u as sessionMiddleware } from "./session-BB3oqApE.mjs";
|
|
4
4
|
import { defineErrorCodes } from "@gatwech/core/utils";
|
|
5
5
|
import { createAuthEndpoint, createAuthMiddleware } from "@gatwech/core/api";
|
|
6
6
|
import * as z$1 from "zod";
|
|
@@ -23,7 +23,7 @@ const multiSession = (options) => {
|
|
|
23
23
|
const cookieHeader = ctx.headers?.get("cookie");
|
|
24
24
|
if (!cookieHeader) return ctx.json([]);
|
|
25
25
|
const cookies = Object.fromEntries(parseCookies(cookieHeader));
|
|
26
|
-
const sessionTokens = (await Promise.all(Object.entries(cookies).filter(([key]) => isMultiSessionCookie(key)).map(async ([key]) => await ctx.getSignedCookie(key, ctx.context.secret)))).filter((v) => v
|
|
26
|
+
const sessionTokens = (await Promise.all(Object.entries(cookies).filter(([key]) => isMultiSessionCookie(key)).map(async ([key]) => await ctx.getSignedCookie(key, ctx.context.secret)))).filter((v) => typeof v === "string");
|
|
27
27
|
if (!sessionTokens.length) return ctx.json([]);
|
|
28
28
|
const uniqueUserSessions = (await ctx.context.internalAdapter.findSessions(sessionTokens)).filter((session) => session && session.session.expiresAt > /* @__PURE__ */ new Date()).reduce((acc, session) => {
|
|
29
29
|
if (!acc.find((s) => s.user.id === session.user.id)) acc.push(session);
|
|
@@ -89,7 +89,7 @@ const multiSession = (options) => {
|
|
|
89
89
|
const cookieHeader = ctx.headers?.get("cookie");
|
|
90
90
|
if (cookieHeader) {
|
|
91
91
|
const cookies = Object.fromEntries(parseCookies(cookieHeader));
|
|
92
|
-
const sessionTokens = (await Promise.all(Object.entries(cookies).filter(([key]) => isMultiSessionCookie(key)).map(async ([key]) => await ctx.getSignedCookie(key, ctx.context.secret)))).filter((v) => v
|
|
92
|
+
const sessionTokens = (await Promise.all(Object.entries(cookies).filter(([key]) => isMultiSessionCookie(key)).map(async ([key]) => await ctx.getSignedCookie(key, ctx.context.secret)))).filter((v) => typeof v === "string");
|
|
93
93
|
const internalAdapter = ctx.context.internalAdapter;
|
|
94
94
|
if (sessionTokens.length > 0) {
|
|
95
95
|
const validSessions = (await internalAdapter.findSessions(sessionTokens)).filter((session) => session && session.session.expiresAt > /* @__PURE__ */ new Date());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as getOrigin } from "./url-VB2gAbTI.mjs";
|
|
2
|
-
import { R as originCheck } from "./api-
|
|
3
|
-
import { n as symmetricEncrypt, t as symmetricDecrypt } from "./crypto-
|
|
2
|
+
import { R as originCheck } from "./api-Dk8Yj_J5.mjs";
|
|
3
|
+
import { n as symmetricEncrypt, t as symmetricDecrypt } from "./crypto-CCyta8xj.mjs";
|
|
4
4
|
import { env } from "@gatwech/core/env";
|
|
5
5
|
import { createAuthEndpoint, createAuthMiddleware } from "@gatwech/core/api";
|
|
6
6
|
import * as z$1 from "zod";
|
package/dist/oauth2/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../helper-
|
|
2
|
-
import { Mn as generateState, Nn as parseState, g as User, o as Account } from "../index-
|
|
3
|
-
import "../types-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../plugins-
|
|
1
|
+
import "../helper-BgOIGHsu.mjs";
|
|
2
|
+
import { Mn as generateState, Nn as parseState, g as User, o as Account } from "../index-BNhJglHC.mjs";
|
|
3
|
+
import "../types-DNQ9XQrB.mjs";
|
|
4
|
+
import "../index-Df0KhQRf-BEa5tdwJ.mjs";
|
|
5
|
+
import "../plugins-Dy_FrD4Y.mjs";
|
|
6
6
|
import { AuthContext, GenericEndpointContext } from "@gatwech/core";
|
|
7
7
|
export * from "@gatwech/core/oauth2";
|
|
8
8
|
|
package/dist/oauth2/index.mjs
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { i as parseState, r as generateState } from "../utils-
|
|
1
|
+
import { i as parseState, r as generateState } from "../utils-B03WRaGi.mjs";
|
|
2
2
|
import "../url-VB2gAbTI.mjs";
|
|
3
|
-
import { F as decryptOAuthToken, I as setTokenUtil, O as handleOAuthUserInfo } from "../api-
|
|
3
|
+
import { F as decryptOAuthToken, I as setTokenUtil, O as handleOAuthUserInfo } from "../api-Dk8Yj_J5.mjs";
|
|
4
4
|
import "../get-request-ip-DSjrEpGo.mjs";
|
|
5
5
|
import "../json-D0TBLy4q.mjs";
|
|
6
|
-
import "../crypto-
|
|
6
|
+
import "../crypto-CCyta8xj.mjs";
|
|
7
7
|
import "../jwt-CmxZAGe2.mjs";
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
8
|
+
import "../random-32E3cU5o.mjs";
|
|
9
|
+
import "../cookies-BuvlgcA-.mjs";
|
|
10
|
+
import "../date-CMr04reD.mjs";
|
|
11
|
+
import "../db-7vHnL1XA.mjs";
|
|
12
|
+
import "../dialect-HsWUfpYY.mjs";
|
|
13
|
+
import "../get-tables-CKvSyDST.mjs";
|
|
14
|
+
import "../types-DCPpFKUB.mjs";
|
|
15
|
+
import "../misc-fKH4d5XQ.mjs";
|
|
16
|
+
import "../session-BB3oqApE.mjs";
|
|
16
17
|
|
|
17
18
|
export * from "@gatwech/core/oauth2"
|
|
18
19
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as APIError } from "./api-
|
|
2
|
-
import { c as setSessionCookie } from "./cookies-
|
|
1
|
+
import { t as APIError } from "./api-Dk8Yj_J5.mjs";
|
|
2
|
+
import { c as setSessionCookie } from "./cookies-BuvlgcA-.mjs";
|
|
3
3
|
import { createAuthEndpoint } from "@gatwech/core/api";
|
|
4
4
|
import * as z$1 from "zod";
|
|
5
5
|
import { createRemoteJWKSet, jwtVerify } from "jose";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as generateId } from "./utils-
|
|
2
|
-
import { t as APIError$1 } from "./api-
|
|
3
|
-
import { c as setSessionCookie } from "./cookies-
|
|
4
|
-
import { t as getDate } from "./date-
|
|
5
|
-
import { i as toZodSchema } from "./db-
|
|
6
|
-
import { a as requestOnlySessionMiddleware, r as getSessionFromCtx, u as sessionMiddleware } from "./session-
|
|
7
|
-
import { n as parser_default } from "./parser-
|
|
8
|
-
import { r as defaultRoles } from "./access-
|
|
9
|
-
import { n as hasPermissionFn, t as cacheAllRoles } from "./permission-
|
|
1
|
+
import { t as generateId } from "./utils-B03WRaGi.mjs";
|
|
2
|
+
import { t as APIError$1 } from "./api-Dk8Yj_J5.mjs";
|
|
3
|
+
import { c as setSessionCookie } from "./cookies-BuvlgcA-.mjs";
|
|
4
|
+
import { t as getDate } from "./date-CMr04reD.mjs";
|
|
5
|
+
import { i as toZodSchema } from "./db-7vHnL1XA.mjs";
|
|
6
|
+
import { a as requestOnlySessionMiddleware, r as getSessionFromCtx, u as sessionMiddleware } from "./session-BB3oqApE.mjs";
|
|
7
|
+
import { n as parser_default } from "./parser-D7EkhAjZ.mjs";
|
|
8
|
+
import { r as defaultRoles } from "./access-CrwEFPHE.mjs";
|
|
9
|
+
import { n as hasPermissionFn, t as cacheAllRoles } from "./permission-CDDWgA_O.mjs";
|
|
10
10
|
import { getCurrentAdapter } from "@gatwech/core/context";
|
|
11
11
|
import { BASE_ERROR_CODES, PayvoAuthError } from "@gatwech/core/error";
|
|
12
12
|
import { defineErrorCodes } from "@gatwech/core/utils";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as generateId } from "./utils-
|
|
2
|
-
import {
|
|
3
|
-
import { c as setSessionCookie } from "./cookies-
|
|
4
|
-
import { n as mergeSchema } from "./date-
|
|
5
|
-
import { r as getSessionFromCtx, t as freshSessionMiddleware, u as sessionMiddleware } from "./session-
|
|
1
|
+
import { t as generateId } from "./utils-B03WRaGi.mjs";
|
|
2
|
+
import { t as generateRandomString } from "./random-32E3cU5o.mjs";
|
|
3
|
+
import { c as setSessionCookie } from "./cookies-BuvlgcA-.mjs";
|
|
4
|
+
import { n as mergeSchema } from "./date-CMr04reD.mjs";
|
|
5
|
+
import { r as getSessionFromCtx, t as freshSessionMiddleware, u as sessionMiddleware } from "./session-BB3oqApE.mjs";
|
|
6
6
|
import { defineErrorCodes } from "@gatwech/core/utils";
|
|
7
7
|
import { APIError } from "better-call";
|
|
8
8
|
import { createAuthEndpoint } from "@gatwech/core/api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as setSessionCookie } from "./cookies-
|
|
3
|
-
import { n as mergeSchema, t as getDate } from "./date-
|
|
4
|
-
import { r as getSessionFromCtx } from "./session-
|
|
1
|
+
import { t as generateRandomString } from "./random-32E3cU5o.mjs";
|
|
2
|
+
import { c as setSessionCookie } from "./cookies-BuvlgcA-.mjs";
|
|
3
|
+
import { n as mergeSchema, t as getDate } from "./date-CMr04reD.mjs";
|
|
4
|
+
import { r as getSessionFromCtx } from "./session-BB3oqApE.mjs";
|
|
5
5
|
import { BASE_ERROR_CODES } from "@gatwech/core/error";
|
|
6
6
|
import { defineErrorCodes } from "@gatwech/core/utils";
|
|
7
7
|
import { APIError } from "better-call";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../../helper-
|
|
2
|
-
import { a as Role, c as Subset, i as AccessControl, n as createAccessControl, o as Statements, r as role, s as SubArray, t as AuthorizeResponse } from "../../index-
|
|
1
|
+
import "../../helper-BgOIGHsu.mjs";
|
|
2
|
+
import { a as Role, c as Subset, i as AccessControl, n as createAccessControl, o as Statements, r as role, s as SubArray, t as AuthorizeResponse } from "../../index-CxlWnL9c.mjs";
|
|
3
3
|
export { AccessControl, AuthorizeResponse, Role, Statements, SubArray, Subset, createAccessControl, role };
|