@gatwech/auth 1.0.0-beta.18 → 1.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -14
- package/dist/{access-C6O_osEz.mjs → access-CrwEFPHE.mjs} +1 -1
- package/dist/{access-DT1f6l5k.mjs → access-bhklJd7m.mjs} +1 -1
- package/dist/{adapter-factory-BZ2Qiqpn.mjs → adapter-factory-xbLUJt85.mjs} +2 -2
- package/dist/adapters/drizzle-adapter/index.mjs +6 -5
- package/dist/adapters/index.d.mts +5 -5
- package/dist/adapters/index.mjs +6 -5
- package/dist/adapters/kysely-adapter/index.d.mts +1 -1
- package/dist/adapters/kysely-adapter/index.mjs +8 -7
- package/dist/adapters/memory-adapter/index.d.mts +1 -1
- package/dist/adapters/memory-adapter/index.mjs +6 -5
- package/dist/adapters/mongodb-adapter/index.mjs +6 -5
- package/dist/adapters/prisma-adapter/index.mjs +6 -5
- package/dist/adapters/test.mjs +4 -3
- package/dist/{admin-Bcq53Nwj.mjs → admin-BzUJL6tr.mjs} +6 -6
- package/dist/{anonymous-CRt1imBW.mjs → anonymous-BjlTk4gl.mjs} +5 -5
- package/dist/api/index.d.mts +5 -5
- package/dist/api/index.mjs +12 -11
- package/dist/{api-0pR_I-Nx.mjs → api-Dk8Yj_J5.mjs} +15 -5
- package/dist/audit-log-DKsUWR8O.mjs +772 -0
- package/dist/{auth-CBUoBX6o.mjs → auth-vfCyIIeV.mjs} +8 -8
- package/dist/{bearer-Djf_awfo.mjs → bearer-DvQLM00l.mjs} +2 -2
- package/dist/client/index.d.mts +19 -19
- package/dist/client/index.mjs +4 -4
- package/dist/client/plugins/index.d.mts +42 -34
- package/dist/client/plugins/index.mjs +16 -12
- package/dist/client/react/index.d.mts +5 -5
- package/dist/client/react/index.mjs +2 -2
- package/dist/client-4QEb0rUr.mjs +95 -0
- package/dist/client-C_qmyez2.d.mts +75 -0
- package/dist/client-DzOqXJUm.mjs +15 -0
- package/dist/client-F67q-Lbi.d.mts +14 -0
- package/dist/{client-aExCkfwm.mjs → client-xga7yFIX.mjs} +2 -2
- package/dist/cookies/index.d.mts +6 -6
- package/dist/cookies/index.mjs +2 -2
- package/dist/{cookies-cJObLwn1.mjs → cookies-BuvlgcA-.mjs} +1 -1
- package/dist/crypto/index.mjs +2 -1
- package/dist/{crypto-Bb42eMrH.mjs → crypto-CCyta8xj.mjs} +1 -6
- package/dist/{custom-session-L3t7ecsd.mjs → custom-session-DN_-pfi_.mjs} +2 -2
- package/dist/db/index.d.mts +5 -5
- package/dist/db/index.mjs +9 -8
- package/dist/{db-BrstmDhc.mjs → db-7vHnL1XA.mjs} +15 -9
- package/dist/{device-authorization-V4s3h4Mj.mjs → device-authorization-BKnNhlsz.mjs} +4 -4
- package/dist/{dialect-CeddeGHf.mjs → dialect-HsWUfpYY.mjs} +2 -2
- package/dist/{email-otp-BtDHSw14.mjs → email-otp-Dw0DypjQ.mjs} +7 -6
- package/dist/{generic-oauth-CL5X27ZI.mjs → generic-oauth-DFj27JY8.mjs} +4 -4
- package/dist/{has-permission-BpAr7uCn.mjs → has-permission-Bvg8de8g.mjs} +1 -1
- package/dist/{haveibeenpwned-cMpJvmzI.mjs → haveibeenpwned-CzNda7Tn.mjs} +28 -15
- package/dist/{index-BYMI9r_d.d.mts → index-4I1YhYhk.d.mts} +4 -4
- package/dist/{index-Cxi7TbLE.d.mts → index-BNhJglHC.d.mts} +122 -122
- package/dist/{index-DlaMq1nb.d.mts → index-BX7rl07Z.d.mts} +14 -14
- package/dist/{client-BOX93C3d.d.mts → index-Bml-PCqP.d.mts} +52 -52
- package/dist/{index-zjjNBRY2.d.mts → index-BsSKcKgO.d.mts} +6 -6
- package/dist/{index-Buhn3hkR.d.mts → index-CBiGsvDd.d.mts} +8 -8
- package/dist/{index-D_k662QG.d.mts → index-CC920PPp.d.mts} +14 -14
- package/dist/{index-B3n8e37d.d.mts → index-CNd5jqLl.d.mts} +7 -7
- package/dist/{index-BqhKCbPH.d.mts → index-CP8x1TFq.d.mts} +6 -6
- package/dist/{index-DKNNV1kb.d.mts → index-CofuaNMl.d.mts} +8 -8
- package/dist/{index-DR0xXno9.d.mts → index-CsxtcAO0.d.mts} +1 -1
- package/dist/{index-C7fQuk-V.d.mts → index-CxlWnL9c.d.mts} +1 -1
- package/dist/{index-CuFzhoS6.d.mts → index-CzpdkTdv.d.mts} +10 -10
- package/dist/index-D57DuhZR.d.mts +3769 -0
- package/dist/{index-C-u1h_WX.d.mts → index-D6ku0rUC.d.mts} +5 -5
- package/dist/{client-CNY0tn9g.d.mts → index-DFSRYWFI.d.mts} +21 -21
- package/dist/{index-BBm8nQ9Q.d.mts → index-DGeoJ4gu.d.mts} +2 -2
- package/dist/{index-G6V0Z_Mn.d.mts → index-DTkcY7xH.d.mts} +10 -10
- package/dist/{index-65G5U5DB-DSdjzreF.d.mts → index-Df0KhQRf-BEa5tdwJ.d.mts} +3 -2
- package/dist/{index-34ONrP8l.d.mts → index-Dnd8S4S4.d.mts} +11 -11
- package/dist/{index-B-XKqFvY.d.mts → index-DwPAddfE.d.mts} +11 -4
- package/dist/{index-DoXZYQpq.d.mts → index-DyXi7S2M.d.mts} +10 -10
- package/dist/{index-BHoQlf7a.d.mts → index-KhbNmMmG.d.mts} +178 -178
- package/dist/{index-z0KSvE5i.d.mts → index-QmocqGM-.d.mts} +1 -1
- package/dist/{admin-DtfO1PLg.d.mts → index-XfE0WjTN.d.mts} +36 -36
- package/dist/{index-DaBcikv9.d.mts → index-sb-UFLuo.d.mts} +2 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +16 -15
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/next-js.mjs +2 -2
- package/dist/integrations/node.d.mts +5 -5
- package/dist/integrations/react-start.d.mts +4 -4
- package/dist/integrations/react-start.mjs +2 -2
- package/dist/{jwt-lHV4QHpD.mjs → jwt-DBN2mu0r.mjs} +4 -4
- package/dist/{kysely-adapter-DpzYO8Yf.mjs → kysely-adapter-Bkm1liPW.mjs} +1 -1
- package/dist/{magic-link-Bk-ueorR.mjs → magic-link-D9Em1aOR.mjs} +3 -3
- package/dist/{multi-session-DRrLKrg9.mjs → multi-session-Dno_8DxC.mjs} +5 -5
- package/dist/{oauth-proxy-D1sWh9B_.mjs → oauth-proxy-DW-zt8wv.mjs} +2 -2
- package/dist/oauth2/index.d.mts +5 -5
- package/dist/oauth2/index.mjs +12 -11
- package/dist/{one-tap-DMswkTEc.mjs → one-tap-CodeyQb8.mjs} +2 -2
- package/dist/{organization-BArHO_5v.mjs → organization-CkTKs7bx.mjs} +9 -9
- package/dist/{passkey-CcD4CnhM.mjs → passkey-JNQTz5a0.mjs} +5 -5
- package/dist/{phone-number-rHDIlh-2.mjs → phone-number-Dqz8aeyF.mjs} +4 -4
- package/dist/plugins/access/index.d.mts +2 -2
- package/dist/plugins/access/index.mjs +1 -1
- package/dist/plugins/admin/access/index.d.mts +2 -2
- package/dist/plugins/admin/access/index.mjs +2 -2
- package/dist/plugins/admin/index.d.mts +7 -8
- package/dist/plugins/admin/index.mjs +17 -16
- package/dist/plugins/anonymous/index.d.mts +6 -6
- package/dist/plugins/anonymous/index.mjs +13 -12
- package/dist/plugins/audit-log/client.d.mts +30 -0
- package/dist/plugins/audit-log/client.mjs +3 -0
- package/dist/plugins/audit-log/index.d.mts +29 -0
- package/dist/plugins/audit-log/index.mjs +20 -0
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/bearer/index.mjs +3 -3
- package/dist/plugins/captcha/index.d.mts +1 -1
- package/dist/plugins/captcha/index.mjs +1 -1
- package/dist/plugins/custom-session/index.d.mts +6 -6
- package/dist/plugins/custom-session/index.mjs +14 -13
- package/dist/plugins/device-authorization/index.d.mts +3 -3
- package/dist/plugins/device-authorization/index.mjs +13 -12
- package/dist/plugins/email-otp/index.d.mts +2 -2
- package/dist/plugins/email-otp/index.mjs +14 -13
- package/dist/plugins/generic-oauth/index.d.mts +6 -6
- package/dist/plugins/generic-oauth/index.mjs +13 -12
- package/dist/plugins/haveibeenpwned/index.d.mts +2 -2
- package/dist/plugins/haveibeenpwned/index.mjs +14 -13
- package/dist/plugins/index.d.mts +29 -139
- package/dist/plugins/index.mjs +47 -42
- package/dist/plugins/jwt/index.d.mts +6 -6
- package/dist/plugins/jwt/index.mjs +13 -12
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/magic-link/index.mjs +13 -12
- package/dist/plugins/multi-session/index.d.mts +2 -2
- package/dist/plugins/multi-session/index.mjs +13 -12
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +13 -12
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-tap/index.mjs +13 -12
- package/dist/plugins/one-time-token/index.d.mts +6 -6
- package/dist/plugins/one-time-token/index.mjs +46 -41
- package/dist/plugins/organization/access/index.d.mts +3 -3
- package/dist/plugins/organization/access/index.mjs +2 -2
- package/dist/plugins/organization/index.d.mts +8 -8
- package/dist/plugins/organization/index.mjs +17 -16
- package/dist/plugins/passkey/index.d.mts +6 -6
- package/dist/plugins/passkey/index.mjs +13 -12
- package/dist/plugins/phone-number/index.d.mts +6 -6
- package/dist/plugins/phone-number/index.mjs +13 -12
- package/dist/plugins/sentinel/client.d.mts +30 -0
- package/dist/plugins/sentinel/client.mjs +5 -0
- package/dist/plugins/sentinel/index.d.mts +29 -0
- package/dist/plugins/sentinel/index.mjs +22 -0
- package/dist/plugins/two-factor/index.d.mts +6 -6
- package/dist/plugins/two-factor/index.mjs +15 -14
- package/dist/plugins/username/index.d.mts +3 -3
- package/dist/plugins/username/index.mjs +13 -12
- package/dist/{plugins-hFZT3hmK.d.mts → plugins-Dy_FrD4Y.d.mts} +1 -1
- package/dist/{plugins-3jfNste3.mjs → plugins-yF8CFUDR.mjs} +11 -8
- package/dist/pow-OK01yPG3.mjs +61 -0
- package/dist/{proxy-CL9PZXJA.mjs → proxy-C_KXfOhk.mjs} +1 -1
- package/dist/random-32E3cU5o.mjs +7 -0
- package/dist/registry-CqG_3Qnx.mjs +194 -0
- package/dist/sentinel-DiPqydKG.mjs +1426 -0
- package/dist/{session-Dgp133Yt.mjs → session-BB3oqApE.mjs} +2 -2
- package/dist/src/adapters/memory-adapter/memory-adapter.d.ts +1 -1
- package/dist/src/adapters/prisma-adapter/test/auth.d.ts +1 -1
- package/dist/src/adapters/tests/auth-flow.d.ts +3 -3
- package/dist/src/adapters/tests/normal.d.ts +1 -1
- package/dist/src/adapters/tests/number-id.d.ts +3 -3
- package/dist/src/adapters/tests/performance.d.ts +3 -3
- package/dist/src/adapters/tests/transactions.d.ts +3 -3
- package/dist/src/api/index.d.ts +8 -8
- package/dist/src/client/plugins/index.d.ts +2 -0
- package/dist/src/plugins/admin/admin.d.ts +2 -2
- package/dist/src/plugins/api-key/index.d.ts +2 -2
- package/dist/src/plugins/audit-log/client.d.ts +10 -0
- package/dist/src/plugins/audit-log/events.d.ts +90 -0
- package/dist/src/plugins/audit-log/index.d.ts +614 -0
- package/dist/src/plugins/audit-log/registry.d.ts +13 -0
- package/dist/src/plugins/audit-log/remote.d.ts +34 -0
- package/dist/src/plugins/audit-log/schema.d.ts +50 -0
- package/dist/src/plugins/audit-log/types.d.ts +117 -0
- package/dist/src/plugins/email-otp/index.d.ts +1 -1
- package/dist/src/plugins/haveibeenpwned/index.d.ts +6 -0
- package/dist/src/plugins/index.d.ts +2 -0
- package/dist/src/plugins/multi-session/index.d.ts +8 -8
- package/dist/src/plugins/organization/organization.d.ts +5 -5
- package/dist/src/plugins/organization/routes/crud-access-control.d.ts +8 -8
- package/dist/src/plugins/organization/routes/crud-invites.d.ts +46 -46
- package/dist/src/plugins/organization/routes/crud-members.d.ts +40 -40
- package/dist/src/plugins/organization/routes/crud-org.d.ts +36 -36
- package/dist/src/plugins/organization/routes/crud-team.d.ts +50 -50
- package/dist/src/plugins/sentinel/actions.d.ts +64 -0
- package/dist/src/plugins/sentinel/client.d.ts +67 -0
- package/dist/src/plugins/sentinel/email.d.ts +28 -0
- package/dist/src/plugins/sentinel/geo.d.ts +22 -0
- package/dist/src/plugins/sentinel/index.d.ts +326 -0
- package/dist/src/plugins/sentinel/intel.d.ts +45 -0
- package/dist/src/plugins/sentinel/pow.d.ts +21 -0
- package/dist/src/plugins/sentinel/schema.d.ts +110 -0
- package/dist/src/plugins/sentinel/store.d.ts +37 -0
- package/dist/src/plugins/sentinel/types.d.ts +412 -0
- package/dist/src/test-utils/memory-secondary-storage.d.ts +16 -0
- package/dist/src/test-utils/password.d.ts +12 -0
- package/dist/src/test-utils/test-instance.d.ts +25 -25
- package/dist/test-utils/index.d.mts +293 -293
- package/dist/test-utils/index.mjs +53 -48
- package/dist/{two-factor-ClUXxom2.mjs → two-factor-CDVjxx4f.mjs} +6 -5
- package/dist/types/index.d.mts +5 -5
- package/dist/types/index.mjs +1 -1
- package/dist/{username-DiGklOGl.mjs → username-BHNvcvsY.mjs} +3 -3
- package/dist/{utils-SOMB4Px5.mjs → utils-B03WRaGi.mjs} +2 -1
- package/package.json +36 -3
- package/dist/index-CM-CFWwr.d.mts +0 -1919
- package/dist/index-DB7t8whN.d.mts +0 -1
- /package/dist/{access-BO2g7QVe.mjs → access-BM6jSA5j.mjs} +0 -0
- /package/dist/{bun-sqlite-dialect-CeNvMaZz.mjs → bun-sqlite-dialect-CDGusFqF.mjs} +0 -0
- /package/dist/{captcha-BqaMxlKC.mjs → captcha-DGP9lCRe.mjs} +0 -0
- /package/dist/{client-CygJhqeB.mjs → client-BuveH3MN.mjs} +0 -0
- /package/dist/{client-WiN43tAS.mjs → client-cBiytuOL.mjs} +0 -0
- /package/dist/{date-Cx2yCiC4.mjs → date-CMr04reD.mjs} +0 -0
- /package/dist/{esm-C-QicDNz.mjs → esm-BbvI87Z2.mjs} +0 -0
- /package/dist/{get-tables-BQP7YW9c.mjs → get-tables-CKvSyDST.mjs} +0 -0
- /package/dist/{helper-tmxW3BHj.d.mts → helper-BgOIGHsu.d.mts} +0 -0
- /package/dist/{misc-beA1w3XV.mjs → misc-fKH4d5XQ.mjs} +0 -0
- /package/dist/{node-sqlite-dialect-BcKxBQnm.mjs → node-sqlite-dialect-CIOjcg31.mjs} +0 -0
- /package/dist/{parser-DcrIEuXE.mjs → parser-D7EkhAjZ.mjs} +0 -0
- /package/dist/{password-sVC4nePO.mjs → password-5CdcAVaH.mjs} +0 -0
- /package/dist/{permission-DLYUF3cW.mjs → permission-CDDWgA_O.mjs} +0 -0
- /package/dist/{plugin-helper-4L-lzsjZ.mjs → plugin-helper-RJJBTOba.mjs} +0 -0
- /package/dist/{promise-8rrEHRXd.mjs → promise-D7Oo6_cY.mjs} +0 -0
- /package/dist/{types-Bjn15Uy6.mjs → types-DCPpFKUB.mjs} +0 -0
- /package/dist/{types-B1OL7hyf.d.mts → types-DNQ9XQrB.d.mts} +0 -0
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import type { User } from "../../types";
|
|
2
|
+
import type { InferOptionSchema } from "../../types/plugins";
|
|
3
|
+
import type { schema } from "./schema";
|
|
4
|
+
/**
|
|
5
|
+
* The action to take when a security check fails
|
|
6
|
+
*
|
|
7
|
+
* - `log`: record the event and let the request through
|
|
8
|
+
* - `challenge`: respond with `423` and a proof-of-work challenge
|
|
9
|
+
* - `block`: respond with `403`
|
|
10
|
+
*/
|
|
11
|
+
export type SecurityAction = "log" | "challenge" | "block";
|
|
12
|
+
export type GeoLocation = {
|
|
13
|
+
/**
|
|
14
|
+
* ISO 3166-1 alpha-2 country code, e.g. "US"
|
|
15
|
+
*/
|
|
16
|
+
country: string | null;
|
|
17
|
+
city?: string | null | undefined;
|
|
18
|
+
latitude?: number | null | undefined;
|
|
19
|
+
longitude?: number | null | undefined;
|
|
20
|
+
};
|
|
21
|
+
export interface SentinelOptions {
|
|
22
|
+
/**
|
|
23
|
+
* The hosted backend API URL
|
|
24
|
+
*
|
|
25
|
+
* @default process.env.PAYVO_INFRA_API_URL
|
|
26
|
+
*/
|
|
27
|
+
apiUrl?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The hosted backend API key
|
|
30
|
+
*
|
|
31
|
+
* @default process.env.PAYVO_INFRA_API_KEY
|
|
32
|
+
*/
|
|
33
|
+
apiKey?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The hosted identification service URL, used to check that visitor ids
|
|
36
|
+
* sent by clients are genuine
|
|
37
|
+
*
|
|
38
|
+
* @default process.env.PAYVO_INFRA_KV_URL
|
|
39
|
+
*/
|
|
40
|
+
kvUrl?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Identification service HTTP options
|
|
43
|
+
*/
|
|
44
|
+
kvOptions?: {
|
|
45
|
+
/**
|
|
46
|
+
* Request timeout in milliseconds
|
|
47
|
+
*
|
|
48
|
+
* @default 1000
|
|
49
|
+
*/
|
|
50
|
+
timeout?: number | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Retries after a failed request, with exponential backoff
|
|
53
|
+
*
|
|
54
|
+
* @default { attempts: 2, baseDelay: 400, maxDelay: 600 }
|
|
55
|
+
*/
|
|
56
|
+
retry?: {
|
|
57
|
+
attempts?: number | undefined;
|
|
58
|
+
baseDelay?: number | undefined;
|
|
59
|
+
maxDelay?: number | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Additional headers sent with every request
|
|
63
|
+
*/
|
|
64
|
+
headers?: Record<string, string> | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Hosted backend HTTP options
|
|
68
|
+
*/
|
|
69
|
+
apiOptions?: {
|
|
70
|
+
/**
|
|
71
|
+
* Request timeout in milliseconds
|
|
72
|
+
*
|
|
73
|
+
* @default 3000
|
|
74
|
+
*/
|
|
75
|
+
timeout?: number | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Additional headers sent with every request
|
|
78
|
+
*/
|
|
79
|
+
headers?: Record<string, string> | undefined;
|
|
80
|
+
} | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Allow requests through when a check can't complete, e.g. the hosted
|
|
83
|
+
* backend or secondary storage is unavailable
|
|
84
|
+
*
|
|
85
|
+
* @default true
|
|
86
|
+
*/
|
|
87
|
+
failOpen?: boolean | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Local providers that replace the hosted backend
|
|
90
|
+
*/
|
|
91
|
+
providers?: {
|
|
92
|
+
/**
|
|
93
|
+
* Resolve the client IP of a request
|
|
94
|
+
*
|
|
95
|
+
* By default the IP is read from the configured IP address headers
|
|
96
|
+
*/
|
|
97
|
+
getClientIp?: ((request: Request | Headers) => string | null) | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Whether an IP address is known to be malicious
|
|
100
|
+
*/
|
|
101
|
+
isSuspiciousIp?: ((ip: string) => boolean | Promise<boolean>) | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* Whether a request comes from an automated client
|
|
104
|
+
*/
|
|
105
|
+
isBot?: ((request: Request) => boolean | Promise<boolean>) | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Resolve the location of an IP address
|
|
108
|
+
*/
|
|
109
|
+
resolveGeo?: ((ip: string) => GeoLocation | null | Promise<GeoLocation | null>) | undefined;
|
|
110
|
+
} | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* Send a security notification, e.g. by email. Required for
|
|
113
|
+
* `unknownDeviceNotification` and the stale account notifications.
|
|
114
|
+
*/
|
|
115
|
+
sendNotification?: ((notification: {
|
|
116
|
+
type: "unknown-device" | "stale-account";
|
|
117
|
+
/**
|
|
118
|
+
* Who the notification is for
|
|
119
|
+
*/
|
|
120
|
+
recipient: "user" | "admin";
|
|
121
|
+
/**
|
|
122
|
+
* The address to send the notification to
|
|
123
|
+
*/
|
|
124
|
+
email: string;
|
|
125
|
+
user: User;
|
|
126
|
+
signIn: {
|
|
127
|
+
at: Date;
|
|
128
|
+
ipAddress: string | null;
|
|
129
|
+
userAgent: string | null;
|
|
130
|
+
/**
|
|
131
|
+
* City and country, when known, e.g. "Berlin, DE"
|
|
132
|
+
*/
|
|
133
|
+
location: string | null;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Days since the account was last active, for stale accounts
|
|
137
|
+
*/
|
|
138
|
+
daysInactive?: number | undefined;
|
|
139
|
+
}) => void | Promise<void>) | undefined;
|
|
140
|
+
security?: {
|
|
141
|
+
/**
|
|
142
|
+
* Detect credential stuffing by tracking failed sign-in attempts per
|
|
143
|
+
* visitor, falling back to the IP address
|
|
144
|
+
*/
|
|
145
|
+
credentialStuffing?: {
|
|
146
|
+
enabled: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Set to `log` to only record attempts. Otherwise the thresholds
|
|
149
|
+
* decide between a challenge and a block.
|
|
150
|
+
*
|
|
151
|
+
* @default "challenge"
|
|
152
|
+
*/
|
|
153
|
+
action?: SecurityAction | undefined;
|
|
154
|
+
/**
|
|
155
|
+
* Number of failed attempts before a challenge or a block
|
|
156
|
+
*
|
|
157
|
+
* @default { challenge: 3, block: 5 }
|
|
158
|
+
*/
|
|
159
|
+
thresholds?: {
|
|
160
|
+
challenge: number;
|
|
161
|
+
block: number;
|
|
162
|
+
} | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* Window in seconds in which failed attempts are counted
|
|
165
|
+
*
|
|
166
|
+
* @default 3600
|
|
167
|
+
*/
|
|
168
|
+
windowSeconds?: number | undefined;
|
|
169
|
+
/**
|
|
170
|
+
* Seconds a visitor stays blocked after reaching the block
|
|
171
|
+
* threshold
|
|
172
|
+
*
|
|
173
|
+
* @default 900
|
|
174
|
+
*/
|
|
175
|
+
cooldownSeconds?: number | undefined;
|
|
176
|
+
} | undefined;
|
|
177
|
+
/**
|
|
178
|
+
* Limit how often authentication operations can be performed
|
|
179
|
+
*/
|
|
180
|
+
velocity?: {
|
|
181
|
+
enabled: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Number of authentication requests per visitor in the window
|
|
184
|
+
* before a challenge or a block
|
|
185
|
+
*
|
|
186
|
+
* @default { challenge: 10, block: 20 }
|
|
187
|
+
*/
|
|
188
|
+
thresholds?: {
|
|
189
|
+
challenge: number;
|
|
190
|
+
block: number;
|
|
191
|
+
} | undefined;
|
|
192
|
+
/**
|
|
193
|
+
* Maximum sign-ups per visitor in the window
|
|
194
|
+
*
|
|
195
|
+
* @default 5
|
|
196
|
+
*/
|
|
197
|
+
maxSignupsPerVisitor?: number | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* Maximum password reset requests per IP address in the window
|
|
200
|
+
*
|
|
201
|
+
* @default 10
|
|
202
|
+
*/
|
|
203
|
+
maxPasswordResetsPerIp?: number | undefined;
|
|
204
|
+
/**
|
|
205
|
+
* Maximum sign-in attempts per IP address in the window
|
|
206
|
+
*
|
|
207
|
+
* @default 50
|
|
208
|
+
*/
|
|
209
|
+
maxSignInsPerIp?: number | undefined;
|
|
210
|
+
/**
|
|
211
|
+
* Window in seconds
|
|
212
|
+
*
|
|
213
|
+
* @default 3600
|
|
214
|
+
*/
|
|
215
|
+
windowSeconds?: number | undefined;
|
|
216
|
+
/**
|
|
217
|
+
* Action when a `max*` limit is exceeded
|
|
218
|
+
*
|
|
219
|
+
* @default "challenge"
|
|
220
|
+
*/
|
|
221
|
+
action?: SecurityAction | undefined;
|
|
222
|
+
} | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* Limit how many accounts a visitor can create
|
|
225
|
+
*/
|
|
226
|
+
freeTrialAbuse?: {
|
|
227
|
+
enabled: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Number of accounts a visitor already created before a
|
|
230
|
+
* challenge or a block. Takes precedence over
|
|
231
|
+
* `maxAccountsPerVisitor`.
|
|
232
|
+
*/
|
|
233
|
+
thresholds?: {
|
|
234
|
+
challenge: number;
|
|
235
|
+
block: number;
|
|
236
|
+
} | undefined;
|
|
237
|
+
/**
|
|
238
|
+
* Maximum accounts per visitor
|
|
239
|
+
*
|
|
240
|
+
* @default 3
|
|
241
|
+
*/
|
|
242
|
+
maxAccountsPerVisitor?: number | undefined;
|
|
243
|
+
/**
|
|
244
|
+
* How long sign-ups are remembered per visitor, in seconds.
|
|
245
|
+
* Clamped to between 1 and 365 days.
|
|
246
|
+
*
|
|
247
|
+
* @default 7776000 (90 days)
|
|
248
|
+
*/
|
|
249
|
+
retentionSeconds?: number | undefined;
|
|
250
|
+
/**
|
|
251
|
+
* Action when `maxAccountsPerVisitor` is reached
|
|
252
|
+
*
|
|
253
|
+
* @default "block"
|
|
254
|
+
*/
|
|
255
|
+
action?: SecurityAction | undefined;
|
|
256
|
+
} | undefined;
|
|
257
|
+
/**
|
|
258
|
+
* Detect automated clients. `true` challenges them.
|
|
259
|
+
*/
|
|
260
|
+
botBlocking?: (boolean | {
|
|
261
|
+
action: SecurityAction;
|
|
262
|
+
}) | undefined;
|
|
263
|
+
/**
|
|
264
|
+
* Detect requests from IP addresses known to be malicious. `true`
|
|
265
|
+
* blocks them.
|
|
266
|
+
*/
|
|
267
|
+
suspiciousIpBlocking?: (boolean | {
|
|
268
|
+
action: SecurityAction;
|
|
269
|
+
}) | undefined;
|
|
270
|
+
/**
|
|
271
|
+
* Proof-of-work difficulty, in leading zero bits of the solution hash
|
|
272
|
+
*
|
|
273
|
+
* @default 18
|
|
274
|
+
*/
|
|
275
|
+
/**
|
|
276
|
+
* Notify users when they sign in from a device they haven't used
|
|
277
|
+
* before, identified by the visitor id
|
|
278
|
+
*
|
|
279
|
+
* @default false
|
|
280
|
+
*/
|
|
281
|
+
unknownDeviceNotification?: boolean | undefined;
|
|
282
|
+
/**
|
|
283
|
+
* Detect sign-ins from locations too far apart to travel between in
|
|
284
|
+
* the time since the previous sign-in. Checked once the credentials
|
|
285
|
+
* are verified; a challenge blocks sign-ins that can't be repeated,
|
|
286
|
+
* like magic links and one-time codes.
|
|
287
|
+
*/
|
|
288
|
+
impossibleTravel?: {
|
|
289
|
+
enabled: boolean;
|
|
290
|
+
/**
|
|
291
|
+
* Fastest realistic travel speed, in km/h
|
|
292
|
+
*
|
|
293
|
+
* @default 1000
|
|
294
|
+
*/
|
|
295
|
+
maxSpeedKmh?: number | undefined;
|
|
296
|
+
/**
|
|
297
|
+
* @default "challenge"
|
|
298
|
+
*/
|
|
299
|
+
action?: SecurityAction | undefined;
|
|
300
|
+
} | undefined;
|
|
301
|
+
/**
|
|
302
|
+
* Challenge or block requests by country. Use either `allowList`
|
|
303
|
+
* or `denyList`.
|
|
304
|
+
*/
|
|
305
|
+
geoBlocking?: {
|
|
306
|
+
/**
|
|
307
|
+
* Only allow these countries (ISO 3166-1 alpha-2)
|
|
308
|
+
*/
|
|
309
|
+
allowList?: string[] | undefined;
|
|
310
|
+
/**
|
|
311
|
+
* Block these countries (ISO 3166-1 alpha-2)
|
|
312
|
+
*/
|
|
313
|
+
denyList?: string[] | undefined;
|
|
314
|
+
/**
|
|
315
|
+
* @default "block"
|
|
316
|
+
*/
|
|
317
|
+
action?: Exclude<SecurityAction, "log"> | undefined;
|
|
318
|
+
} | undefined;
|
|
319
|
+
/**
|
|
320
|
+
* Check new passwords against known breaches. Only the first 5
|
|
321
|
+
* characters of the password's SHA-1 hash are sent.
|
|
322
|
+
*/
|
|
323
|
+
compromisedPassword?: {
|
|
324
|
+
enabled: boolean;
|
|
325
|
+
/**
|
|
326
|
+
* @default "block"
|
|
327
|
+
*/
|
|
328
|
+
action?: SecurityAction | undefined;
|
|
329
|
+
/**
|
|
330
|
+
* Minimum number of breaches a password must appear in
|
|
331
|
+
*
|
|
332
|
+
* @default 1
|
|
333
|
+
*/
|
|
334
|
+
minBreachCount?: number | undefined;
|
|
335
|
+
} | undefined;
|
|
336
|
+
/**
|
|
337
|
+
* Reject disposable email addresses and invalid email domains on
|
|
338
|
+
* sign-up and email changes
|
|
339
|
+
*/
|
|
340
|
+
emailValidation?: {
|
|
341
|
+
enabled: boolean;
|
|
342
|
+
/**
|
|
343
|
+
* - `low`: block known disposable domains
|
|
344
|
+
* - `medium`: also require MX records
|
|
345
|
+
* - `high`: also reject addresses that look generated
|
|
346
|
+
*
|
|
347
|
+
* @default "medium"
|
|
348
|
+
*/
|
|
349
|
+
strictness?: ("low" | "medium" | "high") | undefined;
|
|
350
|
+
/**
|
|
351
|
+
* @default "block"
|
|
352
|
+
*/
|
|
353
|
+
action?: SecurityAction | undefined;
|
|
354
|
+
/**
|
|
355
|
+
* Domains that skip every check (exact match)
|
|
356
|
+
*/
|
|
357
|
+
domainAllowlist?: string[] | undefined;
|
|
358
|
+
} | undefined;
|
|
359
|
+
/**
|
|
360
|
+
* Match aliases of the same mailbox, e.g. `j.doe+news@gmail.com` and
|
|
361
|
+
* `jdoe@gmail.com`. Addresses are kept as typed; an alias of an
|
|
362
|
+
* existing account signs in to it and can't be used for a new one.
|
|
363
|
+
* Adds a `normalizedEmail` field to users, set for existing users on
|
|
364
|
+
* their next sign-in.
|
|
365
|
+
*/
|
|
366
|
+
emailNormalization?: {
|
|
367
|
+
/**
|
|
368
|
+
* @default false
|
|
369
|
+
*/
|
|
370
|
+
enabled?: boolean | undefined;
|
|
371
|
+
} | undefined;
|
|
372
|
+
/**
|
|
373
|
+
* Detect sign-ins to accounts that haven't been used for a long time.
|
|
374
|
+
* Checked once the credentials are verified. Accounts are tracked
|
|
375
|
+
* from their first sign-in after sentinel is enabled.
|
|
376
|
+
*/
|
|
377
|
+
staleUsers?: {
|
|
378
|
+
enabled: boolean;
|
|
379
|
+
/**
|
|
380
|
+
* Days of inactivity after which an account is stale
|
|
381
|
+
*
|
|
382
|
+
* @default 90
|
|
383
|
+
*/
|
|
384
|
+
staleDays?: number | undefined;
|
|
385
|
+
/**
|
|
386
|
+
* @default "log"
|
|
387
|
+
*/
|
|
388
|
+
action?: SecurityAction | undefined;
|
|
389
|
+
/**
|
|
390
|
+
* Notify the user through `sendNotification`
|
|
391
|
+
*
|
|
392
|
+
* @default false
|
|
393
|
+
*/
|
|
394
|
+
notifyUser?: boolean | undefined;
|
|
395
|
+
/**
|
|
396
|
+
* Notify `adminEmail` through `sendNotification`
|
|
397
|
+
*
|
|
398
|
+
* @default false
|
|
399
|
+
*/
|
|
400
|
+
notifyAdmin?: boolean | undefined;
|
|
401
|
+
/**
|
|
402
|
+
* Required when `notifyAdmin` is true
|
|
403
|
+
*/
|
|
404
|
+
adminEmail?: string | undefined;
|
|
405
|
+
} | undefined;
|
|
406
|
+
challengeDifficulty?: number | undefined;
|
|
407
|
+
} | undefined;
|
|
408
|
+
/**
|
|
409
|
+
* Custom schema for the sentinel plugin
|
|
410
|
+
*/
|
|
411
|
+
schema?: InferOptionSchema<typeof schema> | undefined;
|
|
412
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SecondaryStorage } from "@gatwech/core/db";
|
|
2
|
+
/**
|
|
3
|
+
* In-memory secondary storage for tests. Expiry follows `Date.now()`, so it
|
|
4
|
+
* works with faked timers. The atomic operations are optional, to test both
|
|
5
|
+
* code paths.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createMemorySecondaryStorage(options?: {
|
|
8
|
+
increment?: boolean;
|
|
9
|
+
getAndDelete?: boolean;
|
|
10
|
+
}): {
|
|
11
|
+
storage: SecondaryStorage;
|
|
12
|
+
/** Keys that currently hold a value */
|
|
13
|
+
keys: () => string[];
|
|
14
|
+
/** The TTL, in seconds, a key was last written with */
|
|
15
|
+
ttl: (key: string) => number | undefined;
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Password hashing without key derivation, for tests that sign in many times
|
|
3
|
+
* and don't test hashing itself. Each real hash takes a few hundred
|
|
4
|
+
* milliseconds, which adds up when test files run in parallel.
|
|
5
|
+
*/
|
|
6
|
+
export declare const fastPasswordHashing: {
|
|
7
|
+
hash(password: string): Promise<string>;
|
|
8
|
+
verify({ hash, password }: {
|
|
9
|
+
hash: string;
|
|
10
|
+
password: string;
|
|
11
|
+
}): Promise<boolean>;
|
|
12
|
+
};
|
|
@@ -2721,8 +2721,8 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
2721
2721
|
returnHeaders?: ReturnHeaders | undefined;
|
|
2722
2722
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
2723
2723
|
headers: Headers;
|
|
2724
|
-
response: import("packages/core/dist/index-
|
|
2725
|
-
} : import("packages/core/dist/index-
|
|
2724
|
+
response: import("packages/core/dist/index-Df0KhQRf.mjs").X;
|
|
2725
|
+
} : import("packages/core/dist/index-Df0KhQRf.mjs").X>;
|
|
2726
2726
|
options: {
|
|
2727
2727
|
method: "POST";
|
|
2728
2728
|
body: import("zod").ZodObject<{
|
|
@@ -2896,11 +2896,11 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
2896
2896
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
2897
2897
|
headers: Headers;
|
|
2898
2898
|
response: {
|
|
2899
|
-
user: import("packages/core/dist/index-
|
|
2899
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
2900
2900
|
data: Record<string, any>;
|
|
2901
2901
|
} | null;
|
|
2902
2902
|
} : {
|
|
2903
|
-
user: import("packages/core/dist/index-
|
|
2903
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
2904
2904
|
data: Record<string, any>;
|
|
2905
2905
|
} | null>;
|
|
2906
2906
|
options: {
|
|
@@ -5633,8 +5633,8 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
5633
5633
|
returnHeaders?: ReturnHeaders | undefined;
|
|
5634
5634
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
5635
5635
|
headers: Headers;
|
|
5636
|
-
response: import("packages/core/dist/index-
|
|
5637
|
-
} : import("packages/core/dist/index-
|
|
5636
|
+
response: import("packages/core/dist/index-Df0KhQRf.mjs").X;
|
|
5637
|
+
} : import("packages/core/dist/index-Df0KhQRf.mjs").X>;
|
|
5638
5638
|
options: {
|
|
5639
5639
|
method: "POST";
|
|
5640
5640
|
body: import("zod").ZodObject<{
|
|
@@ -5808,11 +5808,11 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
5808
5808
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
5809
5809
|
headers: Headers;
|
|
5810
5810
|
response: {
|
|
5811
|
-
user: import("packages/core/dist/index-
|
|
5811
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
5812
5812
|
data: Record<string, any>;
|
|
5813
5813
|
} | null;
|
|
5814
5814
|
} : {
|
|
5815
|
-
user: import("packages/core/dist/index-
|
|
5815
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
5816
5816
|
data: Record<string, any>;
|
|
5817
5817
|
} | null>;
|
|
5818
5818
|
options: {
|
|
@@ -8620,8 +8620,8 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
8620
8620
|
returnHeaders?: ReturnHeaders | undefined;
|
|
8621
8621
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
8622
8622
|
headers: Headers;
|
|
8623
|
-
response: import("packages/core/dist/index-
|
|
8624
|
-
} : import("packages/core/dist/index-
|
|
8623
|
+
response: import("packages/core/dist/index-Df0KhQRf.mjs").X;
|
|
8624
|
+
} : import("packages/core/dist/index-Df0KhQRf.mjs").X>;
|
|
8625
8625
|
options: {
|
|
8626
8626
|
method: "POST";
|
|
8627
8627
|
body: import("zod").ZodObject<{
|
|
@@ -8795,11 +8795,11 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
8795
8795
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
8796
8796
|
headers: Headers;
|
|
8797
8797
|
response: {
|
|
8798
|
-
user: import("packages/core/dist/index-
|
|
8798
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
8799
8799
|
data: Record<string, any>;
|
|
8800
8800
|
} | null;
|
|
8801
8801
|
} : {
|
|
8802
|
-
user: import("packages/core/dist/index-
|
|
8802
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
8803
8803
|
data: Record<string, any>;
|
|
8804
8804
|
} | null>;
|
|
8805
8805
|
options: {
|
|
@@ -11532,8 +11532,8 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
11532
11532
|
returnHeaders?: ReturnHeaders | undefined;
|
|
11533
11533
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
11534
11534
|
headers: Headers;
|
|
11535
|
-
response: import("packages/core/dist/index-
|
|
11536
|
-
} : import("packages/core/dist/index-
|
|
11535
|
+
response: import("packages/core/dist/index-Df0KhQRf.mjs").X;
|
|
11536
|
+
} : import("packages/core/dist/index-Df0KhQRf.mjs").X>;
|
|
11537
11537
|
options: {
|
|
11538
11538
|
method: "POST";
|
|
11539
11539
|
body: import("zod").ZodObject<{
|
|
@@ -11707,11 +11707,11 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
11707
11707
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
11708
11708
|
headers: Headers;
|
|
11709
11709
|
response: {
|
|
11710
|
-
user: import("packages/core/dist/index-
|
|
11710
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
11711
11711
|
data: Record<string, any>;
|
|
11712
11712
|
} | null;
|
|
11713
11713
|
} : {
|
|
11714
|
-
user: import("packages/core/dist/index-
|
|
11714
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
11715
11715
|
data: Record<string, any>;
|
|
11716
11716
|
} | null>;
|
|
11717
11717
|
options: {
|
|
@@ -14591,8 +14591,8 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
14591
14591
|
returnHeaders?: ReturnHeaders | undefined;
|
|
14592
14592
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
14593
14593
|
headers: Headers;
|
|
14594
|
-
response: import("packages/core/dist/index-
|
|
14595
|
-
} : import("packages/core/dist/index-
|
|
14594
|
+
response: import("packages/core/dist/index-Df0KhQRf.mjs").X;
|
|
14595
|
+
} : import("packages/core/dist/index-Df0KhQRf.mjs").X>;
|
|
14596
14596
|
options: {
|
|
14597
14597
|
method: "POST";
|
|
14598
14598
|
body: import("zod").ZodObject<{
|
|
@@ -14766,11 +14766,11 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
14766
14766
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
14767
14767
|
headers: Headers;
|
|
14768
14768
|
response: {
|
|
14769
|
-
user: import("packages/core/dist/index-
|
|
14769
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
14770
14770
|
data: Record<string, any>;
|
|
14771
14771
|
} | null;
|
|
14772
14772
|
} : {
|
|
14773
|
-
user: import("packages/core/dist/index-
|
|
14773
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
14774
14774
|
data: Record<string, any>;
|
|
14775
14775
|
} | null>;
|
|
14776
14776
|
options: {
|
|
@@ -17503,8 +17503,8 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
17503
17503
|
returnHeaders?: ReturnHeaders | undefined;
|
|
17504
17504
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
17505
17505
|
headers: Headers;
|
|
17506
|
-
response: import("packages/core/dist/index-
|
|
17507
|
-
} : import("packages/core/dist/index-
|
|
17506
|
+
response: import("packages/core/dist/index-Df0KhQRf.mjs").X;
|
|
17507
|
+
} : import("packages/core/dist/index-Df0KhQRf.mjs").X>;
|
|
17508
17508
|
options: {
|
|
17509
17509
|
method: "POST";
|
|
17510
17510
|
body: import("zod").ZodObject<{
|
|
@@ -17678,11 +17678,11 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
17678
17678
|
}): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
|
|
17679
17679
|
headers: Headers;
|
|
17680
17680
|
response: {
|
|
17681
|
-
user: import("packages/core/dist/index-
|
|
17681
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
17682
17682
|
data: Record<string, any>;
|
|
17683
17683
|
} | null;
|
|
17684
17684
|
} : {
|
|
17685
|
-
user: import("packages/core/dist/index-
|
|
17685
|
+
user: import("packages/core/dist/index-Df0KhQRf.mjs").Z;
|
|
17686
17686
|
data: Record<string, any>;
|
|
17687
17687
|
} | null>;
|
|
17688
17688
|
options: {
|
|
@@ -17844,6 +17844,6 @@ export declare function getTestInstance<O extends Partial<PayvoAuthOptions>, C e
|
|
|
17844
17844
|
cookieSetter: typeof setCookieToHeader;
|
|
17845
17845
|
customFetchImpl: (url: string | URL | Request, init?: RequestInit | undefined) => Promise<Response>;
|
|
17846
17846
|
sessionSetter: (headers: Headers) => (context: SuccessContext) => void;
|
|
17847
|
-
db: import("packages/core/dist/index-
|
|
17847
|
+
db: import("packages/core/dist/index-Df0KhQRf.mjs").nt<PayvoAuthOptions>;
|
|
17848
17848
|
runWithUser: (email: string, password: string, fn: (headers: Headers) => Promise<void> | void) => Promise<void>;
|
|
17849
17849
|
}>;
|