@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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { c as sentinel } from "./index-DRM35ir1.mjs";
|
|
2
|
+
import * as _better_fetch_fetch0 from "@better-fetch/fetch";
|
|
3
|
+
|
|
4
|
+
//#region src/plugins/sentinel/client.d.ts
|
|
5
|
+
declare const sentinelClient: (options?: {
|
|
6
|
+
/**
|
|
7
|
+
* Base URL of the hosted identify service. Without it, the fingerprint is
|
|
8
|
+
* sent as the visitor id.
|
|
9
|
+
*/
|
|
10
|
+
identifyUrl?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Identify request options
|
|
13
|
+
*/
|
|
14
|
+
identifyOptions?: {
|
|
15
|
+
/**
|
|
16
|
+
* Request timeout in milliseconds
|
|
17
|
+
*
|
|
18
|
+
* @default 1000
|
|
19
|
+
*/
|
|
20
|
+
timeout?: number | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Retries after a failed request, with exponential backoff
|
|
23
|
+
*
|
|
24
|
+
* @default { attempts: 2, baseDelay: 400, maxDelay: 600 }
|
|
25
|
+
*/
|
|
26
|
+
retry?: {
|
|
27
|
+
attempts?: number | undefined;
|
|
28
|
+
baseDelay?: number | undefined;
|
|
29
|
+
maxDelay?: number | undefined;
|
|
30
|
+
} | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Additional headers, e.g. the publishable key
|
|
33
|
+
*/
|
|
34
|
+
headers?: Record<string, string> | undefined;
|
|
35
|
+
} | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Return a browser fingerprint, e.g. from FingerprintJS. By default a
|
|
38
|
+
* random id is created and kept in `localStorage`.
|
|
39
|
+
*/
|
|
40
|
+
getFingerprint?: (() => string | Promise<string>) | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Solve proof-of-work challenges and retry the request once
|
|
43
|
+
*
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
autoSolveChallenge?: boolean | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Called when a proof-of-work challenge is received
|
|
49
|
+
*/
|
|
50
|
+
onChallengeReceived?: ((reason: string) => void) | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Called after a challenge is solved
|
|
53
|
+
*/
|
|
54
|
+
onChallengeSolved?: ((solveTimeMs: number) => void) | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Called when solving a challenge fails or its solution is rejected
|
|
57
|
+
*/
|
|
58
|
+
onChallengeFailed?: ((error: Error) => void) | undefined;
|
|
59
|
+
} | undefined) => {
|
|
60
|
+
id: "sentinel";
|
|
61
|
+
$InferServerPlugin: ReturnType<typeof sentinel>;
|
|
62
|
+
fetchPlugins: {
|
|
63
|
+
id: string;
|
|
64
|
+
name: string;
|
|
65
|
+
hooks: {
|
|
66
|
+
onRequest<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>): Promise<_better_fetch_fetch0.RequestContext<T>>;
|
|
67
|
+
onResponse({
|
|
68
|
+
response,
|
|
69
|
+
request
|
|
70
|
+
}: _better_fetch_fetch0.ResponseContext): Promise<Response | undefined>;
|
|
71
|
+
};
|
|
72
|
+
}[];
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
75
|
+
export { sentinelClient as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/plugins/audit-log/client.ts
|
|
2
|
+
const auditLogClient = () => {
|
|
3
|
+
return {
|
|
4
|
+
id: "audit-log",
|
|
5
|
+
$InferServerPlugin: {},
|
|
6
|
+
pathMethods: {
|
|
7
|
+
"/audit-log/get-audit-logs": "GET",
|
|
8
|
+
"/audit-log/get-all-audit-logs": "GET",
|
|
9
|
+
"/audit-log/get-event-types": "GET"
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { auditLogClient as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as capitalizeFirstLetter } from "./misc-
|
|
2
|
-
import { n as getClientConfig, t as createDynamicPathProxy } from "./proxy-
|
|
1
|
+
import { t as capitalizeFirstLetter } from "./misc-fKH4d5XQ.mjs";
|
|
2
|
+
import { n as getClientConfig, t as createDynamicPathProxy } from "./proxy-C_KXfOhk.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/client/vanilla.ts
|
|
5
5
|
function createAuthClient(options) {
|
package/dist/cookies/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../helper-
|
|
2
|
-
import "../index-
|
|
3
|
-
import "../types-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../plugins-
|
|
6
|
-
import { a as getCookies, c as setCookieCache, d as getChunkedCookie, f as parseSetCookieHeader, i as getCookieCache, l as setSessionCookie, n as createCookieGetter, o as getSessionCookie, p as setCookieToHeader, r as deleteSessionCookie, s as parseCookies, t as EligibleCookies, u as createSessionStore } from "../index-
|
|
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 { a as getCookies, c as setCookieCache, d as getChunkedCookie, f as parseSetCookieHeader, i as getCookieCache, l as setSessionCookie, n as createCookieGetter, o as getSessionCookie, p as setCookieToHeader, r as deleteSessionCookie, s as parseCookies, t as EligibleCookies, u as createSessionStore } from "../index-CsxtcAO0.mjs";
|
|
7
7
|
export { EligibleCookies, createCookieGetter, createSessionStore, deleteSessionCookie, getChunkedCookie, getCookieCache, getCookies, getSessionCookie, parseCookies, parseSetCookieHeader, setCookieCache, setCookieToHeader, setSessionCookie };
|
package/dist/cookies/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../url-VB2gAbTI.mjs";
|
|
2
2
|
import "../json-D0TBLy4q.mjs";
|
|
3
3
|
import "../jwt-CmxZAGe2.mjs";
|
|
4
|
-
import { a as getSessionCookie, c as setSessionCookie, d as createSessionStore, f as getChunkedCookie, i as getCookies, l as parseSetCookieHeader, n as deleteSessionCookie, o as parseCookies, r as getCookieCache, s as setCookieCache, t as createCookieGetter, u as setCookieToHeader } from "../cookies-
|
|
5
|
-
import "../date-
|
|
4
|
+
import { a as getSessionCookie, c as setSessionCookie, d as createSessionStore, f as getChunkedCookie, i as getCookies, l as parseSetCookieHeader, n as deleteSessionCookie, o as parseCookies, r as getCookieCache, s as setCookieCache, t as createCookieGetter, u as setCookieToHeader } from "../cookies-BuvlgcA-.mjs";
|
|
5
|
+
import "../date-CMr04reD.mjs";
|
|
6
6
|
|
|
7
7
|
export { createCookieGetter, createSessionStore, deleteSessionCookie, getChunkedCookie, getCookieCache, getCookies, getSessionCookie, parseCookies, parseSetCookieHeader, setCookieCache, setCookieToHeader, setSessionCookie };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as getBaseURL } from "./url-VB2gAbTI.mjs";
|
|
2
2
|
import { t as safeJSONParse } from "./json-D0TBLy4q.mjs";
|
|
3
3
|
import { i as verifyJWT, n as symmetricDecodeJWT, r as symmetricEncodeJWT, t as signJWT } from "./jwt-CmxZAGe2.mjs";
|
|
4
|
-
import { t as getDate, u as parseUserOutput } from "./date-
|
|
4
|
+
import { t as getDate, u as parseUserOutput } from "./date-CMr04reD.mjs";
|
|
5
5
|
import { env, isProduction } from "@gatwech/core/env";
|
|
6
6
|
import { PayvoAuthError } from "@gatwech/core/error";
|
|
7
7
|
import * as z$1 from "zod";
|
package/dist/crypto/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as constantTimeEqual, i as verifyPassword, n as symmetricEncrypt, r as hashPassword, t as symmetricDecrypt } from "../crypto-CCyta8xj.mjs";
|
|
2
2
|
import { i as verifyJWT, n as symmetricDecodeJWT, r as symmetricEncodeJWT, t as signJWT } from "../jwt-CmxZAGe2.mjs";
|
|
3
|
+
import { t as generateRandomString } from "../random-32E3cU5o.mjs";
|
|
3
4
|
|
|
4
5
|
export { constantTimeEqual, generateRandomString, hashPassword, signJWT, symmetricDecodeJWT, symmetricDecrypt, symmetricEncodeJWT, symmetricEncrypt, verifyJWT, verifyPassword };
|
|
@@ -5,7 +5,6 @@ import { bytesToHex, hexToBytes, managedNonce, utf8ToBytes } from "@noble/cipher
|
|
|
5
5
|
import { hex } from "@gatwech/utils/hex";
|
|
6
6
|
import { scryptAsync } from "@noble/hashes/scrypt.js";
|
|
7
7
|
import { hexToBytes as hexToBytes$1 } from "@noble/hashes/utils.js";
|
|
8
|
-
import { createRandomStringGenerator } from "@gatwech/utils/random";
|
|
9
8
|
|
|
10
9
|
//#region src/crypto/buffer.ts
|
|
11
10
|
/**
|
|
@@ -48,10 +47,6 @@ const verifyPassword = async ({ hash, password }) => {
|
|
|
48
47
|
return constantTimeEqual(await generateKey(password, salt), hexToBytes$1(key));
|
|
49
48
|
};
|
|
50
49
|
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/crypto/random.ts
|
|
53
|
-
const generateRandomString = createRandomStringGenerator("a-z", "0-9", "A-Z", "-_");
|
|
54
|
-
|
|
55
50
|
//#endregion
|
|
56
51
|
//#region src/crypto/index.ts
|
|
57
52
|
const symmetricEncrypt = async ({ key, data }) => {
|
|
@@ -67,4 +62,4 @@ const symmetricDecrypt = async ({ key, data }) => {
|
|
|
67
62
|
};
|
|
68
63
|
|
|
69
64
|
//#endregion
|
|
70
|
-
export {
|
|
65
|
+
export { constantTimeEqual as a, verifyPassword as i, symmetricEncrypt as n, hashPassword as r, symmetricDecrypt as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as getSession } from "./session-
|
|
2
|
-
import { t as getEndpointResponse } from "./plugin-helper-
|
|
1
|
+
import { n as getSession } from "./session-BB3oqApE.mjs";
|
|
2
|
+
import { t as getEndpointResponse } from "./plugin-helper-RJJBTOba.mjs";
|
|
3
3
|
import { createAuthEndpoint, createAuthMiddleware } from "@gatwech/core/api";
|
|
4
4
|
import * as z$1 from "zod";
|
|
5
5
|
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../helper-
|
|
2
|
-
import { $t as mergeSchema, Jt as convertFromDB, Qt as toZodSchema, Sn as createFieldAttribute, Xt as getAdapter, Yt as convertToDB, Zt as FieldAttributeToSchema, _n as InferFieldsInput, an as parseSessionOutput, bn as InferValueType, cn as createInternalAdapter, dn as getMigrations, en as parseAccountInput, fn as matchType, gn as InferFieldsFromPlugins, hn as InferFieldsFromOptions, in as parseSessionInput, ln as getAuthTables, mn as InferAdditionalFieldsFromPluginOptions, nn as parseAdditionalUserInput, on as parseUserInput, pn as FieldAttributeToObject, qt as getWithHooks, rn as parseInputData, sn as parseUserOutput, tn as parseAccountOutput, un as getSchema, vn as InferFieldsInputClient, xn as PluginFieldAttribute, yn as InferFieldsOutput } from "../index-
|
|
3
|
-
import "../types-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../plugins-
|
|
1
|
+
import "../helper-BgOIGHsu.mjs";
|
|
2
|
+
import { $t as mergeSchema, Jt as convertFromDB, Qt as toZodSchema, Sn as createFieldAttribute, Xt as getAdapter, Yt as convertToDB, Zt as FieldAttributeToSchema, _n as InferFieldsInput, an as parseSessionOutput, bn as InferValueType, cn as createInternalAdapter, dn as getMigrations, en as parseAccountInput, fn as matchType, gn as InferFieldsFromPlugins, hn as InferFieldsFromOptions, in as parseSessionInput, ln as getAuthTables, mn as InferAdditionalFieldsFromPluginOptions, nn as parseAdditionalUserInput, on as parseUserInput, pn as FieldAttributeToObject, qt as getWithHooks, rn as parseInputData, sn as parseUserOutput, tn as parseAccountOutput, un as getSchema, vn as InferFieldsInputClient, xn as PluginFieldAttribute, yn as InferFieldsOutput } from "../index-BNhJglHC.mjs";
|
|
3
|
+
import "../types-DNQ9XQrB.mjs";
|
|
4
|
+
import "../index-Df0KhQRf-BEa5tdwJ.mjs";
|
|
5
|
+
import "../plugins-Dy_FrD4Y.mjs";
|
|
6
6
|
export * from "@gatwech/core/db";
|
|
7
7
|
export { FieldAttributeToObject, FieldAttributeToSchema, InferAdditionalFieldsFromPluginOptions, InferFieldsFromOptions, InferFieldsFromPlugins, InferFieldsInput, InferFieldsInputClient, InferFieldsOutput, InferValueType, PluginFieldAttribute, convertFromDB, convertToDB, createFieldAttribute, createInternalAdapter, getAdapter, getAuthTables, getMigrations, getSchema, getWithHooks, matchType, mergeSchema, parseAccountInput, parseAccountOutput, parseAdditionalUserInput, parseInputData, parseSessionInput, parseSessionOutput, parseUserInput, parseUserOutput, toZodSchema };
|
package/dist/db/index.mjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import "../utils-
|
|
1
|
+
import "../utils-B03WRaGi.mjs";
|
|
2
2
|
import "../get-request-ip-DSjrEpGo.mjs";
|
|
3
3
|
import "../json-D0TBLy4q.mjs";
|
|
4
|
-
import "../crypto-
|
|
4
|
+
import "../crypto-CCyta8xj.mjs";
|
|
5
5
|
import "../jwt-CmxZAGe2.mjs";
|
|
6
|
-
import
|
|
7
|
-
import { a as
|
|
8
|
-
import "../
|
|
9
|
-
import
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
6
|
+
import "../random-32E3cU5o.mjs";
|
|
7
|
+
import { a as parseAdditionalUserInput, c as parseSessionOutput, i as parseAccountOutput, l as parseUserInput, n as mergeSchema, o as parseInputData, r as parseAccountInput, s as parseSessionInput, u as parseUserOutput } from "../date-CMr04reD.mjs";
|
|
8
|
+
import { a as createInternalAdapter, c as matchType, i as toZodSchema, l as getSchema, n as convertToDB, o as getWithHooks, r as getAdapter, s as getMigrations, t as convertFromDB, u as createFieldAttribute } from "../db-7vHnL1XA.mjs";
|
|
9
|
+
import "../dialect-HsWUfpYY.mjs";
|
|
10
|
+
import { t as getAuthTables } from "../get-tables-CKvSyDST.mjs";
|
|
11
|
+
import "../types-DCPpFKUB.mjs";
|
|
12
|
+
import "../misc-fKH4d5XQ.mjs";
|
|
12
13
|
|
|
13
14
|
export * from "@gatwech/core/db"
|
|
14
15
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as generateId } from "./utils-
|
|
1
|
+
import { t as generateId } from "./utils-B03WRaGi.mjs";
|
|
2
2
|
import { t as getIp } from "./get-request-ip-DSjrEpGo.mjs";
|
|
3
3
|
import { t as safeJSONParse } from "./json-D0TBLy4q.mjs";
|
|
4
|
-
import { c as parseSessionOutput, t as getDate, u as parseUserOutput } from "./date-
|
|
5
|
-
import { t as createKyselyAdapter } from "./dialect-
|
|
6
|
-
import { t as getAuthTables } from "./get-tables-
|
|
4
|
+
import { c as parseSessionOutput, t as getDate, u as parseUserOutput } from "./date-CMr04reD.mjs";
|
|
5
|
+
import { t as createKyselyAdapter } from "./dialect-HsWUfpYY.mjs";
|
|
6
|
+
import { t as getAuthTables } from "./get-tables-CKvSyDST.mjs";
|
|
7
7
|
import { getCurrentAdapter, getCurrentAuthContext, runWithTransaction } from "@gatwech/core/context";
|
|
8
8
|
import { createLogger, logger } from "@gatwech/core/env";
|
|
9
9
|
import { PayvoAuthError } from "@gatwech/core/error";
|
|
@@ -222,6 +222,7 @@ async function getMigrations(config) {
|
|
|
222
222
|
}
|
|
223
223
|
const migrations = [];
|
|
224
224
|
const useUUIDs = config.advanced?.database?.generateId === "uuid";
|
|
225
|
+
const useNumberId = config.advanced?.database?.useNumberId || config.advanced?.database?.generateId === "serial";
|
|
225
226
|
function getType(field, fieldName) {
|
|
226
227
|
const type = field.type;
|
|
227
228
|
const typeMap = {
|
|
@@ -289,7 +290,6 @@ async function getMigrations(config) {
|
|
|
289
290
|
});
|
|
290
291
|
migrations.push(exec);
|
|
291
292
|
}
|
|
292
|
-
const useNumberId = config.advanced?.database?.useNumberId || config.advanced?.database?.generateId === "serial";
|
|
293
293
|
if (config.advanced?.database?.useNumberId) logger$1.warn("`useNumberId` is deprecated. Please use `generateId` with `serial` instead.");
|
|
294
294
|
if (toBeCreated.length) for (const table of toBeCreated) {
|
|
295
295
|
let dbT = db.schema.createTable(table.table).addColumn("id", useNumberId ? dbType === "postgres" ? "serial" : "integer" : useUUIDs ? dbType === "postgres" || dbType === "mysql" || dbType === "mssql" ? "uuid" : "text" : dbType === "mysql" || dbType === "mssql" ? "varchar(36)" : "text", (col) => {
|
|
@@ -368,9 +368,12 @@ function getWithHooks(adapter, ctx) {
|
|
|
368
368
|
for (const hook of hooks || []) {
|
|
369
369
|
const toRun = hook[model]?.update?.before;
|
|
370
370
|
if (toRun) {
|
|
371
|
-
const result = await toRun(
|
|
371
|
+
const result = await toRun(actualData, context);
|
|
372
372
|
if (result === false) return null;
|
|
373
|
-
|
|
373
|
+
if (typeof result === "object" && "data" in result) actualData = {
|
|
374
|
+
...actualData,
|
|
375
|
+
...result.data
|
|
376
|
+
};
|
|
374
377
|
}
|
|
375
378
|
}
|
|
376
379
|
const customUpdated = customUpdateFn ? await customUpdateFn.fn(actualData) : null;
|
|
@@ -391,9 +394,12 @@ function getWithHooks(adapter, ctx) {
|
|
|
391
394
|
for (const hook of hooks || []) {
|
|
392
395
|
const toRun = hook[model]?.update?.before;
|
|
393
396
|
if (toRun) {
|
|
394
|
-
const result = await toRun(
|
|
397
|
+
const result = await toRun(actualData, context);
|
|
395
398
|
if (result === false) return null;
|
|
396
|
-
|
|
399
|
+
if (typeof result === "object" && "data" in result) actualData = {
|
|
400
|
+
...actualData,
|
|
401
|
+
...result.data
|
|
402
|
+
};
|
|
397
403
|
}
|
|
398
404
|
}
|
|
399
405
|
const customUpdated = customUpdateFn ? await customUpdateFn.fn(actualData) : null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as ms } from "./cookies-
|
|
3
|
-
import { n as mergeSchema } from "./date-
|
|
4
|
-
import { r as getSessionFromCtx } from "./session-
|
|
1
|
+
import { t as generateRandomString } from "./random-32E3cU5o.mjs";
|
|
2
|
+
import { m as ms } from "./cookies-BuvlgcA-.mjs";
|
|
3
|
+
import { n as mergeSchema } from "./date-CMr04reD.mjs";
|
|
4
|
+
import { r as getSessionFromCtx } from "./session-BB3oqApE.mjs";
|
|
5
5
|
import { defineErrorCodes } from "@gatwech/core/utils";
|
|
6
6
|
import { APIError } from "better-call";
|
|
7
7
|
import { createAuthEndpoint } from "@gatwech/core/api";
|
|
@@ -41,7 +41,7 @@ const createKyselyAdapter = async (config) => {
|
|
|
41
41
|
if ("getConnection" in db) dialect = new MysqlDialect(db);
|
|
42
42
|
if ("connect" in db) dialect = new PostgresDialect({ pool: db });
|
|
43
43
|
if ("fileControl" in db) {
|
|
44
|
-
const { BunSqliteDialect } = await import("./bun-sqlite-dialect-
|
|
44
|
+
const { BunSqliteDialect } = await import("./bun-sqlite-dialect-CDGusFqF.mjs");
|
|
45
45
|
dialect = new BunSqliteDialect({ database: db });
|
|
46
46
|
}
|
|
47
47
|
if ("createSession" in db && typeof window === "undefined") {
|
|
@@ -57,7 +57,7 @@ const createKyselyAdapter = async (config) => {
|
|
|
57
57
|
if (error !== null && typeof error === "object" && "code" in error && error.code !== "ERR_UNKNOWN_BUILTIN_MODULE") throw error;
|
|
58
58
|
}
|
|
59
59
|
if (DatabaseSync && db instanceof DatabaseSync) {
|
|
60
|
-
const { NodeSqliteDialect } = await import("./node-sqlite-dialect-
|
|
60
|
+
const { NodeSqliteDialect } = await import("./node-sqlite-dialect-CIOjcg31.mjs");
|
|
61
61
|
dialect = new NodeSqliteDialect({ database: db });
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { t as APIError } from "./api-
|
|
2
|
-
import { n as symmetricEncrypt,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { t as APIError } from "./api-Dk8Yj_J5.mjs";
|
|
2
|
+
import { n as symmetricEncrypt, t as symmetricDecrypt } from "./crypto-CCyta8xj.mjs";
|
|
3
|
+
import { t as generateRandomString } from "./random-32E3cU5o.mjs";
|
|
4
|
+
import { c as setSessionCookie, s as setCookieCache } from "./cookies-BuvlgcA-.mjs";
|
|
5
|
+
import { t as getDate } from "./date-CMr04reD.mjs";
|
|
6
|
+
import { r as getSessionFromCtx } from "./session-BB3oqApE.mjs";
|
|
7
|
+
import { t as getEndpointResponse } from "./plugin-helper-RJJBTOba.mjs";
|
|
7
8
|
import { BASE_ERROR_CODES } from "@gatwech/core/error";
|
|
8
9
|
import { defineErrorCodes } from "@gatwech/core/utils";
|
|
9
10
|
import { createAuthEndpoint, createAuthMiddleware } from "@gatwech/core/api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as parseState, r as generateState } from "./utils-
|
|
2
|
-
import { O as handleOAuthUserInfo } from "./api-
|
|
3
|
-
import { c as setSessionCookie } from "./cookies-
|
|
4
|
-
import { u as sessionMiddleware } from "./session-
|
|
1
|
+
import { i as parseState, r as generateState } from "./utils-B03WRaGi.mjs";
|
|
2
|
+
import { O as handleOAuthUserInfo } from "./api-Dk8Yj_J5.mjs";
|
|
3
|
+
import { c as setSessionCookie } from "./cookies-BuvlgcA-.mjs";
|
|
4
|
+
import { u as sessionMiddleware } from "./session-BB3oqApE.mjs";
|
|
5
5
|
import { BASE_ERROR_CODES } from "@gatwech/core/error";
|
|
6
6
|
import { createAuthorizationURL, refreshAccessToken, validateAuthorizationCode } from "@gatwech/core/oauth2";
|
|
7
7
|
import { defineErrorCodes } from "@gatwech/core/utils";
|
|
@@ -1,29 +1,42 @@
|
|
|
1
|
-
import { t as APIError } from "./api-
|
|
1
|
+
import { t as APIError } from "./api-Dk8Yj_J5.mjs";
|
|
2
2
|
import { defineErrorCodes } from "@gatwech/core/utils";
|
|
3
3
|
import { createHash } from "@gatwech/utils/hash";
|
|
4
4
|
import { betterFetch } from "@better-fetch/fetch";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/haveibeenpwned/index.ts
|
|
7
7
|
const ERROR_CODES = defineErrorCodes({ PASSWORD_COMPROMISED: "The password you entered has been compromised. Please choose a different password." });
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Returns how many times a password appears in known breaches, using the
|
|
10
|
+
* k-anonymity range API: only the first 5 characters of the password's SHA-1
|
|
11
|
+
* hash are sent. Throws if the API can't be reached.
|
|
12
|
+
*/
|
|
13
|
+
async function getPasswordBreachCount(password) {
|
|
10
14
|
const sha1Hash = (await createHash("SHA-1", "hex").digest(password)).toUpperCase();
|
|
11
15
|
const prefix = sha1Hash.substring(0, 5);
|
|
12
16
|
const suffix = sha1Hash.substring(5);
|
|
17
|
+
const { data, error } = await betterFetch(`https://api.pwnedpasswords.com/range/${prefix}`, { headers: {
|
|
18
|
+
"Add-Padding": "true",
|
|
19
|
+
"User-Agent": "payvoAuth Password Checker"
|
|
20
|
+
} });
|
|
21
|
+
if (error) throw new Error(`Failed to check password. Status: ${error.status}`);
|
|
22
|
+
for (const line of data.split("\n")) {
|
|
23
|
+
const [lineSuffix, count] = line.trim().split(":");
|
|
24
|
+
if (lineSuffix?.toUpperCase() === suffix) return Number(count) || 0;
|
|
25
|
+
}
|
|
26
|
+
return 0;
|
|
27
|
+
}
|
|
28
|
+
async function checkPasswordCompromise(password, customMessage) {
|
|
29
|
+
if (!password) return;
|
|
30
|
+
let breachCount;
|
|
13
31
|
try {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"User-Agent": "payvoAuth Password Checker"
|
|
17
|
-
} });
|
|
18
|
-
if (error) throw new APIError("INTERNAL_SERVER_ERROR", { message: `Failed to check password. Status: ${error.status}` });
|
|
19
|
-
if (data.split("\n").some((line) => line.split(":")[0].toUpperCase() === suffix.toUpperCase())) throw new APIError("BAD_REQUEST", {
|
|
20
|
-
message: customMessage || ERROR_CODES.PASSWORD_COMPROMISED,
|
|
21
|
-
code: "PASSWORD_COMPROMISED"
|
|
22
|
-
});
|
|
23
|
-
} catch (error) {
|
|
24
|
-
if (error instanceof APIError) throw error;
|
|
32
|
+
breachCount = await getPasswordBreachCount(password);
|
|
33
|
+
} catch {
|
|
25
34
|
throw new APIError("INTERNAL_SERVER_ERROR", { message: "Failed to check password. Please try again later." });
|
|
26
35
|
}
|
|
36
|
+
if (breachCount > 0) throw new APIError("BAD_REQUEST", {
|
|
37
|
+
message: customMessage || ERROR_CODES.PASSWORD_COMPROMISED,
|
|
38
|
+
code: "PASSWORD_COMPROMISED"
|
|
39
|
+
});
|
|
27
40
|
}
|
|
28
41
|
const haveIBeenPwned = (options) => ({
|
|
29
42
|
id: "haveIBeenPwned",
|
|
@@ -40,4 +53,4 @@ const haveIBeenPwned = (options) => ({
|
|
|
40
53
|
});
|
|
41
54
|
|
|
42
55
|
//#endregion
|
|
43
|
-
export { haveIBeenPwned as t };
|
|
56
|
+
export { haveIBeenPwned as n, getPasswordBreachCount as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as InferOptionSchema } from "./plugins-
|
|
2
|
-
import * as
|
|
1
|
+
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
2
|
+
import * as better_call150 from "better-call";
|
|
3
3
|
import * as z$1 from "zod";
|
|
4
4
|
import { StringValue } from "ms";
|
|
5
5
|
|
|
@@ -47,6 +47,19 @@ declare const schema: {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
//#endregion
|
|
50
|
+
//#region src/plugins/device-authorization/client.d.ts
|
|
51
|
+
declare const deviceAuthorizationClient: () => {
|
|
52
|
+
id: "device-authorization";
|
|
53
|
+
$InferServerPlugin: ReturnType<typeof deviceAuthorization>;
|
|
54
|
+
pathMethods: {
|
|
55
|
+
"/device/code": "POST";
|
|
56
|
+
"/device/token": "POST";
|
|
57
|
+
"/device": "GET";
|
|
58
|
+
"/device/approve": "POST";
|
|
59
|
+
"/device/deny": "POST";
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
50
63
|
//#region src/plugins/device-authorization/index.d.ts
|
|
51
64
|
declare const $deviceAuthorizationOptionsSchema: z$1.ZodObject<{
|
|
52
65
|
expiresIn: z$1.ZodDefault<z$1.ZodCustom<StringValue, StringValue>>;
|
|
@@ -167,7 +180,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
167
180
|
} & {
|
|
168
181
|
asResponse?: boolean;
|
|
169
182
|
returnHeaders?: boolean;
|
|
170
|
-
use?:
|
|
183
|
+
use?: better_call150.Middleware[];
|
|
171
184
|
path?: string;
|
|
172
185
|
} & {
|
|
173
186
|
asResponse?: AsResponse | undefined;
|
|
@@ -290,7 +303,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
290
303
|
} & {
|
|
291
304
|
asResponse?: boolean;
|
|
292
305
|
returnHeaders?: boolean;
|
|
293
|
-
use?:
|
|
306
|
+
use?: better_call150.Middleware[];
|
|
294
307
|
path?: string;
|
|
295
308
|
} & {
|
|
296
309
|
asResponse?: AsResponse | undefined;
|
|
@@ -394,7 +407,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
394
407
|
} & {
|
|
395
408
|
asResponse?: boolean;
|
|
396
409
|
returnHeaders?: boolean;
|
|
397
|
-
use?:
|
|
410
|
+
use?: better_call150.Middleware[];
|
|
398
411
|
path?: string;
|
|
399
412
|
} & {
|
|
400
413
|
asResponse?: AsResponse | undefined;
|
|
@@ -471,7 +484,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
471
484
|
} & {
|
|
472
485
|
asResponse?: boolean;
|
|
473
486
|
returnHeaders?: boolean;
|
|
474
|
-
use?:
|
|
487
|
+
use?: better_call150.Middleware[];
|
|
475
488
|
path?: string;
|
|
476
489
|
} & {
|
|
477
490
|
asResponse?: AsResponse | undefined;
|
|
@@ -543,7 +556,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
543
556
|
} & {
|
|
544
557
|
asResponse?: boolean;
|
|
545
558
|
returnHeaders?: boolean;
|
|
546
|
-
use?:
|
|
559
|
+
use?: better_call150.Middleware[];
|
|
547
560
|
path?: string;
|
|
548
561
|
} & {
|
|
549
562
|
asResponse?: AsResponse | undefined;
|
|
@@ -612,17 +625,4 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
612
625
|
};
|
|
613
626
|
};
|
|
614
627
|
//#endregion
|
|
615
|
-
|
|
616
|
-
declare const deviceAuthorizationClient: () => {
|
|
617
|
-
id: "device-authorization";
|
|
618
|
-
$InferServerPlugin: ReturnType<typeof deviceAuthorization>;
|
|
619
|
-
pathMethods: {
|
|
620
|
-
"/device/code": "POST";
|
|
621
|
-
"/device/token": "POST";
|
|
622
|
-
"/device": "GET";
|
|
623
|
-
"/device/approve": "POST";
|
|
624
|
-
"/device/deny": "POST";
|
|
625
|
-
};
|
|
626
|
-
};
|
|
627
|
-
//#endregion
|
|
628
|
-
export { deviceAuthorization as i, $deviceAuthorizationOptionsSchema as n, DeviceAuthorizationOptions as r, deviceAuthorizationClient as t };
|
|
628
|
+
export { deviceAuthorizationClient as i, DeviceAuthorizationOptions as n, deviceAuthorization as r, $deviceAuthorizationOptionsSchema as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as better_call192 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_call192.Middleware[];
|
|
42
42
|
path?: string;
|
|
43
43
|
} & {
|
|
44
44
|
asResponse?: AsResponse | undefined;
|