authhero 5.16.0 → 5.17.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 +70 -70
- package/dist/authhero.d.ts +315 -265
- package/dist/authhero.mjs +4304 -4265
- package/dist/stats.html +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/passwordless.d.ts +2 -2
- package/dist/types/emails/defaults/Layout.d.ts +1 -1
- package/dist/types/emails/defaults/PrimaryButton.d.ts +1 -1
- package/dist/types/emails/defaults/ResetEmail.d.ts +1 -1
- package/dist/types/emails/defaults/ResetEmailByCode.d.ts +1 -1
- package/dist/types/emails/defaults/UserInvitation.d.ts +1 -1
- package/dist/types/emails/defaults/VerifyEmail.d.ts +1 -1
- package/dist/types/emails/defaults/VerifyEmailByCode.d.ts +1 -1
- package/dist/types/emails/defaults/WelcomeEmail.d.ts +1 -1
- package/dist/types/index.d.ts +239 -238
- package/dist/types/middlewares/authentication.d.ts +17 -0
- package/dist/types/routes/auth-api/authorize.d.ts +12 -12
- package/dist/types/routes/auth-api/index.d.ts +54 -54
- package/dist/types/routes/auth-api/oidc-logout.d.ts +3 -3
- package/dist/types/routes/auth-api/passwordless.d.ts +18 -18
- package/dist/types/routes/auth-api/token.d.ts +21 -21
- 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 +8 -8
- package/dist/types/routes/management-api/connections.d.ts +1 -1
- package/dist/types/routes/management-api/email-templates.d.ts +14 -14
- package/dist/types/routes/management-api/failed-events.d.ts +1 -1
- package/dist/types/routes/management-api/forms.d.ts +119 -119
- package/dist/types/routes/management-api/guardian.d.ts +5 -5
- package/dist/types/routes/management-api/index.d.ts +169 -169
- 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/organizations.d.ts +2 -2
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/themes.d.ts +3 -3
- 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/continue.d.ts +2 -2
- package/dist/types/routes/universal-login/flow-api.d.ts +12 -12
- package/dist/types/routes/universal-login/identifier.d.ts +2 -2
- package/dist/types/routes/universal-login/impersonate.d.ts +4 -4
- package/dist/types/routes/universal-login/index.d.ts +8 -8
- package/dist/types/routes/universal-login/u2-index.d.ts +7 -7
- package/dist/types/routes/universal-login/u2-routes.d.ts +7 -7
- package/dist/types/types/AuthHeroConfig.d.ts +33 -0
- package/dist/types/types/Hooks.d.ts +1 -1
- package/dist/types/types/IdToken.d.ts +1 -1
- package/dist/types/types/Variables.d.ts +1 -0
- package/package.json +3 -3
|
@@ -170,7 +170,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
170
170
|
$get: {
|
|
171
171
|
input: {
|
|
172
172
|
param: {
|
|
173
|
-
screen: "signup" | "
|
|
173
|
+
screen: "signup" | "account" | "login" | "reset-password" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
174
174
|
};
|
|
175
175
|
} & {
|
|
176
176
|
query: {
|
|
@@ -186,7 +186,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
186
186
|
} | {
|
|
187
187
|
input: {
|
|
188
188
|
param: {
|
|
189
|
-
screen: "signup" | "
|
|
189
|
+
screen: "signup" | "account" | "login" | "reset-password" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
190
190
|
};
|
|
191
191
|
} & {
|
|
192
192
|
query: {
|
|
@@ -198,11 +198,11 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
198
198
|
};
|
|
199
199
|
output: {};
|
|
200
200
|
outputFormat: string;
|
|
201
|
-
status:
|
|
201
|
+
status: 302;
|
|
202
202
|
} | {
|
|
203
203
|
input: {
|
|
204
204
|
param: {
|
|
205
|
-
screen: "signup" | "
|
|
205
|
+
screen: "signup" | "account" | "login" | "reset-password" | "enter-password" | "impersonate" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
|
|
206
206
|
};
|
|
207
207
|
} & {
|
|
208
208
|
query: {
|
|
@@ -214,7 +214,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
214
214
|
};
|
|
215
215
|
output: {};
|
|
216
216
|
outputFormat: string;
|
|
217
|
-
status:
|
|
217
|
+
status: 400;
|
|
218
218
|
};
|
|
219
219
|
};
|
|
220
220
|
} & {
|
|
@@ -254,7 +254,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
254
254
|
};
|
|
255
255
|
output: {};
|
|
256
256
|
outputFormat: string;
|
|
257
|
-
status:
|
|
257
|
+
status: 302;
|
|
258
258
|
} | {
|
|
259
259
|
input: {
|
|
260
260
|
param: {
|
|
@@ -272,7 +272,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
272
272
|
};
|
|
273
273
|
output: {};
|
|
274
274
|
outputFormat: string;
|
|
275
|
-
status:
|
|
275
|
+
status: 400;
|
|
276
276
|
};
|
|
277
277
|
};
|
|
278
278
|
}, "/">;
|
|
@@ -3,6 +3,7 @@ import type { RolePermissionHooks, Hooks } from "./Hooks";
|
|
|
3
3
|
import type { SamlSigner } from "@authhero/saml/core";
|
|
4
4
|
import type { OpenAPIHono } from "@hono/zod-openapi";
|
|
5
5
|
import type { Handler } from "hono";
|
|
6
|
+
import type { ManagementAudienceResolver } from "../middlewares/authentication";
|
|
6
7
|
import { EntityHooks } from "./Hooks";
|
|
7
8
|
/**
|
|
8
9
|
* Parameters passed to a custom webhook invoker function.
|
|
@@ -426,4 +427,36 @@ export interface AuthHeroConfig {
|
|
|
426
427
|
* @default "control-plane"
|
|
427
428
|
*/
|
|
428
429
|
signingKeyMode?: SigningKeyModeOption;
|
|
430
|
+
/**
|
|
431
|
+
* Relax the management API audience check from a hard 403 to a
|
|
432
|
+
* `console.warn`. Tokens issued for any other audience will still be
|
|
433
|
+
* accepted as long as they carry a matching scope/permission string.
|
|
434
|
+
*
|
|
435
|
+
* TRANSITIONAL: enable only while migrating clients to request the
|
|
436
|
+
* `urn:authhero:management` audience. Watch the warn logs to identify
|
|
437
|
+
* the remaining offenders, then flip this back off — the audience check
|
|
438
|
+
* is a defense-in-depth control against tokens minted with
|
|
439
|
+
* attacker-chosen scopes for an unregistered audience.
|
|
440
|
+
*
|
|
441
|
+
* @default false
|
|
442
|
+
*/
|
|
443
|
+
relaxManagementAudience?: boolean;
|
|
444
|
+
/**
|
|
445
|
+
* Resolver returning the list of audiences accepted by the management
|
|
446
|
+
* API audience check **in addition to** the built-in
|
|
447
|
+
* `urn:authhero:management`. The token's `tenant_id` is passed in, so a
|
|
448
|
+
* per-tenant identifier can be constructed at request time alongside any
|
|
449
|
+
* global legacy identifiers.
|
|
450
|
+
*
|
|
451
|
+
* The default audience is always accepted; the resolver is purely additive.
|
|
452
|
+
*
|
|
453
|
+
* @example
|
|
454
|
+
* ```ts
|
|
455
|
+
* additionalManagementAudiences: ({ tenant_id }) => [
|
|
456
|
+
* "https://token.example.com/v2/api/",
|
|
457
|
+
* `https://${tenant_id}.token.example.com/v2/api/`,
|
|
458
|
+
* ];
|
|
459
|
+
* ```
|
|
460
|
+
*/
|
|
461
|
+
additionalManagementAudiences?: ManagementAudienceResolver;
|
|
429
462
|
}
|
|
@@ -18,9 +18,9 @@ export declare const idTokenSchema: z.ZodObject<{
|
|
|
18
18
|
c_hash: z.ZodOptional<z.ZodString>;
|
|
19
19
|
}, z.core.$loose>;
|
|
20
20
|
export declare const userInfoSchema: z.ZodObject<{
|
|
21
|
+
sub: z.ZodString;
|
|
21
22
|
name: z.ZodOptional<z.ZodString>;
|
|
22
23
|
email: z.ZodOptional<z.ZodString>;
|
|
23
|
-
sub: z.ZodString;
|
|
24
24
|
given_name: z.ZodOptional<z.ZodString>;
|
|
25
25
|
family_name: z.ZodOptional<z.ZodString>;
|
|
26
26
|
iss: z.ZodString;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/markusahlstrand/authhero"
|
|
13
13
|
},
|
|
14
|
-
"version": "5.
|
|
14
|
+
"version": "5.17.1",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"vite": "^8.0.14",
|
|
63
63
|
"vite-plugin-dts": "^4.5.4",
|
|
64
64
|
"vitest": "^4.1.7",
|
|
65
|
-
"@authhero/kysely-adapter": "11.5.
|
|
65
|
+
"@authhero/kysely-adapter": "11.5.4",
|
|
66
66
|
"@authhero/widget": "0.32.33"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"sanitize-html": "^2.17.4",
|
|
83
83
|
"xstate": "^5.31.1",
|
|
84
84
|
"@authhero/adapter-interfaces": "2.10.0",
|
|
85
|
-
"@authhero/proxy": "0.
|
|
85
|
+
"@authhero/proxy": "0.4.0",
|
|
86
86
|
"@authhero/saml": "0.4.1"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|