@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,30 @@
|
|
|
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 "../../index-EABwA_BH.mjs";
|
|
8
|
+
import "../../index-zBdYQGaS.mjs";
|
|
9
|
+
import "../../index-DRM35ir1.mjs";
|
|
10
|
+
import "../../index-DS-R7st3.mjs";
|
|
11
|
+
import "../../index-CgeC2eGC.mjs";
|
|
12
|
+
import "../../index-DG-X1PK5.mjs";
|
|
13
|
+
import "../../index-BAVzFqII.mjs";
|
|
14
|
+
import "../../index-CUknVRZp.mjs";
|
|
15
|
+
import "../../index-CP3FNbOZ.mjs";
|
|
16
|
+
import "../../index-Df4SvZaE.mjs";
|
|
17
|
+
import "../../index-COGe8UJx.mjs";
|
|
18
|
+
import "../../index-Blmhq6eA.mjs";
|
|
19
|
+
import "../../index-Db8jqUq2.mjs";
|
|
20
|
+
import "../../index-DyH_CgmX.mjs";
|
|
21
|
+
import "../../index-BNDRYfTF.mjs";
|
|
22
|
+
import "../../index-DXVU0HGr.mjs";
|
|
23
|
+
import "../../index-QmocqGM-.mjs";
|
|
24
|
+
import "../../index-CKnPAS5n.mjs";
|
|
25
|
+
import "../../index-CaqpCfE5.mjs";
|
|
26
|
+
import "../../index-xoYsoOiR.mjs";
|
|
27
|
+
import "../../index-mxEUX2Gs.mjs";
|
|
28
|
+
import "../../index-Cv9iMevV.mjs";
|
|
29
|
+
import { t as sentinelClient } from "../../client-DZHNfxuR.mjs";
|
|
30
|
+
export { sentinelClient };
|
|
@@ -0,0 +1,29 @@
|
|
|
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 "../../index-EABwA_BH.mjs";
|
|
8
|
+
import "../../index-zBdYQGaS.mjs";
|
|
9
|
+
import { S as SentinelOptions, _ as haversineDistanceKm, b as GeoLocation, c as sentinel, d as POW_SOLUTION_HEADER, f as createNonce, g as verifySolution, h as solveChallenge, l as POW_CHALLENGE_HEADER, m as parsePowHeader, p as hasLeadingZeroBits, u as POW_REASON_HEADER, v as normalizeEmail, x as SecurityAction, y as SENTINEL_ERROR_CODES } from "../../index-DRM35ir1.mjs";
|
|
10
|
+
import "../../index-DS-R7st3.mjs";
|
|
11
|
+
import "../../index-CgeC2eGC.mjs";
|
|
12
|
+
import "../../index-DG-X1PK5.mjs";
|
|
13
|
+
import "../../index-BAVzFqII.mjs";
|
|
14
|
+
import "../../index-CUknVRZp.mjs";
|
|
15
|
+
import "../../index-CP3FNbOZ.mjs";
|
|
16
|
+
import "../../index-Df4SvZaE.mjs";
|
|
17
|
+
import "../../index-COGe8UJx.mjs";
|
|
18
|
+
import "../../index-Blmhq6eA.mjs";
|
|
19
|
+
import "../../index-Db8jqUq2.mjs";
|
|
20
|
+
import "../../index-DyH_CgmX.mjs";
|
|
21
|
+
import "../../index-BNDRYfTF.mjs";
|
|
22
|
+
import "../../index-DXVU0HGr.mjs";
|
|
23
|
+
import "../../index-QmocqGM-.mjs";
|
|
24
|
+
import "../../index-CKnPAS5n.mjs";
|
|
25
|
+
import "../../index-CaqpCfE5.mjs";
|
|
26
|
+
import "../../index-xoYsoOiR.mjs";
|
|
27
|
+
import "../../index-mxEUX2Gs.mjs";
|
|
28
|
+
import "../../index-Cv9iMevV.mjs";
|
|
29
|
+
export { GeoLocation, POW_CHALLENGE_HEADER, POW_REASON_HEADER, POW_SOLUTION_HEADER, SENTINEL_ERROR_CODES, SecurityAction, SentinelOptions, createNonce, hasLeadingZeroBits, haversineDistanceKm, normalizeEmail, parsePowHeader, sentinel, solveChallenge, verifySolution };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "../../utils-B03WRaGi.mjs";
|
|
2
|
+
import "../../url-VB2gAbTI.mjs";
|
|
3
|
+
import "../../api-Dk8Yj_J5.mjs";
|
|
4
|
+
import "../../get-request-ip-DSjrEpGo.mjs";
|
|
5
|
+
import "../../json-D0TBLy4q.mjs";
|
|
6
|
+
import "../../crypto-CCyta8xj.mjs";
|
|
7
|
+
import "../../jwt-CmxZAGe2.mjs";
|
|
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";
|
|
17
|
+
import "../../registry-CqG_3Qnx.mjs";
|
|
18
|
+
import "../../haveibeenpwned-CzNda7Tn.mjs";
|
|
19
|
+
import { a as hasLeadingZeroBits, c as verifySolution, i as createNonce, n as POW_REASON_HEADER, o as parsePowHeader, r as POW_SOLUTION_HEADER, s as solveChallenge, t as POW_CHALLENGE_HEADER } from "../../pow-OK01yPG3.mjs";
|
|
20
|
+
import { i as SENTINEL_ERROR_CODES, n as haversineDistanceKm, r as normalizeEmail, t as sentinel } from "../../sentinel-C-D1IHJo.mjs";
|
|
21
|
+
|
|
22
|
+
export { POW_CHALLENGE_HEADER, POW_REASON_HEADER, POW_SOLUTION_HEADER, SENTINEL_ERROR_CODES, createNonce, hasLeadingZeroBits, haversineDistanceKm, normalizeEmail, parsePowHeader, sentinel, solveChallenge, verifySolution };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../../helper-
|
|
2
|
-
import "../../index-
|
|
3
|
-
import "../../types-
|
|
4
|
-
import "../../index-
|
|
5
|
-
import "../../plugins-
|
|
6
|
-
import { a as TwoFactorProvider, i as TwoFactorOptions, n as
|
|
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 TwoFactorProvider, i as TwoFactorOptions, n as twoFactorClient, o as TwoFactorTable, r as TWO_FACTOR_ERROR_CODES, s as UserWithTwoFactor, t as twoFactor } from "../../index-xoYsoOiR.mjs";
|
|
7
7
|
export { TWO_FACTOR_ERROR_CODES, TwoFactorOptions, TwoFactorProvider, TwoFactorTable, UserWithTwoFactor, twoFactor, twoFactorClient };
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import "../../utils-
|
|
1
|
+
import "../../utils-B03WRaGi.mjs";
|
|
2
2
|
import "../../url-VB2gAbTI.mjs";
|
|
3
|
-
import "../../api-
|
|
3
|
+
import "../../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 { t as
|
|
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";
|
|
17
|
+
import "../../password-5CdcAVaH.mjs";
|
|
18
|
+
import { n as TWO_FACTOR_ERROR_CODES, t as twoFactor } from "../../two-factor-CDVjxx4f.mjs";
|
|
19
|
+
import { t as twoFactorClient } from "../../client-BuveH3MN.mjs";
|
|
19
20
|
|
|
20
21
|
export { TWO_FACTOR_ERROR_CODES, twoFactor, twoFactorClient };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../helper-
|
|
2
|
-
import "../../plugins-
|
|
3
|
-
import { n as username, r as USERNAME_ERROR_CODES, t as UsernameOptions } from "../../index-
|
|
1
|
+
import "../../helper-BgOIGHsu.mjs";
|
|
2
|
+
import "../../plugins-Dy_FrD4Y.mjs";
|
|
3
|
+
import { n as username, r as USERNAME_ERROR_CODES, t as UsernameOptions } from "../../index-Cv9iMevV.mjs";
|
|
4
4
|
export { USERNAME_ERROR_CODES, UsernameOptions, username };
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import "../../utils-
|
|
1
|
+
import "../../utils-B03WRaGi.mjs";
|
|
2
2
|
import "../../url-VB2gAbTI.mjs";
|
|
3
|
-
import "../../api-
|
|
3
|
+
import "../../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
|
|
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";
|
|
17
|
+
import { n as USERNAME_ERROR_CODES, t as username } from "../../username-BHNvcvsY.mjs";
|
|
17
18
|
|
|
18
19
|
export { USERNAME_ERROR_CODES, username };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as APIError } from "./api-
|
|
1
|
+
import { t as APIError } from "./api-Dk8Yj_J5.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 {
|
|
5
|
-
import { n as mergeSchema, t as getDate } from "./date-
|
|
6
|
-
import { r as getSessionFromCtx, u as sessionMiddleware } from "./session-
|
|
7
|
-
import { n as parser_default } from "./parser-
|
|
8
|
-
import { n as role } from "./access-
|
|
4
|
+
import { t as generateRandomString } from "./random-32E3cU5o.mjs";
|
|
5
|
+
import { n as mergeSchema, t as getDate } from "./date-CMr04reD.mjs";
|
|
6
|
+
import { r as getSessionFromCtx, u as sessionMiddleware } from "./session-BB3oqApE.mjs";
|
|
7
|
+
import { n as parser_default } from "./parser-D7EkhAjZ.mjs";
|
|
8
|
+
import { n as role } from "./access-BM6jSA5j.mjs";
|
|
9
9
|
import { defineErrorCodes } from "@gatwech/core/utils";
|
|
10
10
|
import { createAuthEndpoint, createAuthEndpoint as createAuthEndpoint$1, createAuthMiddleware, createAuthMiddleware as createAuthMiddleware$1, optionsMiddleware } from "@gatwech/core/api";
|
|
11
11
|
import * as z$1 from "zod";
|
|
@@ -1424,12 +1424,15 @@ const apiKey = (options) => {
|
|
|
1424
1424
|
const lastLoginMethod = (userConfig) => {
|
|
1425
1425
|
const paths = [
|
|
1426
1426
|
"/callback/:id",
|
|
1427
|
-
"/oauth2/callback/:
|
|
1427
|
+
"/oauth2/callback/:providerId",
|
|
1428
1428
|
"/sign-in/email",
|
|
1429
1429
|
"/sign-up/email"
|
|
1430
1430
|
];
|
|
1431
1431
|
const defaultResolveMethod = (ctx) => {
|
|
1432
|
-
if (paths.includes(ctx.path))
|
|
1432
|
+
if (paths.includes(ctx.path)) {
|
|
1433
|
+
const providerId = ctx.params?.id ?? ctx.params?.providerId;
|
|
1434
|
+
return providerId ? providerId : ctx.path.split("/").pop();
|
|
1435
|
+
}
|
|
1433
1436
|
return null;
|
|
1434
1437
|
};
|
|
1435
1438
|
const config = {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { t as generateRandomString } from "./random-32E3cU5o.mjs";
|
|
2
|
+
import { sha256 } from "@noble/hashes/sha2.js";
|
|
3
|
+
import { utf8ToBytes } from "@noble/hashes/utils.js";
|
|
4
|
+
|
|
5
|
+
//#region src/plugins/sentinel/pow.ts
|
|
6
|
+
const POW_CHALLENGE_HEADER = "x-pow-challenge";
|
|
7
|
+
const POW_REASON_HEADER = "x-pow-reason";
|
|
8
|
+
const POW_SOLUTION_HEADER = "x-pow-solution";
|
|
9
|
+
function createNonce() {
|
|
10
|
+
return generateRandomString(32, "a-z", "0-9");
|
|
11
|
+
}
|
|
12
|
+
/** Attempts between yielding to the event loop while solving */
|
|
13
|
+
const SOLVE_BATCH_SIZE = 5e3;
|
|
14
|
+
function digest(nonce, solution) {
|
|
15
|
+
return sha256(utf8ToBytes(`${nonce}:${solution}`));
|
|
16
|
+
}
|
|
17
|
+
/** Whether a hash starts with at least `difficulty` zero bits */
|
|
18
|
+
function hasLeadingZeroBits(hash, difficulty) {
|
|
19
|
+
let remaining = difficulty;
|
|
20
|
+
for (const byte of hash) {
|
|
21
|
+
if (remaining <= 0) return true;
|
|
22
|
+
if (remaining >= 8) {
|
|
23
|
+
if (byte !== 0) return false;
|
|
24
|
+
remaining -= 8;
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
return byte >> 8 - remaining === 0;
|
|
28
|
+
}
|
|
29
|
+
return remaining <= 0;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Whether `sha256("<nonce>:<solution>")` has at least `difficulty` leading
|
|
33
|
+
* zero bits
|
|
34
|
+
*/
|
|
35
|
+
async function verifySolution(nonce, solution, difficulty) {
|
|
36
|
+
return hasLeadingZeroBits(digest(nonce, solution), difficulty);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Find a solution for a challenge by trying incrementing counters. Yields to
|
|
40
|
+
* the event loop between batches, so solving doesn't block the page.
|
|
41
|
+
*/
|
|
42
|
+
async function solveChallenge(nonce, difficulty) {
|
|
43
|
+
for (let counter = 0;; counter++) {
|
|
44
|
+
const solution = counter.toString(36);
|
|
45
|
+
if (hasLeadingZeroBits(digest(nonce, solution), difficulty)) return solution;
|
|
46
|
+
if (counter % SOLVE_BATCH_SIZE === SOLVE_BATCH_SIZE - 1) await new Promise((resolve) => setTimeout(resolve, 0));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/** Parses `<nonce>:<value>` header values */
|
|
50
|
+
function parsePowHeader(value) {
|
|
51
|
+
if (!value) return null;
|
|
52
|
+
const separator = value.indexOf(":");
|
|
53
|
+
if (separator < 1 || separator === value.length - 1) return null;
|
|
54
|
+
return {
|
|
55
|
+
nonce: value.slice(0, separator),
|
|
56
|
+
value: value.slice(separator + 1)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
export { hasLeadingZeroBits as a, verifySolution as c, createNonce as i, POW_REASON_HEADER as n, parsePowHeader as o, POW_SOLUTION_HEADER as r, solveChallenge as s, POW_CHALLENGE_HEADER as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getBaseURL } from "./url-VB2gAbTI.mjs";
|
|
2
|
-
import { t as parseJSON } from "./parser-
|
|
2
|
+
import { t as parseJSON } from "./parser-D7EkhAjZ.mjs";
|
|
3
3
|
import { BetterFetchError, createFetch } from "@better-fetch/fetch";
|
|
4
4
|
import { atom, onMount } from "nanostores";
|
|
5
5
|
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
//#region src/plugins/audit-log/events.ts
|
|
2
|
+
/**
|
|
3
|
+
* Audit event types recorded by the audit log plugin
|
|
4
|
+
*/
|
|
5
|
+
const AUDIT_EVENT_TYPES = {
|
|
6
|
+
USER_SIGNED_UP: "user_signed_up",
|
|
7
|
+
USER_PROFILE_UPDATED: "user_profile_updated",
|
|
8
|
+
USER_PROFILE_IMAGE_UPDATED: "user_profile_image_updated",
|
|
9
|
+
USER_EMAIL_VERIFIED: "user_email_verified",
|
|
10
|
+
USER_BANNED: "user_banned",
|
|
11
|
+
USER_UNBANNED: "user_unbanned",
|
|
12
|
+
USER_DELETED: "user_deleted",
|
|
13
|
+
USER_ROLE_UPDATED: "user_role_updated",
|
|
14
|
+
USER_EMAIL_CHANGED: "user_email_changed",
|
|
15
|
+
USER_PHONE_NUMBER_CHANGED: "user_phone_number_changed",
|
|
16
|
+
USER_SIGNED_IN: "user_signed_in",
|
|
17
|
+
USER_SIGNED_OUT: "user_signed_out",
|
|
18
|
+
SESSION_CREATED: "session_created",
|
|
19
|
+
SESSION_REVOKED: "session_revoked",
|
|
20
|
+
SESSIONS_REVOKED_ALL: "sessions_revoked_all",
|
|
21
|
+
USER_IMPERSONATED: "user_impersonated",
|
|
22
|
+
USER_IMPERSONATION_STOPPED: "user_impersonation_stopped",
|
|
23
|
+
DEVICE_AUTHORIZATION_APPROVED: "device_authorization_approved",
|
|
24
|
+
DEVICE_AUTHORIZATION_DENIED: "device_authorization_denied",
|
|
25
|
+
ACCOUNT_LINKED: "account_linked",
|
|
26
|
+
ACCOUNT_UNLINKED: "account_unlinked",
|
|
27
|
+
PASSWORD_CHANGED: "password_changed",
|
|
28
|
+
TWO_FACTOR_ENABLED: "two_factor_enabled",
|
|
29
|
+
TWO_FACTOR_DISABLED: "two_factor_disabled",
|
|
30
|
+
BACKUP_CODES_GENERATED: "two_factor_backup_codes_generated",
|
|
31
|
+
PASSKEY_ADDED: "passkey_added",
|
|
32
|
+
PASSKEY_REMOVED: "passkey_removed",
|
|
33
|
+
API_KEY_CREATED: "api_key_created",
|
|
34
|
+
API_KEY_UPDATED: "api_key_updated",
|
|
35
|
+
API_KEY_DELETED: "api_key_deleted",
|
|
36
|
+
PASSWORD_RESET_REQUESTED: "password_reset_requested",
|
|
37
|
+
PASSWORD_RESET_COMPLETED: "password_reset_completed",
|
|
38
|
+
EMAIL_VERIFICATION_SENT: "email_verification_sent",
|
|
39
|
+
ORGANIZATION_CREATED: "organization_created",
|
|
40
|
+
ORGANIZATION_UPDATED: "organization_updated",
|
|
41
|
+
ORGANIZATION_DELETED: "organization_deleted",
|
|
42
|
+
ORGANIZATION_ROLE_CREATED: "organization_role_created",
|
|
43
|
+
ORGANIZATION_ROLE_UPDATED: "organization_role_updated",
|
|
44
|
+
ORGANIZATION_ROLE_DELETED: "organization_role_deleted",
|
|
45
|
+
MEMBER_ADDED: "member_added",
|
|
46
|
+
MEMBER_REMOVED: "member_removed",
|
|
47
|
+
MEMBER_ROLE_UPDATED: "member_role_updated",
|
|
48
|
+
MEMBER_INVITED: "member_invited",
|
|
49
|
+
INVITE_ACCEPTED: "invite_accepted",
|
|
50
|
+
INVITE_REJECTED: "invite_rejected",
|
|
51
|
+
INVITE_CANCELLED: "invite_cancelled",
|
|
52
|
+
TEAM_CREATED: "team_created",
|
|
53
|
+
TEAM_UPDATED: "team_updated",
|
|
54
|
+
TEAM_DELETED: "team_deleted",
|
|
55
|
+
TEAM_MEMBER_ADDED: "team_member_added",
|
|
56
|
+
TEAM_MEMBER_REMOVED: "team_member_removed",
|
|
57
|
+
USER_SIGN_IN_FAILED: "user_sign_in_failed",
|
|
58
|
+
VERIFICATION_FAILED: "verification_failed"
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Security event types recorded by the sentinel plugin
|
|
62
|
+
*
|
|
63
|
+
* Declared here so both plugins share the same event types
|
|
64
|
+
*/
|
|
65
|
+
const SECURITY_EVENT_TYPES = {
|
|
66
|
+
BLOCKED: "security_blocked",
|
|
67
|
+
ALLOWED_AFTER_CHALLENGE: "security_allowed",
|
|
68
|
+
CREDENTIAL_STUFFING: "security_credential_stuffing",
|
|
69
|
+
IMPOSSIBLE_TRAVEL: "security_impossible_travel",
|
|
70
|
+
GEO_BLOCKED: "security_geo_blocked",
|
|
71
|
+
BOT_BLOCKED: "security_bot_blocked",
|
|
72
|
+
SUSPICIOUS_IP: "security_suspicious_ip",
|
|
73
|
+
VELOCITY_EXCEEDED: "security_velocity_exceeded",
|
|
74
|
+
FREE_TRIAL_ABUSE: "security_free_trial_abuse",
|
|
75
|
+
COMPROMISED_PASSWORD: "security_compromised_password",
|
|
76
|
+
STALE_ACCOUNT: "security_stale_account",
|
|
77
|
+
INVALID_EMAIL: "security_invalid_email"
|
|
78
|
+
};
|
|
79
|
+
const ALL_EVENT_TYPES = [...Object.values(AUDIT_EVENT_TYPES), ...Object.values(SECURITY_EVENT_TYPES)];
|
|
80
|
+
/** Endpoints that complete a sign-in by creating a session */
|
|
81
|
+
const SIGN_IN_PATHS = [
|
|
82
|
+
"/sign-in/email",
|
|
83
|
+
"/sign-in/email-otp",
|
|
84
|
+
"/sign-in/phone-number",
|
|
85
|
+
"/sign-in/username",
|
|
86
|
+
"/magic-link/verify",
|
|
87
|
+
"/sign-in/anonymous",
|
|
88
|
+
"/sign-in/social",
|
|
89
|
+
"/sign-in/oauth2",
|
|
90
|
+
"/callback/:id",
|
|
91
|
+
"/oauth2/callback/:providerId",
|
|
92
|
+
"/one-tap/callback",
|
|
93
|
+
"/passkey/verify-authentication",
|
|
94
|
+
"/two-factor/verify-totp",
|
|
95
|
+
"/two-factor/verify-otp",
|
|
96
|
+
"/two-factor/verify-backup-code",
|
|
97
|
+
"/one-time-token/verify",
|
|
98
|
+
"/device/token",
|
|
99
|
+
"/verify-email",
|
|
100
|
+
"/email-otp/verify-email",
|
|
101
|
+
"/phone-number/verify"
|
|
102
|
+
];
|
|
103
|
+
/** Sign-in endpoints that check credentials, so a failure is a failed attempt */
|
|
104
|
+
const CREDENTIAL_SIGN_IN_PATHS = [
|
|
105
|
+
"/sign-in/email",
|
|
106
|
+
"/sign-in/email-otp",
|
|
107
|
+
"/sign-in/phone-number",
|
|
108
|
+
"/sign-in/username",
|
|
109
|
+
"/passkey/verify-authentication",
|
|
110
|
+
"/two-factor/verify-totp",
|
|
111
|
+
"/two-factor/verify-otp",
|
|
112
|
+
"/two-factor/verify-backup-code"
|
|
113
|
+
];
|
|
114
|
+
/**
|
|
115
|
+
* Endpoints that check a one-time code or token outside a sign-in, so a
|
|
116
|
+
* failure is a failed attempt
|
|
117
|
+
*/
|
|
118
|
+
const VERIFICATION_PATHS = [
|
|
119
|
+
"/email-otp/check-verification-otp",
|
|
120
|
+
"/email-otp/verify-email",
|
|
121
|
+
"/email-otp/reset-password",
|
|
122
|
+
"/phone-number/verify",
|
|
123
|
+
"/phone-number/reset-password",
|
|
124
|
+
"/reset-password",
|
|
125
|
+
"/one-time-token/verify"
|
|
126
|
+
];
|
|
127
|
+
/** Endpoints whose successful response maps to a single event */
|
|
128
|
+
const PATH_EVENTS = {
|
|
129
|
+
"/revoke-session": AUDIT_EVENT_TYPES.SESSION_REVOKED,
|
|
130
|
+
"/revoke-sessions": AUDIT_EVENT_TYPES.SESSIONS_REVOKED_ALL,
|
|
131
|
+
"/revoke-other-sessions": AUDIT_EVENT_TYPES.SESSIONS_REVOKED_ALL,
|
|
132
|
+
"/multi-session/revoke": AUDIT_EVENT_TYPES.SESSION_REVOKED,
|
|
133
|
+
"/admin/revoke-user-session": AUDIT_EVENT_TYPES.SESSION_REVOKED,
|
|
134
|
+
"/admin/revoke-user-sessions": AUDIT_EVENT_TYPES.SESSIONS_REVOKED_ALL,
|
|
135
|
+
"/change-password": AUDIT_EVENT_TYPES.PASSWORD_CHANGED,
|
|
136
|
+
"/set-password": AUDIT_EVENT_TYPES.PASSWORD_CHANGED,
|
|
137
|
+
"/admin/set-user-password": AUDIT_EVENT_TYPES.PASSWORD_CHANGED,
|
|
138
|
+
"/request-password-reset": AUDIT_EVENT_TYPES.PASSWORD_RESET_REQUESTED,
|
|
139
|
+
"/forget-password/email-otp": AUDIT_EVENT_TYPES.PASSWORD_RESET_REQUESTED,
|
|
140
|
+
"/phone-number/request-password-reset": AUDIT_EVENT_TYPES.PASSWORD_RESET_REQUESTED,
|
|
141
|
+
"/reset-password": AUDIT_EVENT_TYPES.PASSWORD_RESET_COMPLETED,
|
|
142
|
+
"/email-otp/reset-password": AUDIT_EVENT_TYPES.PASSWORD_RESET_COMPLETED,
|
|
143
|
+
"/phone-number/reset-password": AUDIT_EVENT_TYPES.PASSWORD_RESET_COMPLETED,
|
|
144
|
+
"/send-verification-email": AUDIT_EVENT_TYPES.EMAIL_VERIFICATION_SENT,
|
|
145
|
+
"/email-otp/send-verification-otp": AUDIT_EVENT_TYPES.EMAIL_VERIFICATION_SENT,
|
|
146
|
+
"/unlink-account": AUDIT_EVENT_TYPES.ACCOUNT_UNLINKED,
|
|
147
|
+
"/two-factor/generate-backup-codes": AUDIT_EVENT_TYPES.BACKUP_CODES_GENERATED,
|
|
148
|
+
"/passkey/verify-registration": AUDIT_EVENT_TYPES.PASSKEY_ADDED,
|
|
149
|
+
"/passkey/delete-passkey": AUDIT_EVENT_TYPES.PASSKEY_REMOVED,
|
|
150
|
+
"/api-key/create": AUDIT_EVENT_TYPES.API_KEY_CREATED,
|
|
151
|
+
"/api-key/update": AUDIT_EVENT_TYPES.API_KEY_UPDATED,
|
|
152
|
+
"/api-key/delete": AUDIT_EVENT_TYPES.API_KEY_DELETED,
|
|
153
|
+
"/admin/stop-impersonating": AUDIT_EVENT_TYPES.USER_IMPERSONATION_STOPPED,
|
|
154
|
+
"/device/approve": AUDIT_EVENT_TYPES.DEVICE_AUTHORIZATION_APPROVED,
|
|
155
|
+
"/device/deny": AUDIT_EVENT_TYPES.DEVICE_AUTHORIZATION_DENIED,
|
|
156
|
+
"/organization/create": AUDIT_EVENT_TYPES.ORGANIZATION_CREATED,
|
|
157
|
+
"/organization/update": AUDIT_EVENT_TYPES.ORGANIZATION_UPDATED,
|
|
158
|
+
"/organization/delete": AUDIT_EVENT_TYPES.ORGANIZATION_DELETED,
|
|
159
|
+
"/organization/create-role": AUDIT_EVENT_TYPES.ORGANIZATION_ROLE_CREATED,
|
|
160
|
+
"/organization/update-role": AUDIT_EVENT_TYPES.ORGANIZATION_ROLE_UPDATED,
|
|
161
|
+
"/organization/delete-role": AUDIT_EVENT_TYPES.ORGANIZATION_ROLE_DELETED,
|
|
162
|
+
"/organization/add-member": AUDIT_EVENT_TYPES.MEMBER_ADDED,
|
|
163
|
+
"/organization/remove-member": AUDIT_EVENT_TYPES.MEMBER_REMOVED,
|
|
164
|
+
"/organization/leave": AUDIT_EVENT_TYPES.MEMBER_REMOVED,
|
|
165
|
+
"/organization/update-member-role": AUDIT_EVENT_TYPES.MEMBER_ROLE_UPDATED,
|
|
166
|
+
"/organization/invite-member": AUDIT_EVENT_TYPES.MEMBER_INVITED,
|
|
167
|
+
"/organization/accept-invitation": AUDIT_EVENT_TYPES.INVITE_ACCEPTED,
|
|
168
|
+
"/organization/reject-invitation": AUDIT_EVENT_TYPES.INVITE_REJECTED,
|
|
169
|
+
"/organization/cancel-invitation": AUDIT_EVENT_TYPES.INVITE_CANCELLED,
|
|
170
|
+
"/organization/create-team": AUDIT_EVENT_TYPES.TEAM_CREATED,
|
|
171
|
+
"/organization/update-team": AUDIT_EVENT_TYPES.TEAM_UPDATED,
|
|
172
|
+
"/organization/remove-team": AUDIT_EVENT_TYPES.TEAM_DELETED,
|
|
173
|
+
"/organization/add-team-member": AUDIT_EVENT_TYPES.TEAM_MEMBER_ADDED,
|
|
174
|
+
"/organization/remove-team-member": AUDIT_EVENT_TYPES.TEAM_MEMBER_REMOVED
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region src/plugins/audit-log/registry.ts
|
|
179
|
+
/**
|
|
180
|
+
* Recorders registered by `auditLog()`, keyed by the database adapter of the
|
|
181
|
+
* auth instance they belong to (it's the same object for the whole lifetime
|
|
182
|
+
* of the instance, unlike the options), so other plugins record through the
|
|
183
|
+
* same sinks
|
|
184
|
+
*/
|
|
185
|
+
const recorders = /* @__PURE__ */ new WeakMap();
|
|
186
|
+
function registerAuditRecorder(context, record) {
|
|
187
|
+
recorders.set(context.adapter, record);
|
|
188
|
+
}
|
|
189
|
+
function getAuditRecorder(context) {
|
|
190
|
+
return recorders.get(context.adapter);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
//#endregion
|
|
194
|
+
export { CREDENTIAL_SIGN_IN_PATHS as a, SIGN_IN_PATHS as c, AUDIT_EVENT_TYPES as i, VERIFICATION_PATHS as l, registerAuditRecorder as n, PATH_EVENTS as o, ALL_EVENT_TYPES as r, SECURITY_EVENT_TYPES as s, getAuditRecorder as t };
|