authhero 8.25.2 → 8.26.1
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 +116 -116
- package/dist/authhero.d.ts +165 -137
- package/dist/authhero.mjs +102 -87
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/passwordless.d.ts +4 -4
- 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 +136 -134
- package/dist/types/routes/auth-api/index.d.ts +24 -24
- package/dist/types/routes/auth-api/passwordless.d.ts +6 -6
- 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/auth-api/token.d.ts +10 -10
- package/dist/types/routes/management-api/action-executions.d.ts +1 -1
- package/dist/types/routes/management-api/action-triggers.d.ts +1 -1
- 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 +1 -1
- package/dist/types/routes/management-api/clients.d.ts +10 -10
- package/dist/types/routes/management-api/connections.d.ts +5 -5
- package/dist/types/routes/management-api/custom-domains.d.ts +8 -8
- package/dist/types/routes/management-api/email-templates.d.ts +18 -18
- 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/index.d.ts +99 -99
- 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 +6 -6
- 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-operations.d.ts +4 -4
- package/dist/types/routes/management-api/users.d.ts +2 -2
- package/dist/types/routes/universal-login/common.d.ts +4 -4
- package/dist/types/routes/universal-login/flow-api.d.ts +4 -4
- 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
|
@@ -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: "username" | "
|
|
553
|
-
authConnection: "username" | "
|
|
552
|
+
connectionType: "username" | "email" | "sms";
|
|
553
|
+
authConnection: "username" | "email" | "sms";
|
|
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>>;
|