authhero 5.19.0 → 5.21.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/assets/u/widget/index.esm.js +1 -1
- package/dist/authhero.cjs +2701 -107
- package/dist/authhero.d.ts +310 -77
- package/dist/authhero.mjs +7366 -7036
- package/dist/stats.html +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/common.d.ts +8 -0
- package/dist/types/authentication-flows/passwordless.d.ts +12 -3
- package/dist/types/authentication-flows/token-exchange.d.ts +19 -0
- package/dist/types/emails/defaults/BlockedAccount.d.ts +1 -0
- package/dist/types/emails/defaults/ChangePassword.d.ts +6 -0
- package/dist/types/emails/defaults/EnrollmentEmail.d.ts +1 -0
- package/dist/types/emails/defaults/MfaOobCode.d.ts +1 -0
- package/dist/types/emails/defaults/PasswordReset.d.ts +5 -0
- package/dist/types/emails/defaults/StolenCredentials.d.ts +1 -0
- package/dist/types/emails/index.d.ts +21 -1
- package/dist/types/helpers/client.d.ts +20 -0
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +2 -2
- package/dist/types/helpers/scopes-permissions.d.ts +1 -1
- package/dist/types/index.d.ts +243 -74
- package/dist/types/provisioning/index.d.ts +2 -0
- package/dist/types/provisioning/noop-provisioner.d.ts +11 -0
- package/dist/types/provisioning/provisioner.d.ts +25 -0
- package/dist/types/routes/auth-api/index.d.ts +129 -19
- package/dist/types/routes/auth-api/passwordless.d.ts +10 -10
- 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 +110 -0
- package/dist/types/routes/auth-api/well-known.d.ts +1 -1
- package/dist/types/routes/management-api/action-executions.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/client-grants.d.ts +8 -8
- package/dist/types/routes/management-api/clients.d.ts +7 -7
- package/dist/types/routes/management-api/custom-domains.d.ts +7 -7
- package/dist/types/routes/management-api/email-templates.d.ts +58 -1
- 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/hook-code.d.ts +2 -2
- package/dist/types/routes/management-api/index.d.ts +106 -49
- package/dist/types/routes/management-api/logs.d.ts +3 -3
- package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/tenants.d.ts +27 -0
- package/dist/types/routes/management-api/users.d.ts +2 -2
- package/dist/types/routes/universal-login/common.d.ts +38 -2
- package/dist/types/routes/universal-login/u2-index.d.ts +6 -6
- package/dist/types/routes/universal-login/u2-routes.d.ts +6 -6
- package/dist/types/types/AuthHeroConfig.d.ts +12 -0
- package/dist/types/types/GrantFlowResult.d.ts +8 -0
- package/dist/types/utils/jwks.d.ts +2 -2
- package/dist/types/utils/jwt.d.ts +4 -0
- package/package.json +5 -5
|
@@ -39,6 +39,14 @@ export interface CreateAuthTokensParams {
|
|
|
39
39
|
permissions?: string[];
|
|
40
40
|
grantType?: GrantType;
|
|
41
41
|
impersonatingUser?: User;
|
|
42
|
+
/**
|
|
43
|
+
* RFC 8693 §4.1 — when the token was minted via a delegated flow (e.g.
|
|
44
|
+
* token-exchange) where the *acting party* is a client rather than a user,
|
|
45
|
+
* pass its client_id here so the `act` claim records the actor.
|
|
46
|
+
*/
|
|
47
|
+
actClient?: {
|
|
48
|
+
client_id: string;
|
|
49
|
+
};
|
|
42
50
|
auth_time?: number;
|
|
43
51
|
/** Custom claims to add to the access token payload (cannot override reserved claims) */
|
|
44
52
|
customClaims?: Record<string, unknown>;
|
|
@@ -233,6 +233,15 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
233
233
|
} | null | undefined;
|
|
234
234
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
235
235
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
236
|
+
deployment_type?: "shared" | "wfp" | undefined;
|
|
237
|
+
provisioning_state?: "pending" | "ready" | "failed" | undefined;
|
|
238
|
+
provisioning_error?: string | undefined;
|
|
239
|
+
provisioning_state_changed_at?: string | undefined;
|
|
240
|
+
bundle_configuration?: string | undefined;
|
|
241
|
+
worker_version?: string | undefined;
|
|
242
|
+
worker_script_name?: string | undefined;
|
|
243
|
+
storage_kind?: "own_d1" | "existing_d1" | "shared_planetscale" | undefined;
|
|
244
|
+
d1_database_id?: string | undefined;
|
|
236
245
|
attack_protection?: {
|
|
237
246
|
breached_password_detection?: {
|
|
238
247
|
enabled?: boolean | undefined;
|
|
@@ -448,7 +457,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
448
457
|
custom_login_page_preview?: string | undefined;
|
|
449
458
|
form_template?: string | undefined;
|
|
450
459
|
addons?: Record<string, any> | undefined;
|
|
451
|
-
token_endpoint_auth_method?: "
|
|
460
|
+
token_endpoint_auth_method?: "client_secret_post" | "client_secret_basic" | "none" | "client_secret_jwt" | "private_key_jwt" | undefined;
|
|
452
461
|
client_metadata?: Record<string, string> | undefined;
|
|
453
462
|
hide_sign_up_disabled_error?: boolean | undefined;
|
|
454
463
|
mobile?: Record<string, any> | undefined;
|
|
@@ -531,8 +540,8 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
531
540
|
} | undefined;
|
|
532
541
|
authenticated_at?: string | undefined;
|
|
533
542
|
};
|
|
534
|
-
connectionType: "
|
|
535
|
-
authConnection: "
|
|
543
|
+
connectionType: "sms" | "email" | "username";
|
|
544
|
+
authConnection: "sms" | "email" | "username";
|
|
536
545
|
session_id: string | undefined;
|
|
537
546
|
authParams: {
|
|
538
547
|
client_id: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Context } from "hono";
|
|
2
|
+
import { z } from "@hono/zod-openapi";
|
|
3
|
+
import { Bindings, Variables, GrantFlowUserResult } from "../types";
|
|
4
|
+
export declare const TOKEN_EXCHANGE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:token-exchange";
|
|
5
|
+
export declare const tokenExchangeParamsSchema: z.ZodObject<{
|
|
6
|
+
grant_type: z.ZodLiteral<"urn:ietf:params:oauth:grant-type:token-exchange">;
|
|
7
|
+
client_id: z.ZodString;
|
|
8
|
+
client_secret: z.ZodOptional<z.ZodString>;
|
|
9
|
+
subject_token: z.ZodString;
|
|
10
|
+
subject_token_type: z.ZodLiteral<"urn:ietf:params:oauth:token-type:access_token">;
|
|
11
|
+
organization: z.ZodString;
|
|
12
|
+
audience: z.ZodOptional<z.ZodString>;
|
|
13
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type TokenExchangeParams = z.infer<typeof tokenExchangeParamsSchema>;
|
|
16
|
+
export declare function tokenExchangeGrant(ctx: Context<{
|
|
17
|
+
Bindings: Bindings;
|
|
18
|
+
Variables: Variables;
|
|
19
|
+
}>, params: TokenExchangeParams): Promise<GrantFlowUserResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BlockedAccount(): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legacy Auth0 template name. Same shape as `reset_email` — kept for
|
|
3
|
+
* Auth0-import compatibility. authhero never sends this; the active path is
|
|
4
|
+
* `reset_email` / `reset_email_by_code`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ChangePassword(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function EnrollmentEmail(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function MfaOobCode(): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function StolenCredentials(): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context } from "hono";
|
|
2
2
|
import { Bindings, Variables } from "../types";
|
|
3
|
-
import { AuthParams, User } from "@authhero/adapter-interfaces";
|
|
3
|
+
import { AuthParams, EmailTemplateName, User } from "@authhero/adapter-interfaces";
|
|
4
4
|
export type SendEmailParams = {
|
|
5
5
|
to: string;
|
|
6
6
|
subject: string;
|
|
@@ -68,3 +68,23 @@ export declare function sendInvitation(ctx: Context<{
|
|
|
68
68
|
Bindings: Bindings;
|
|
69
69
|
Variables: Variables;
|
|
70
70
|
}>, { to, invitationUrl, inviterName, organizationName, ttlSec, language, }: SendInvitationParams): Promise<void>;
|
|
71
|
+
export interface SendTestEmailParams {
|
|
72
|
+
to: string;
|
|
73
|
+
templateName: EmailTemplateName;
|
|
74
|
+
/** Optional override for the body — defaults to stored override or bundled default. */
|
|
75
|
+
body?: string;
|
|
76
|
+
/** Optional override for the subject — defaults to stored override or bundled default. */
|
|
77
|
+
subject?: string;
|
|
78
|
+
/** Optional override for the from address. */
|
|
79
|
+
from?: string;
|
|
80
|
+
language?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Send a test email using the provided body/subject (or the stored / bundled
|
|
84
|
+
* default), with realistic-looking sample data. Used by the admin UI's
|
|
85
|
+
* "Send test" button so customizations can be validated before saving.
|
|
86
|
+
*/
|
|
87
|
+
export declare function sendTestEmail(ctx: Context<{
|
|
88
|
+
Bindings: Bindings;
|
|
89
|
+
Variables: Variables;
|
|
90
|
+
}>, params: SendTestEmailParams): Promise<void>;
|
|
@@ -242,6 +242,26 @@ export declare const enrichedClientSchema: z.ZodObject<{
|
|
|
242
242
|
}, z.core.$strip>>>;
|
|
243
243
|
pushed_authorization_requests_supported: z.ZodOptional<z.ZodBoolean>;
|
|
244
244
|
authorization_response_iss_parameter_supported: z.ZodOptional<z.ZodBoolean>;
|
|
245
|
+
deployment_type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
246
|
+
shared: "shared";
|
|
247
|
+
wfp: "wfp";
|
|
248
|
+
}>>>;
|
|
249
|
+
provisioning_state: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
250
|
+
pending: "pending";
|
|
251
|
+
ready: "ready";
|
|
252
|
+
failed: "failed";
|
|
253
|
+
}>>>;
|
|
254
|
+
provisioning_error: z.ZodOptional<z.ZodString>;
|
|
255
|
+
provisioning_state_changed_at: z.ZodOptional<z.ZodString>;
|
|
256
|
+
bundle_configuration: z.ZodOptional<z.ZodString>;
|
|
257
|
+
worker_version: z.ZodOptional<z.ZodString>;
|
|
258
|
+
worker_script_name: z.ZodOptional<z.ZodString>;
|
|
259
|
+
storage_kind: z.ZodOptional<z.ZodEnum<{
|
|
260
|
+
own_d1: "own_d1";
|
|
261
|
+
existing_d1: "existing_d1";
|
|
262
|
+
shared_planetscale: "shared_planetscale";
|
|
263
|
+
}>>;
|
|
264
|
+
d1_database_id: z.ZodOptional<z.ZodString>;
|
|
245
265
|
attack_protection: z.ZodOptional<z.ZodObject<{
|
|
246
266
|
breached_password_detection: z.ZodOptional<z.ZodObject<{
|
|
247
267
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -23,11 +23,11 @@ export declare const dcrRequestSchema: z.ZodObject<{
|
|
|
23
23
|
grant_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
24
|
response_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
25
|
token_endpoint_auth_method: z.ZodOptional<z.ZodEnum<{
|
|
26
|
-
none: "none";
|
|
27
|
-
private_key_jwt: "private_key_jwt";
|
|
28
26
|
client_secret_post: "client_secret_post";
|
|
29
27
|
client_secret_basic: "client_secret_basic";
|
|
28
|
+
none: "none";
|
|
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>>;
|
|
@@ -13,7 +13,7 @@ interface ClientCredentialsScopesAndPermissionsParams extends BaseScopesAndPermi
|
|
|
13
13
|
userId?: never;
|
|
14
14
|
}
|
|
15
15
|
interface UserBasedScopesAndPermissionsParams extends BaseScopesAndPermissionsParams {
|
|
16
|
-
grantType?: GrantType.AuthorizationCode | GrantType.RefreshToken | GrantType.Password | GrantType.Passwordless | GrantType.OTP | undefined;
|
|
16
|
+
grantType?: GrantType.AuthorizationCode | GrantType.RefreshToken | GrantType.Password | GrantType.Passwordless | GrantType.OTP | GrantType.TokenExchange | undefined;
|
|
17
17
|
userId: string;
|
|
18
18
|
}
|
|
19
19
|
export type CalculateScopesAndPermissionsParams = ClientCredentialsScopesAndPermissionsParams | UserBasedScopesAndPermissionsParams;
|