@gatwech/auth 1.0.0-beta.18 → 1.0.0-beta.19
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 +21 -21
- package/dist/client/index.mjs +4 -4
- package/dist/client/plugins/index.d.mts +53 -45
- package/dist/client/plugins/index.mjs +16 -12
- package/dist/client/react/index.d.mts +19 -19
- package/dist/client/react/index.mjs +2 -2
- package/dist/client-4QEb0rUr.mjs +95 -0
- package/dist/client-CSOs1YN7.d.mts +14 -0
- package/dist/client-DZHNfxuR.d.mts +75 -0
- package/dist/client-DzOqXJUm.mjs +15 -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/{client-CNY0tn9g.d.mts → index-BAVzFqII.d.mts} +21 -21
- package/dist/{index-DaBcikv9.d.mts → index-BNDRYfTF.d.mts} +2 -2
- package/dist/{index-Cxi7TbLE.d.mts → index-BNhJglHC.d.mts} +122 -122
- package/dist/{index-BYMI9r_d.d.mts → index-Blmhq6eA.d.mts} +4 -4
- package/dist/{index-BHoQlf7a.d.mts → index-CKnPAS5n.d.mts} +178 -178
- package/dist/{index-34ONrP8l.d.mts → index-COGe8UJx.d.mts} +11 -11
- package/dist/{index-Buhn3hkR.d.mts → index-CP3FNbOZ.d.mts} +8 -8
- package/dist/{index-D_k662QG.d.mts → index-CUknVRZp.d.mts} +14 -14
- package/dist/{index-DKNNV1kb.d.mts → index-CaqpCfE5.d.mts} +8 -8
- package/dist/{index-BBm8nQ9Q.d.mts → index-CgeC2eGC.d.mts} +2 -2
- package/dist/{index-DR0xXno9.d.mts → index-CsxtcAO0.d.mts} +1 -1
- package/dist/{index-CuFzhoS6.d.mts → index-Cv9iMevV.d.mts} +10 -10
- package/dist/{index-C7fQuk-V.d.mts → index-CxlWnL9c.d.mts} +1 -1
- package/dist/{index-zjjNBRY2.d.mts → index-DG-X1PK5.d.mts} +6 -6
- package/dist/index-DRM35ir1.d.mts +3769 -0
- package/dist/{index-BqhKCbPH.d.mts → index-DS-R7st3.d.mts} +6 -6
- package/dist/{index-C-u1h_WX.d.mts → index-DXVU0HGr.d.mts} +5 -5
- package/dist/{index-DoXZYQpq.d.mts → index-Db8jqUq2.d.mts} +10 -10
- package/dist/{index-65G5U5DB-DSdjzreF.d.mts → index-Df0KhQRf-BEa5tdwJ.d.mts} +3 -2
- package/dist/{index-B-XKqFvY.d.mts → index-Df4SvZaE.d.mts} +11 -4
- package/dist/{index-G6V0Z_Mn.d.mts → index-DyH_CgmX.d.mts} +10 -10
- package/dist/{admin-DtfO1PLg.d.mts → index-EABwA_BH.d.mts} +36 -36
- package/dist/{index-z0KSvE5i.d.mts → index-QmocqGM-.d.mts} +1 -1
- package/dist/{index-DlaMq1nb.d.mts → index-mxEUX2Gs.d.mts} +14 -14
- package/dist/{client-BOX93C3d.d.mts → index-xoYsoOiR.d.mts} +52 -52
- package/dist/{index-B3n8e37d.d.mts → index-zBdYQGaS.d.mts} +7 -7
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +16 -15
- 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-C-D1IHJo.mjs +1395 -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 +22 -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 +1048 -1048
- 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,11 +1,11 @@
|
|
|
1
|
-
import { o as LiteralString } from "./helper-
|
|
2
|
-
import { g as User } from "./index-
|
|
3
|
-
import { t as InferOptionSchema } from "./plugins-
|
|
4
|
-
import * as
|
|
1
|
+
import { o as LiteralString } from "./helper-BgOIGHsu.mjs";
|
|
2
|
+
import { g as User } from "./index-BNhJglHC.mjs";
|
|
3
|
+
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
4
|
+
import * as _gatwech_core50 from "@gatwech/core";
|
|
5
5
|
import { PayvoAuthPlugin } from "@gatwech/core";
|
|
6
|
-
import * as
|
|
6
|
+
import * as better_call209 from "better-call";
|
|
7
7
|
import * as z$1 from "zod";
|
|
8
|
-
import * as
|
|
8
|
+
import * as _better_fetch_fetch35 from "@better-fetch/fetch";
|
|
9
9
|
|
|
10
10
|
//#region src/plugins/two-factor/backup-codes/index.d.ts
|
|
11
11
|
interface BackupCodeOptions {
|
|
@@ -207,6 +207,35 @@ declare const TWO_FACTOR_ERROR_CODES: {
|
|
|
207
207
|
readonly INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie";
|
|
208
208
|
};
|
|
209
209
|
//#endregion
|
|
210
|
+
//#region src/plugins/two-factor/client.d.ts
|
|
211
|
+
declare const twoFactorClient: (options?: {
|
|
212
|
+
/**
|
|
213
|
+
* a redirect function to call if a user needs to verify
|
|
214
|
+
* their two factor
|
|
215
|
+
*/
|
|
216
|
+
onTwoFactorRedirect?: () => void | Promise<void>;
|
|
217
|
+
} | undefined) => {
|
|
218
|
+
id: "two-factor";
|
|
219
|
+
$InferServerPlugin: ReturnType<typeof twoFactor>;
|
|
220
|
+
atomListeners: {
|
|
221
|
+
matcher: (path: string) => boolean;
|
|
222
|
+
signal: "$sessionSignal";
|
|
223
|
+
}[];
|
|
224
|
+
pathMethods: {
|
|
225
|
+
"/two-factor/disable": "POST";
|
|
226
|
+
"/two-factor/enable": "POST";
|
|
227
|
+
"/two-factor/send-otp": "POST";
|
|
228
|
+
"/two-factor/generate-backup-codes": "POST";
|
|
229
|
+
};
|
|
230
|
+
fetchPlugins: {
|
|
231
|
+
id: string;
|
|
232
|
+
name: string;
|
|
233
|
+
hooks: {
|
|
234
|
+
onSuccess(context: _better_fetch_fetch35.SuccessContext<any>): Promise<void>;
|
|
235
|
+
};
|
|
236
|
+
}[];
|
|
237
|
+
};
|
|
238
|
+
//#endregion
|
|
210
239
|
//#region src/plugins/two-factor/index.d.ts
|
|
211
240
|
declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
212
241
|
id: "two-factor";
|
|
@@ -245,7 +274,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
245
274
|
} & {
|
|
246
275
|
asResponse?: boolean;
|
|
247
276
|
returnHeaders?: boolean;
|
|
248
|
-
use?:
|
|
277
|
+
use?: better_call209.Middleware[];
|
|
249
278
|
path?: string;
|
|
250
279
|
} & {
|
|
251
280
|
asResponse?: AsResponse | undefined;
|
|
@@ -266,7 +295,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
266
295
|
password: z$1.ZodString;
|
|
267
296
|
issuer: z$1.ZodOptional<z$1.ZodString>;
|
|
268
297
|
}, z$1.core.$strip>;
|
|
269
|
-
use: ((inputContext:
|
|
298
|
+
use: ((inputContext: better_call209.MiddlewareInputContext<better_call209.MiddlewareOptions>) => Promise<{
|
|
270
299
|
session: {
|
|
271
300
|
session: Record<string, any> & {
|
|
272
301
|
id: string;
|
|
@@ -358,7 +387,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
358
387
|
} & {
|
|
359
388
|
asResponse?: boolean;
|
|
360
389
|
returnHeaders?: boolean;
|
|
361
|
-
use?:
|
|
390
|
+
use?: better_call209.Middleware[];
|
|
362
391
|
path?: string;
|
|
363
392
|
} & {
|
|
364
393
|
asResponse?: AsResponse | undefined;
|
|
@@ -376,7 +405,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
376
405
|
body: z$1.ZodObject<{
|
|
377
406
|
password: z$1.ZodString;
|
|
378
407
|
}, z$1.core.$strip>;
|
|
379
|
-
use: ((inputContext:
|
|
408
|
+
use: ((inputContext: better_call209.MiddlewareInputContext<better_call209.MiddlewareOptions>) => Promise<{
|
|
380
409
|
session: {
|
|
381
410
|
session: Record<string, any> & {
|
|
382
411
|
id: string;
|
|
@@ -447,7 +476,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
447
476
|
} & {
|
|
448
477
|
asResponse?: boolean;
|
|
449
478
|
returnHeaders?: boolean;
|
|
450
|
-
use?:
|
|
479
|
+
use?: better_call209.Middleware[];
|
|
451
480
|
path?: string;
|
|
452
481
|
} & {
|
|
453
482
|
asResponse?: AsResponse | undefined;
|
|
@@ -600,7 +629,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
600
629
|
} & {
|
|
601
630
|
asResponse?: boolean;
|
|
602
631
|
returnHeaders?: boolean;
|
|
603
|
-
use?:
|
|
632
|
+
use?: better_call209.Middleware[];
|
|
604
633
|
path?: string;
|
|
605
634
|
} & {
|
|
606
635
|
asResponse?: AsResponse | undefined;
|
|
@@ -620,7 +649,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
620
649
|
body: z$1.ZodObject<{
|
|
621
650
|
password: z$1.ZodString;
|
|
622
651
|
}, z$1.core.$strip>;
|
|
623
|
-
use: ((inputContext:
|
|
652
|
+
use: ((inputContext: better_call209.MiddlewareInputContext<better_call209.MiddlewareOptions>) => Promise<{
|
|
624
653
|
session: {
|
|
625
654
|
session: Record<string, any> & {
|
|
626
655
|
id: string;
|
|
@@ -698,7 +727,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
698
727
|
} & {
|
|
699
728
|
asResponse?: boolean;
|
|
700
729
|
returnHeaders?: boolean;
|
|
701
|
-
use?:
|
|
730
|
+
use?: better_call209.Middleware[];
|
|
702
731
|
path?: string;
|
|
703
732
|
} & {
|
|
704
733
|
asResponse?: AsResponse | undefined;
|
|
@@ -744,7 +773,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
744
773
|
} & {
|
|
745
774
|
asResponse?: boolean;
|
|
746
775
|
returnHeaders?: boolean;
|
|
747
|
-
use?:
|
|
776
|
+
use?: better_call209.Middleware[];
|
|
748
777
|
path?: string;
|
|
749
778
|
} & {
|
|
750
779
|
asResponse?: AsResponse | undefined;
|
|
@@ -809,7 +838,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
809
838
|
} & {
|
|
810
839
|
asResponse?: boolean;
|
|
811
840
|
returnHeaders?: boolean;
|
|
812
|
-
use?:
|
|
841
|
+
use?: better_call209.Middleware[];
|
|
813
842
|
path?: string;
|
|
814
843
|
} & {
|
|
815
844
|
asResponse?: AsResponse | undefined;
|
|
@@ -937,7 +966,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
937
966
|
} & {
|
|
938
967
|
asResponse?: boolean;
|
|
939
968
|
returnHeaders?: boolean;
|
|
940
|
-
use?:
|
|
969
|
+
use?: better_call209.Middleware[];
|
|
941
970
|
path?: string;
|
|
942
971
|
} & {
|
|
943
972
|
asResponse?: AsResponse | undefined;
|
|
@@ -1002,7 +1031,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
1002
1031
|
} & {
|
|
1003
1032
|
asResponse?: boolean;
|
|
1004
1033
|
returnHeaders?: boolean;
|
|
1005
|
-
use?:
|
|
1034
|
+
use?: better_call209.Middleware[];
|
|
1006
1035
|
path?: string;
|
|
1007
1036
|
} & {
|
|
1008
1037
|
asResponse?: AsResponse | undefined;
|
|
@@ -1017,7 +1046,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
1017
1046
|
}>;
|
|
1018
1047
|
options: {
|
|
1019
1048
|
method: "POST";
|
|
1020
|
-
use: ((inputContext:
|
|
1049
|
+
use: ((inputContext: better_call209.MiddlewareInputContext<better_call209.MiddlewareOptions>) => Promise<{
|
|
1021
1050
|
session: {
|
|
1022
1051
|
session: Record<string, any> & {
|
|
1023
1052
|
id: string;
|
|
@@ -1090,7 +1119,7 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
1090
1119
|
} & {
|
|
1091
1120
|
asResponse?: boolean;
|
|
1092
1121
|
returnHeaders?: boolean;
|
|
1093
|
-
use?:
|
|
1122
|
+
use?: better_call209.Middleware[];
|
|
1094
1123
|
path?: string;
|
|
1095
1124
|
} & {
|
|
1096
1125
|
asResponse?: AsResponse | undefined;
|
|
@@ -1159,8 +1188,8 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
1159
1188
|
options: TwoFactorOptions | undefined;
|
|
1160
1189
|
hooks: {
|
|
1161
1190
|
after: {
|
|
1162
|
-
matcher(context:
|
|
1163
|
-
handler: (inputContext:
|
|
1191
|
+
matcher(context: _gatwech_core50.HookEndpointContext): boolean;
|
|
1192
|
+
handler: (inputContext: better_call209.MiddlewareInputContext<better_call209.MiddlewareOptions>) => Promise<{
|
|
1164
1193
|
twoFactorRedirect: boolean;
|
|
1165
1194
|
} | undefined>;
|
|
1166
1195
|
}[];
|
|
@@ -1218,33 +1247,4 @@ declare const twoFactor: (options?: TwoFactorOptions | undefined) => {
|
|
|
1218
1247
|
};
|
|
1219
1248
|
};
|
|
1220
1249
|
//#endregion
|
|
1221
|
-
|
|
1222
|
-
declare const twoFactorClient: (options?: {
|
|
1223
|
-
/**
|
|
1224
|
-
* a redirect function to call if a user needs to verify
|
|
1225
|
-
* their two factor
|
|
1226
|
-
*/
|
|
1227
|
-
onTwoFactorRedirect?: () => void | Promise<void>;
|
|
1228
|
-
} | undefined) => {
|
|
1229
|
-
id: "two-factor";
|
|
1230
|
-
$InferServerPlugin: ReturnType<typeof twoFactor>;
|
|
1231
|
-
atomListeners: {
|
|
1232
|
-
matcher: (path: string) => boolean;
|
|
1233
|
-
signal: "$sessionSignal";
|
|
1234
|
-
}[];
|
|
1235
|
-
pathMethods: {
|
|
1236
|
-
"/two-factor/disable": "POST";
|
|
1237
|
-
"/two-factor/enable": "POST";
|
|
1238
|
-
"/two-factor/send-otp": "POST";
|
|
1239
|
-
"/two-factor/generate-backup-codes": "POST";
|
|
1240
|
-
};
|
|
1241
|
-
fetchPlugins: {
|
|
1242
|
-
id: string;
|
|
1243
|
-
name: string;
|
|
1244
|
-
hooks: {
|
|
1245
|
-
onSuccess(context: _better_fetch_fetch16.SuccessContext<any>): Promise<void>;
|
|
1246
|
-
};
|
|
1247
|
-
}[];
|
|
1248
|
-
};
|
|
1249
|
-
//#endregion
|
|
1250
|
-
export { TwoFactorProvider as a, TwoFactorOptions as i, twoFactor as n, TwoFactorTable as o, TWO_FACTOR_ERROR_CODES as r, UserWithTwoFactor as s, twoFactorClient as t };
|
|
1250
|
+
export { TwoFactorProvider as a, TwoFactorOptions as i, twoFactorClient as n, TwoFactorTable as o, TWO_FACTOR_ERROR_CODES as r, UserWithTwoFactor as s, twoFactor as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { g as User, h as Session } from "./index-
|
|
2
|
-
import { t as InferOptionSchema } from "./plugins-
|
|
3
|
-
import * as
|
|
1
|
+
import { g as User, h as Session } from "./index-BNhJglHC.mjs";
|
|
2
|
+
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
3
|
+
import * as _gatwech_core39 from "@gatwech/core";
|
|
4
4
|
import { AuthContext, GenericEndpointContext } from "@gatwech/core";
|
|
5
|
-
import * as
|
|
5
|
+
import * as better_call189 from "better-call";
|
|
6
6
|
import { EndpointContext } from "better-call";
|
|
7
7
|
|
|
8
8
|
//#region src/plugins/anonymous/index.d.ts
|
|
@@ -77,7 +77,7 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
77
77
|
} & {
|
|
78
78
|
asResponse?: boolean;
|
|
79
79
|
returnHeaders?: boolean;
|
|
80
|
-
use?:
|
|
80
|
+
use?: better_call189.Middleware[];
|
|
81
81
|
path?: string;
|
|
82
82
|
} & {
|
|
83
83
|
asResponse?: AsResponse | undefined;
|
|
@@ -141,8 +141,8 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
141
141
|
};
|
|
142
142
|
hooks: {
|
|
143
143
|
after: {
|
|
144
|
-
matcher(ctx:
|
|
145
|
-
handler: (inputContext:
|
|
144
|
+
matcher(ctx: _gatwech_core39.HookEndpointContext): boolean;
|
|
145
|
+
handler: (inputContext: better_call189.MiddlewareInputContext<better_call189.MiddlewareOptions>) => Promise<void>;
|
|
146
146
|
}[];
|
|
147
147
|
};
|
|
148
148
|
schema: {
|
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,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_core13 from "@gatwech/core";
|
|
2
|
+
import * as better_call155 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_core13.HookEndpointContext): true;
|
|
10
|
+
handler: (inputContext: better_call155.MiddlewareInputContext<better_call155.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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../../helper-
|
|
2
|
-
import { c as Subset, t as AuthorizeResponse } from "../../../index-
|
|
1
|
+
import "../../../helper-BgOIGHsu.mjs";
|
|
2
|
+
import { c as Subset, t as AuthorizeResponse } from "../../../index-CxlWnL9c.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/admin/access/statement.d.ts
|
|
5
5
|
declare const defaultStatements: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../../access-
|
|
2
|
-
import { a as userAc, i as defaultStatements, n as defaultAc, r as defaultRoles, t as adminAc } from "../../../access-
|
|
1
|
+
import "../../../access-BM6jSA5j.mjs";
|
|
2
|
+
import { a as userAc, i as defaultStatements, n as defaultAc, r as defaultRoles, t as adminAc } from "../../../access-bhklJd7m.mjs";
|
|
3
3
|
|
|
4
4
|
export { adminAc, defaultAc, defaultRoles, defaultStatements, userAc };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import "../../helper-
|
|
2
|
-
import "../../index-
|
|
3
|
-
import "../../types-
|
|
4
|
-
import "../../index-
|
|
5
|
-
import "../../plugins-
|
|
6
|
-
import "../../index-
|
|
7
|
-
import { a as UserWithRole, i as SessionWithImpersonatedBy, n as AdminOptions, r as InferAdminRolesFromOption, t as admin } from "../../
|
|
8
|
-
import "../../index-DB7t8whN.mjs";
|
|
1
|
+
import "../../helper-BgOIGHsu.mjs";
|
|
2
|
+
import "../../index-BNhJglHC.mjs";
|
|
3
|
+
import "../../types-DNQ9XQrB.mjs";
|
|
4
|
+
import "../../index-Df0KhQRf-BEa5tdwJ.mjs";
|
|
5
|
+
import "../../plugins-Dy_FrD4Y.mjs";
|
|
6
|
+
import "../../index-CxlWnL9c.mjs";
|
|
7
|
+
import { a as UserWithRole, i as SessionWithImpersonatedBy, n as AdminOptions, r as InferAdminRolesFromOption, t as admin } from "../../index-EABwA_BH.mjs";
|
|
9
8
|
export { AdminOptions, InferAdminRolesFromOption, SessionWithImpersonatedBy, UserWithRole, admin };
|