authhero 5.20.0 → 5.21.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/index.esm.js +1 -1
- package/dist/authhero.cjs +101 -101
- package/dist/authhero.d.ts +168 -102
- package/dist/authhero.mjs +8703 -8635
- package/dist/stats.html +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/common.d.ts +1 -1
- package/dist/types/authentication-flows/passwordless.d.ts +12 -3
- package/dist/types/helpers/client.d.ts +23 -3
- package/dist/types/helpers/logging.d.ts +7 -0
- package/dist/types/index.d.ts +98 -96
- 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 +12 -12
- package/dist/types/routes/auth-api/passwordless.d.ts +10 -10
- package/dist/types/routes/auth-api/well-known.d.ts +2 -2
- 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/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/custom-domains.d.ts +7 -7
- package/dist/types/routes/management-api/email-templates.d.ts +35 -35
- package/dist/types/routes/management-api/emails.d.ts +2 -2
- 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 +72 -72
- package/dist/types/routes/management-api/logs.d.ts +3 -3
- package/dist/types/routes/management-api/organizations.d.ts +4 -4
- package/dist/types/routes/management-api/prompts.d.ts +4 -4
- package/dist/types/routes/management-api/tenants.d.ts +33 -6
- package/dist/types/routes/management-api/users.d.ts +2 -2
- package/dist/types/routes/universal-login/common.d.ts +48 -12
- 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/index.d.ts +4 -4
- package/dist/types/routes/universal-login/u2-form-node.d.ts +2 -2
- package/dist/types/routes/universal-login/u2-index.d.ts +8 -8
- package/dist/types/routes/universal-login/u2-routes.d.ts +6 -6
- package/dist/types/types/AuthHeroConfig.d.ts +12 -0
- package/dist/types/utils/email.d.ts +2 -0
- package/dist/types/utils/jwks.d.ts +4 -4
- package/package.json +5 -5
|
@@ -165,7 +165,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
165
165
|
$get: {
|
|
166
166
|
input: {
|
|
167
167
|
param: {
|
|
168
|
-
screen: "signup" | "
|
|
168
|
+
screen: "signup" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "account" | "try-connection-result" | "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";
|
|
169
169
|
};
|
|
170
170
|
} & {
|
|
171
171
|
query: {
|
|
@@ -181,7 +181,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
181
181
|
} | {
|
|
182
182
|
input: {
|
|
183
183
|
param: {
|
|
184
|
-
screen: "signup" | "
|
|
184
|
+
screen: "signup" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "account" | "try-connection-result" | "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";
|
|
185
185
|
};
|
|
186
186
|
} & {
|
|
187
187
|
query: {
|
|
@@ -197,7 +197,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
197
197
|
} | {
|
|
198
198
|
input: {
|
|
199
199
|
param: {
|
|
200
|
-
screen: "signup" | "
|
|
200
|
+
screen: "signup" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "account" | "try-connection-result" | "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";
|
|
201
201
|
};
|
|
202
202
|
} & {
|
|
203
203
|
query: {
|
|
@@ -217,7 +217,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
217
217
|
$post: {
|
|
218
218
|
input: {
|
|
219
219
|
param: {
|
|
220
|
-
screen: "signup" | "
|
|
220
|
+
screen: "signup" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "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";
|
|
221
221
|
};
|
|
222
222
|
} & {
|
|
223
223
|
query: {
|
|
@@ -235,7 +235,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
235
235
|
} | {
|
|
236
236
|
input: {
|
|
237
237
|
param: {
|
|
238
|
-
screen: "signup" | "
|
|
238
|
+
screen: "signup" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "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";
|
|
239
239
|
};
|
|
240
240
|
} & {
|
|
241
241
|
query: {
|
|
@@ -253,7 +253,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
253
253
|
} | {
|
|
254
254
|
input: {
|
|
255
255
|
param: {
|
|
256
|
-
screen: "signup" | "
|
|
256
|
+
screen: "signup" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "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";
|
|
257
257
|
};
|
|
258
258
|
} & {
|
|
259
259
|
query: {
|
|
@@ -285,7 +285,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
285
285
|
};
|
|
286
286
|
output: {};
|
|
287
287
|
outputFormat: string;
|
|
288
|
-
status:
|
|
288
|
+
status: 404;
|
|
289
289
|
} | {
|
|
290
290
|
input: {
|
|
291
291
|
param: {
|
|
@@ -299,7 +299,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
299
299
|
};
|
|
300
300
|
output: {};
|
|
301
301
|
outputFormat: string;
|
|
302
|
-
status:
|
|
302
|
+
status: 200;
|
|
303
303
|
};
|
|
304
304
|
};
|
|
305
305
|
} & {
|
|
@@ -170,7 +170,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
170
170
|
$get: {
|
|
171
171
|
input: {
|
|
172
172
|
param: {
|
|
173
|
-
screen: "signup" | "
|
|
173
|
+
screen: "signup" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "account" | "try-connection-result" | "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" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "account" | "try-connection-result" | "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: {
|
|
@@ -202,7 +202,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
202
202
|
} | {
|
|
203
203
|
input: {
|
|
204
204
|
param: {
|
|
205
|
-
screen: "signup" | "
|
|
205
|
+
screen: "signup" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "reset-password/request" | "reset-password/code" | "account" | "try-connection-result" | "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: {
|
|
@@ -222,7 +222,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
222
222
|
$post: {
|
|
223
223
|
input: {
|
|
224
224
|
param: {
|
|
225
|
-
screen: "signup" | "
|
|
225
|
+
screen: "signup" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "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";
|
|
226
226
|
};
|
|
227
227
|
} & {
|
|
228
228
|
query: {
|
|
@@ -240,7 +240,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
240
240
|
} | {
|
|
241
241
|
input: {
|
|
242
242
|
param: {
|
|
243
|
-
screen: "signup" | "
|
|
243
|
+
screen: "signup" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "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";
|
|
244
244
|
};
|
|
245
245
|
} & {
|
|
246
246
|
query: {
|
|
@@ -258,7 +258,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
258
258
|
} | {
|
|
259
259
|
input: {
|
|
260
260
|
param: {
|
|
261
|
-
screen: "signup" | "
|
|
261
|
+
screen: "signup" | "login" | "reset-password" | "consent" | "enter-password" | "impersonate" | "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";
|
|
262
262
|
};
|
|
263
263
|
} & {
|
|
264
264
|
query: {
|
|
@@ -5,6 +5,7 @@ import type { OpenAPIHono } from "@hono/zod-openapi";
|
|
|
5
5
|
import type { Handler } from "hono";
|
|
6
6
|
import type { ManagementAudienceResolver } from "../middlewares/authentication";
|
|
7
7
|
import { EntityHooks } from "./Hooks";
|
|
8
|
+
import type { TenantProvisioner } from "../provisioning";
|
|
8
9
|
/**
|
|
9
10
|
* Parameters passed to a custom webhook invoker function.
|
|
10
11
|
*/
|
|
@@ -317,6 +318,17 @@ export interface AuthHeroConfig {
|
|
|
317
318
|
/** Per-request timeout for the sync POST (default: 10_000ms). */
|
|
318
319
|
timeoutMs?: number;
|
|
319
320
|
};
|
|
321
|
+
/**
|
|
322
|
+
* Optional tenant provisioner. Drives a tenant from
|
|
323
|
+
* `provisioning_state: "pending"` to `"ready"` or `"failed"` whenever a
|
|
324
|
+
* tenant is created or re-provisioned via the management API. For shared
|
|
325
|
+
* tenants this is effectively a no-op; for `wfp` tenants the provisioner
|
|
326
|
+
* uploads the worker to a Cloudflare dispatch namespace, creates any
|
|
327
|
+
* per-tenant D1, and wires bindings. When omitted, `NoopTenantProvisioner`
|
|
328
|
+
* is used — adequate for single-deployment installs where every tenant is
|
|
329
|
+
* `shared`.
|
|
330
|
+
*/
|
|
331
|
+
provisioner?: TenantProvisioner;
|
|
320
332
|
/**
|
|
321
333
|
* Optional powered-by logo to display at the bottom left of the login widget.
|
|
322
334
|
* This is only configurable in code, not stored in the database.
|
|
@@ -9,8 +9,8 @@ import { SigningKeyModeOption } from "../types/AuthHeroConfig";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function getJwksFromDatabase(data: DataAdapters): Promise<{
|
|
11
11
|
alg: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "HS256" | "HS384" | "HS512";
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
kty: "EC" | "RSA" | "oct";
|
|
13
|
+
kid?: string | undefined;
|
|
14
14
|
use?: "sig" | "enc" | undefined;
|
|
15
15
|
n?: string | undefined;
|
|
16
16
|
e?: string | undefined;
|
|
@@ -28,8 +28,8 @@ export declare function getJwksFromDatabase(data: DataAdapters): Promise<{
|
|
|
28
28
|
*/
|
|
29
29
|
export declare function getJwksForPublication(data: DataAdapters, tenantId: string, modeOption: SigningKeyModeOption | undefined): Promise<{
|
|
30
30
|
alg: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "HS256" | "HS384" | "HS512";
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
kty: "EC" | "RSA" | "oct";
|
|
32
|
+
kid?: string | undefined;
|
|
33
33
|
use?: "sig" | "enc" | undefined;
|
|
34
34
|
n?: string | undefined;
|
|
35
35
|
e?: string | undefined;
|
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.21.1",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
@@ -62,8 +62,8 @@
|
|
|
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.
|
|
66
|
-
"@authhero/widget": "0.32.
|
|
65
|
+
"@authhero/kysely-adapter": "11.8.1",
|
|
66
|
+
"@authhero/widget": "0.32.38"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@peculiar/x509": "^1.14.0",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"qrcode": "^1.5.4",
|
|
82
82
|
"sanitize-html": "^2.17.4",
|
|
83
83
|
"xstate": "^5.31.1",
|
|
84
|
-
"@authhero/adapter-interfaces": "2.
|
|
85
|
-
"@authhero/proxy": "0.4.
|
|
84
|
+
"@authhero/adapter-interfaces": "2.13.1",
|
|
85
|
+
"@authhero/proxy": "0.4.4",
|
|
86
86
|
"@authhero/saml": "0.4.1"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|