authhero 9.22.1 → 9.23.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/assets/u/widget/authhero-widget.esm.js +1 -1
- package/dist/assets/u/widget/index.esm.js +1 -1
- package/dist/assets/u/widget/p-91459994.entry.js +1 -0
- package/dist/authhero.cjs +142 -135
- package/dist/authhero.d.ts +220 -156
- package/dist/authhero.mjs +34371 -33668
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/passwordless.d.ts +3 -3
- package/dist/types/errors/signup-validation-error.d.ts +9 -0
- package/dist/types/generated/locale-types.d.ts +6 -0
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
- package/dist/types/helpers/prompt-partials.d.ts +5 -0
- package/dist/types/helpers/reserved-claims.d.ts +2 -2
- package/dist/types/helpers/tenant-export-import/manifest.d.ts +1 -1
- package/dist/types/hooks/codehooks.d.ts +4 -3
- package/dist/types/hooks/pagehooks.d.ts +2 -1
- package/dist/types/index.d.ts +210 -156
- package/dist/types/routes/auth-api/index.d.ts +32 -32
- package/dist/types/routes/auth-api/passwordless.d.ts +4 -4
- 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/actions.d.ts +3 -3
- package/dist/types/routes/management-api/branding.d.ts +5 -5
- package/dist/types/routes/management-api/client-grants.d.ts +9 -9
- package/dist/types/routes/management-api/clients.d.ts +8 -8
- package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
- package/dist/types/routes/management-api/email-templates.d.ts +20 -20
- package/dist/types/routes/management-api/emails.d.ts +2 -2
- package/dist/types/routes/management-api/failed-events.d.ts +3 -3
- 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/hooks.d.ts +4 -4
- package/dist/types/routes/management-api/index.d.ts +173 -119
- package/dist/types/routes/management-api/keys.d.ts +12 -12
- package/dist/types/routes/management-api/logs.d.ts +4 -4
- package/dist/types/routes/management-api/organizations.d.ts +6 -6
- package/dist/types/routes/management-api/prompts.d.ts +58 -4
- package/dist/types/routes/management-api/proxy-routes.d.ts +1 -1
- package/dist/types/routes/management-api/tenants.d.ts +6 -6
- package/dist/types/routes/management-api/users.d.ts +5 -5
- package/dist/types/routes/universal-login/common.d.ts +2 -2
- package/dist/types/routes/universal-login/flow-api.d.ts +4 -4
- package/dist/types/routes/universal-login/form-node.d.ts +4 -4
- package/dist/types/routes/universal-login/screens/signup.d.ts +44 -1
- package/dist/types/routes/universal-login/screens/types.d.ts +1 -1
- 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/dist/types/routes/universal-login/u2-widget-page.d.ts +13 -1
- package/dist/types/types/Hooks.d.ts +4 -0
- package/dist/types/types/Variables.d.ts +6 -0
- package/package.json +6 -6
- package/dist/assets/u/widget/p-dc0662ad.entry.js +0 -1
|
@@ -475,7 +475,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
475
475
|
custom_login_page_preview?: string | undefined;
|
|
476
476
|
form_template?: string | undefined;
|
|
477
477
|
addons?: Record<string, any> | undefined;
|
|
478
|
-
token_endpoint_auth_method?: "
|
|
478
|
+
token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt" | undefined;
|
|
479
479
|
client_metadata?: Record<string, string> | undefined;
|
|
480
480
|
hide_sign_up_disabled_error?: boolean | undefined;
|
|
481
481
|
mobile?: Record<string, any> | undefined;
|
|
@@ -561,8 +561,8 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
561
561
|
} | undefined;
|
|
562
562
|
authenticated_at?: string | undefined;
|
|
563
563
|
};
|
|
564
|
-
connectionType: "
|
|
565
|
-
authConnection: "
|
|
564
|
+
connectionType: "sms" | "email" | "username";
|
|
565
|
+
authConnection: "sms" | "email" | "username";
|
|
566
566
|
session_id: string | undefined;
|
|
567
567
|
authParams: {
|
|
568
568
|
audience?: string | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTTPException } from "hono/http-exception";
|
|
2
|
+
/**
|
|
3
|
+
* Flow-control error thrown by pre-user-registration hooks when submitted
|
|
4
|
+
* signup data fails custom validation.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SignupValidationError extends HTTPException {
|
|
7
|
+
readonly code: string;
|
|
8
|
+
constructor(code: string, message: string);
|
|
9
|
+
}
|
|
@@ -20,6 +20,12 @@ export interface CommonScreen {
|
|
|
20
20
|
termsOfServiceText: () => string;
|
|
21
21
|
termsShortText: () => string;
|
|
22
22
|
tryAgainText: () => string;
|
|
23
|
+
embeddedBrowserTitle: () => string;
|
|
24
|
+
embeddedBrowserText: (vars: {
|
|
25
|
+
browserName: string;
|
|
26
|
+
}) => string;
|
|
27
|
+
privateBrowsingTitle: () => string;
|
|
28
|
+
privateBrowsingText: () => string;
|
|
23
29
|
}
|
|
24
30
|
export interface CommonAccountScreen {
|
|
25
31
|
title: () => string;
|
|
@@ -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>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PromptPartials } from "@authhero/adapter-interfaces";
|
|
2
|
+
export declare const promptPartialPrompts: readonly ["signup", "signup-id", "signup-password", "login", "login-id", "login-password", "login-passwordless", "login-passwordless-sms-otp", "login-passwordless-email-code"];
|
|
3
|
+
export declare const MAX_PROMPT_PARTIAL_LENGTH = 100000;
|
|
4
|
+
export declare function isAllowedPromptPartialMappingTarget(target: string): boolean;
|
|
5
|
+
export declare function sanitizePromptPartials(partials: PromptPartials): PromptPartials;
|
|
@@ -14,9 +14,9 @@ export declare const USERINFO_RESERVED_CLAIMS: readonly ["iss", "sub", "aud", "e
|
|
|
14
14
|
* vendor/tenant for downstream APIs while `sub` stays `auth-service`.
|
|
15
15
|
* Client-bound mints keep `azp` locked (see below).
|
|
16
16
|
*/
|
|
17
|
-
export declare const SERVICE_TOKEN_RESERVED_CLAIMS: ("
|
|
17
|
+
export declare const SERVICE_TOKEN_RESERVED_CLAIMS: ("sid" | "client_id" | "scope" | "tenant_id" | "org_name" | "sub" | "exp" | "iat" | "org_id" | "iss" | "aud" | "auth_time" | "acr" | "amr" | "permissions" | "nbf" | "jti" | "act" | "requested_userinfo_claims" | "gty")[];
|
|
18
18
|
/** Client-bound mints: `azp` must stay the registered client id. */
|
|
19
|
-
export declare const CLIENT_SERVICE_TOKEN_RESERVED_CLAIMS: ("
|
|
19
|
+
export declare const CLIENT_SERVICE_TOKEN_RESERVED_CLAIMS: ("sid" | "client_id" | "scope" | "tenant_id" | "org_name" | "sub" | "exp" | "iat" | "org_id" | "iss" | "aud" | "auth_time" | "acr" | "amr" | "azp" | "permissions" | "nbf" | "jti" | "act" | "requested_userinfo_claims" | "gty")[];
|
|
20
20
|
export type AccessTokenReservedClaim = (typeof ACCESS_TOKEN_RESERVED_CLAIMS)[number];
|
|
21
21
|
export type IdTokenReservedClaim = (typeof ID_TOKEN_RESERVED_CLAIMS)[number];
|
|
22
22
|
/**
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
* - ephemeral / audit: sessions, refresh_tokens, codes, login_sessions,
|
|
9
9
|
* logs, action_executions, outbox_events, grants.
|
|
10
10
|
*/
|
|
11
|
-
export declare const EXPORT_ORDER: readonly ["tenants", "clients", "connections", "resource_servers", "roles", "organizations", "users", "passwords", "authentication_methods", "user_roles", "user_permissions", "role_permissions", "organization_connections", "user_organizations", "client_grants", "invites", "actions", "action_versions", "hook_code", "hooks", "flows", "forms", "themes", "branding", "prompt_settings", "universal_login_templates", "custom_text", "email_providers", "email_templates", "custom_domains", "log_streams", "migration_sources", "proxy_routes"];
|
|
11
|
+
export declare const EXPORT_ORDER: readonly ["tenants", "clients", "connections", "resource_servers", "roles", "organizations", "users", "passwords", "authentication_methods", "user_roles", "user_permissions", "role_permissions", "organization_connections", "user_organizations", "client_grants", "invites", "actions", "action_versions", "hook_code", "hooks", "flows", "forms", "themes", "branding", "prompt_settings", "prompt_partials", "universal_login_templates", "custom_text", "email_providers", "email_templates", "custom_domains", "log_streams", "migration_sources", "proxy_routes"];
|
|
12
12
|
export type ExportEntity = (typeof EXPORT_ORDER)[number];
|
|
@@ -77,7 +77,7 @@ export declare function replayApiCalls(apiCalls: Array<{
|
|
|
77
77
|
export type HandleCodeHookOutcome = {
|
|
78
78
|
result: ActionExecutionResult;
|
|
79
79
|
logs: CodeExecutionLog[];
|
|
80
|
-
/** True if
|
|
80
|
+
/** True if the executor recorded an API call that cancels the flow. */
|
|
81
81
|
denied: boolean;
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
@@ -90,8 +90,9 @@ export type HandleCodeHookOutcome = {
|
|
|
90
90
|
*
|
|
91
91
|
* Always returns an outcome — including a `code_not_found` / `execution_failed`
|
|
92
92
|
* outcome — so the caller can persist an `action_executions` record. It only
|
|
93
|
-
* throws for `api.access.deny
|
|
94
|
-
*
|
|
93
|
+
* throws for blocking API calls such as `api.access.deny` and
|
|
94
|
+
* `api.validation.error`, which surface as thrown `HTTPException`s from the
|
|
95
|
+
* replayed API call; callers that must abort the flow catch them.
|
|
95
96
|
*
|
|
96
97
|
* `idempotencyKey`, when set, is exposed to user code as `event.idempotency_key`.
|
|
97
98
|
* The outbox is at-least-once, so a retried hook event re-runs the code; authors
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Context } from "hono";
|
|
2
2
|
import { Bindings, Variables } from "../types";
|
|
3
3
|
import { LoginSession, User } from "@authhero/adapter-interfaces";
|
|
4
|
+
import { EnrichedClient } from "../helpers/client";
|
|
4
5
|
export declare function isPageHook(hook: any): hook is {
|
|
5
6
|
page_id: string;
|
|
6
7
|
enabled: boolean;
|
|
@@ -13,4 +14,4 @@ export declare function isPageHook(hook: any): hook is {
|
|
|
13
14
|
export declare function handlePageHook(ctx: Context<{
|
|
14
15
|
Bindings: Bindings;
|
|
15
16
|
Variables: Variables;
|
|
16
|
-
}>, page_id: string, loginSession: LoginSession, user: User, permission_required?: string): Promise<User | Response>;
|
|
17
|
+
}>, page_id: string, loginSession: LoginSession, user: User, permission_required?: string, client?: EnrichedClient): Promise<User | Response>;
|