authhero 8.25.2 → 8.26.0
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/dist/authhero.cjs +115 -115
- package/dist/authhero.d.ts +148 -120
- package/dist/authhero.mjs +55 -46
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/passwordless.d.ts +7 -7
- package/dist/types/helpers/codes-cleanup.d.ts +28 -0
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
- package/dist/types/index.d.ts +119 -117
- package/dist/types/routes/auth-api/index.d.ts +20 -20
- package/dist/types/routes/auth-api/passwordless.d.ts +12 -12
- package/dist/types/routes/auth-api/register/index.d.ts +2 -2
- package/dist/types/routes/auth-api/revoke.d.ts +6 -6
- package/dist/types/routes/management-api/action-executions.d.ts +2 -2
- package/dist/types/routes/management-api/actions.d.ts +1 -1
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/branding.d.ts +9 -9
- package/dist/types/routes/management-api/clients.d.ts +16 -16
- package/dist/types/routes/management-api/connections.d.ts +20 -20
- package/dist/types/routes/management-api/failed-events.d.ts +1 -1
- package/dist/types/routes/management-api/guardian.d.ts +5 -5
- package/dist/types/routes/management-api/helpers.d.ts +1 -1
- package/dist/types/routes/management-api/hook-code.d.ts +2 -2
- package/dist/types/routes/management-api/index.d.ts +90 -90
- package/dist/types/routes/management-api/log-streams.d.ts +6 -6
- package/dist/types/routes/management-api/logs.d.ts +4 -4
- package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
- package/dist/types/routes/management-api/organizations.d.ts +5 -5
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/roles.d.ts +1 -1
- package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
- package/dist/types/routes/management-api/tenants.d.ts +5 -5
- package/dist/types/routes/management-api/themes.d.ts +6 -6
- package/dist/types/routes/management-api/users.d.ts +2 -2
- package/dist/types/routes/universal-login/common.d.ts +14 -14
- package/dist/types/routes/universal-login/identifier.d.ts +2 -2
- package/dist/types/routes/universal-login/index.d.ts +2 -2
- package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
- package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
- package/package.json +6 -6
|
@@ -367,7 +367,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
367
367
|
active?: boolean | undefined;
|
|
368
368
|
} | undefined;
|
|
369
369
|
signup?: {
|
|
370
|
-
status?: "
|
|
370
|
+
status?: "required" | "optional" | "disabled" | undefined;
|
|
371
371
|
verification?: {
|
|
372
372
|
active?: boolean | undefined;
|
|
373
373
|
} | undefined;
|
|
@@ -384,7 +384,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
384
384
|
active?: boolean | undefined;
|
|
385
385
|
} | undefined;
|
|
386
386
|
signup?: {
|
|
387
|
-
status?: "
|
|
387
|
+
status?: "required" | "optional" | "disabled" | undefined;
|
|
388
388
|
} | undefined;
|
|
389
389
|
validation?: {
|
|
390
390
|
max_length?: number | undefined;
|
|
@@ -401,7 +401,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
401
401
|
active?: boolean | undefined;
|
|
402
402
|
} | undefined;
|
|
403
403
|
signup?: {
|
|
404
|
-
status?: "
|
|
404
|
+
status?: "required" | "optional" | "disabled" | undefined;
|
|
405
405
|
} | undefined;
|
|
406
406
|
} | undefined;
|
|
407
407
|
} | undefined;
|
|
@@ -414,7 +414,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
414
414
|
} | undefined;
|
|
415
415
|
} | undefined;
|
|
416
416
|
passkey_options?: {
|
|
417
|
-
challenge_ui?: "
|
|
417
|
+
challenge_ui?: "both" | "autofill" | "button" | undefined;
|
|
418
418
|
local_enrollment_enabled?: boolean | undefined;
|
|
419
419
|
progressive_enrollment_enabled?: boolean | undefined;
|
|
420
420
|
} | undefined;
|
|
@@ -466,7 +466,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
466
466
|
custom_login_page_preview?: string | undefined;
|
|
467
467
|
form_template?: string | undefined;
|
|
468
468
|
addons?: Record<string, any> | undefined;
|
|
469
|
-
token_endpoint_auth_method?: "none" | "
|
|
469
|
+
token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt" | undefined;
|
|
470
470
|
client_metadata?: Record<string, string> | undefined;
|
|
471
471
|
hide_sign_up_disabled_error?: boolean | undefined;
|
|
472
472
|
mobile?: Record<string, any> | undefined;
|
|
@@ -549,8 +549,8 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
549
549
|
} | undefined;
|
|
550
550
|
authenticated_at?: string | undefined;
|
|
551
551
|
};
|
|
552
|
-
connectionType: "
|
|
553
|
-
authConnection: "
|
|
552
|
+
connectionType: "sms" | "email" | "username";
|
|
553
|
+
authConnection: "sms" | "email" | "username";
|
|
554
554
|
session_id: string | undefined;
|
|
555
555
|
authParams: {
|
|
556
556
|
client_id: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CodesAdapter } from "@authhero/adapter-interfaces";
|
|
2
|
+
export interface CodesCleanupParams {
|
|
3
|
+
/**
|
|
4
|
+
* Grace period, in days, to keep codes past their expiry. Defaults to 1.
|
|
5
|
+
*
|
|
6
|
+
* Codes are dead the moment they expire, so this is not a retention policy
|
|
7
|
+
* so much as a safety margin against clock skew — and it keeps recently
|
|
8
|
+
* expired codes around briefly for debugging a failed flow.
|
|
9
|
+
*/
|
|
10
|
+
retentionDays?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Delete codes that expired more than the retention window ago.
|
|
14
|
+
* Intended for use in a scheduled handler / cron job.
|
|
15
|
+
*
|
|
16
|
+
* Codes are short-lived by design but nothing else prunes them, so without a
|
|
17
|
+
* scheduled call to this the table grows without bound. See the Data Retention
|
|
18
|
+
* deployment guide for the full set of tables that need sweeping.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* // Cloudflare Workers scheduled handler
|
|
23
|
+
* async scheduled(_event, env) {
|
|
24
|
+
* await cleanupCodes(dataAdapter.codes, { retentionDays: 1 });
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function cleanupCodes(codes: CodesAdapter, params?: CodesCleanupParams): Promise<number>;
|
|
@@ -24,10 +24,10 @@ export declare const dcrRequestSchema: z.ZodObject<{
|
|
|
24
24
|
response_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
25
|
token_endpoint_auth_method: z.ZodOptional<z.ZodEnum<{
|
|
26
26
|
none: "none";
|
|
27
|
-
private_key_jwt: "private_key_jwt";
|
|
28
27
|
client_secret_post: "client_secret_post";
|
|
29
28
|
client_secret_basic: "client_secret_basic";
|
|
30
29
|
client_secret_jwt: "client_secret_jwt";
|
|
30
|
+
private_key_jwt: "private_key_jwt";
|
|
31
31
|
}>>;
|
|
32
32
|
jwks_uri: z.ZodOptional<z.ZodString>;
|
|
33
33
|
jwks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|