authhero 9.24.0 → 9.24.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 +298 -297
- package/dist/authhero.mjs +34211 -33944
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/password.d.ts +6 -0
- package/dist/types/authentication-flows/passwordless.d.ts +5 -5
- package/dist/types/generated/locale-types.d.ts +1 -0
- package/dist/types/helpers/reserved-claims.d.ts +2 -2
- package/dist/types/helpers/session-notice.d.ts +17 -0
- package/dist/types/index.d.ts +298 -297
- package/dist/types/routes/auth-api/index.d.ts +29 -29
- package/dist/types/routes/auth-api/logout.d.ts +2 -2
- package/dist/types/routes/auth-api/oidc-logout.d.ts +3 -3
- package/dist/types/routes/auth-api/passwordless.d.ts +8 -8
- 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/branding.d.ts +3 -3
- package/dist/types/routes/management-api/clients.d.ts +8 -8
- package/dist/types/routes/management-api/connections.d.ts +7 -7
- package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
- package/dist/types/routes/management-api/email-templates.d.ts +18 -18
- package/dist/types/routes/management-api/failed-events.d.ts +3 -2
- package/dist/types/routes/management-api/forms.d.ts +144 -144
- package/dist/types/routes/management-api/guardian.d.ts +5 -5
- package/dist/types/routes/management-api/helpers.d.ts +26 -4
- package/dist/types/routes/management-api/index.d.ts +248 -247
- 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 +1 -1
- package/dist/types/routes/management-api/prompts.d.ts +6 -6
- package/dist/types/routes/management-api/roles.d.ts +1 -1
- package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
- package/dist/types/routes/management-api/tenants.d.ts +3 -3
- package/dist/types/routes/management-api/users.d.ts +26 -26
- package/dist/types/routes/saml/index.d.ts +6 -6
- package/dist/types/routes/saml/samlp.d.ts +6 -6
- package/dist/types/routes/universal-login/common.d.ts +10 -10
- package/dist/types/routes/universal-login/continue.d.ts +2 -2
- package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
- 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/screens/account-mfa-phone-enrollment.d.ts +0 -5
- package/dist/types/routes/universal-login/screens/account-mfa-totp-enrollment.d.ts +0 -5
- package/dist/types/routes/universal-login/screens/account-passkeys.d.ts +0 -5
- package/dist/types/routes/universal-login/screens/connect-tenant-select.d.ts +0 -10
- package/dist/types/routes/universal-login/screens/identifier.d.ts +0 -5
- package/dist/types/routes/universal-login/screens/login.d.ts +0 -8
- package/dist/types/routes/universal-login/screens/mfa-login-options.d.ts +0 -5
- package/dist/types/routes/universal-login/screens/mfa-phone-challenge.d.ts +0 -5
- package/dist/types/routes/universal-login/screens/mfa-phone-enrollment.d.ts +0 -5
- package/dist/types/routes/universal-login/screens/mfa-totp-challenge.d.ts +0 -5
- package/dist/types/routes/universal-login/screens/mfa-totp-enrollment.d.ts +0 -5
- package/dist/types/routes/universal-login/screens/passkey-challenge.d.ts +0 -14
- package/dist/types/routes/universal-login/screens/passkey-enrollment-nudge.d.ts +0 -15
- package/dist/types/routes/universal-login/screens/passkey-enrollment.d.ts +0 -9
- package/dist/types/routes/universal-login/screens/reset-password-code.d.ts +0 -9
- package/dist/types/routes/universal-login/screens/reset-password.d.ts +2 -6
- 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/state-machines/index.d.ts +3 -1
- package/dist/types/state-machines/login-session-data.d.ts +19 -0
- package/dist/types/state-machines/login-session.d.ts +67 -3
- package/dist/types/state-machines/password-reset.d.ts +46 -0
- package/package.json +2 -2
|
@@ -19,6 +19,12 @@ export declare function clearFailedLogins(data: Bindings["data"], tenantId: stri
|
|
|
19
19
|
* best-effort — the password is already changed by the time this runs.
|
|
20
20
|
*/
|
|
21
21
|
export declare function recordPasswordReset(data: Bindings["data"], tenantId: string, user: User): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* The password has already changed. Failure to persist the completion notice or
|
|
24
|
+
* flow state must not turn that successful change into a reported failure.
|
|
25
|
+
* The credential was consumed before the password write and remains single-use.
|
|
26
|
+
*/
|
|
27
|
+
export declare function recordPasswordResetCompletion(data: Bindings["data"], tenantId: string, loginSessionId: string, requestId: string, fields?: Omit<Partial<LoginSession>, "state_data">): Promise<void>;
|
|
22
28
|
export declare function passwordGrant(ctx: Context<{
|
|
23
29
|
Bindings: Bindings;
|
|
24
30
|
Variables: Variables;
|
|
@@ -239,7 +239,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
239
239
|
pushed_authorization_requests_supported?: boolean | undefined;
|
|
240
240
|
authorization_response_iss_parameter_supported?: boolean | undefined;
|
|
241
241
|
deployment_type?: "shared" | "wfp" | undefined;
|
|
242
|
-
provisioning_state?: "pending" | "
|
|
242
|
+
provisioning_state?: "pending" | "failed" | "ready" | undefined;
|
|
243
243
|
provisioning_error?: string | undefined;
|
|
244
244
|
provisioning_state_changed_at?: string | undefined;
|
|
245
245
|
bundle_configuration?: string | undefined;
|
|
@@ -287,7 +287,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
287
287
|
} | undefined;
|
|
288
288
|
} | undefined;
|
|
289
289
|
mfa?: {
|
|
290
|
-
policy?: "
|
|
290
|
+
policy?: "always" | "never" | undefined;
|
|
291
291
|
factors?: {
|
|
292
292
|
sms: boolean;
|
|
293
293
|
otp: boolean;
|
|
@@ -386,7 +386,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
|
|
|
386
386
|
} | undefined;
|
|
387
387
|
unique?: boolean | undefined;
|
|
388
388
|
profile_required?: boolean | undefined;
|
|
389
|
-
verification_method?: "
|
|
389
|
+
verification_method?: "link" | "code" | undefined;
|
|
390
390
|
} | undefined;
|
|
391
391
|
username?: {
|
|
392
392
|
identifier?: {
|
|
@@ -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: "username" | "email" | "sms";
|
|
565
|
+
authConnection: "username" | "email" | "sms";
|
|
566
566
|
session_id: string | undefined;
|
|
567
567
|
authParams: {
|
|
568
568
|
audience?: string | undefined;
|
|
@@ -527,6 +527,7 @@ export interface LoginPasswordScreen {
|
|
|
527
527
|
sessionExpired: () => string;
|
|
528
528
|
tooManyRequests: () => string;
|
|
529
529
|
unexpectedError: () => string;
|
|
530
|
+
passwordResetSuccess: () => string;
|
|
530
531
|
}
|
|
531
532
|
export interface LoginPasswordlessScreen {
|
|
532
533
|
authMethodEmail: () => string;
|
|
@@ -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: ("sub" | "tenant_id" | "client_id" | "org_name" | "scope" | "permissions" | "org_id" | "sid" | "exp" | "iat" | "iss" | "aud" | "auth_time" | "acr" | "amr" | "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: ("sub" | "tenant_id" | "client_id" | "org_name" | "scope" | "permissions" | "org_id" | "sid" | "exp" | "iat" | "iss" | "aud" | "auth_time" | "acr" | "amr" | "azp" | "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
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DataAdapters, LoginSession } from "@authhero/adapter-interfaces";
|
|
2
|
+
/** Key under `state_data` holding a one-shot notice for the next screen. */
|
|
3
|
+
export declare const SESSION_NOTICE_STATE_KEY = "notice";
|
|
4
|
+
/**
|
|
5
|
+
* Notices a flow can leave on the login session for the screen the user lands
|
|
6
|
+
* on next. Stored as a code, never as text, so the screen translates it at
|
|
7
|
+
* render time and a language switch still shows it in the right language.
|
|
8
|
+
*/
|
|
9
|
+
export type SessionNotice = "password_reset_success";
|
|
10
|
+
export declare function readSessionNotice(loginSession?: LoginSession | null): SessionNotice | undefined;
|
|
11
|
+
export declare function setSessionNotice(data: DataAdapters, tenantId: string, loginSession: LoginSession, notice: SessionNotice): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Drops the notice once the user has moved past the screen it was meant for.
|
|
14
|
+
* Written as "" when nothing else is left in `state_data`: adapters skip
|
|
15
|
+
* `undefined` properties on update, so omitting the column would leave it be.
|
|
16
|
+
*/
|
|
17
|
+
export declare function clearSessionNotice(data: DataAdapters, tenantId: string, loginSession: LoginSession): Promise<void>;
|