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.
Files changed (65) hide show
  1. package/dist/authhero.cjs +116 -116
  2. package/dist/authhero.d.ts +298 -297
  3. package/dist/authhero.mjs +34211 -33944
  4. package/dist/tsconfig.types.tsbuildinfo +1 -1
  5. package/dist/types/authentication-flows/password.d.ts +6 -0
  6. package/dist/types/authentication-flows/passwordless.d.ts +5 -5
  7. package/dist/types/generated/locale-types.d.ts +1 -0
  8. package/dist/types/helpers/reserved-claims.d.ts +2 -2
  9. package/dist/types/helpers/session-notice.d.ts +17 -0
  10. package/dist/types/index.d.ts +298 -297
  11. package/dist/types/routes/auth-api/index.d.ts +29 -29
  12. package/dist/types/routes/auth-api/logout.d.ts +2 -2
  13. package/dist/types/routes/auth-api/oidc-logout.d.ts +3 -3
  14. package/dist/types/routes/auth-api/passwordless.d.ts +8 -8
  15. package/dist/types/routes/auth-api/revoke.d.ts +6 -6
  16. package/dist/types/routes/auth-api/token.d.ts +10 -10
  17. package/dist/types/routes/management-api/branding.d.ts +3 -3
  18. package/dist/types/routes/management-api/clients.d.ts +8 -8
  19. package/dist/types/routes/management-api/connections.d.ts +7 -7
  20. package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
  21. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  22. package/dist/types/routes/management-api/failed-events.d.ts +3 -2
  23. package/dist/types/routes/management-api/forms.d.ts +144 -144
  24. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  25. package/dist/types/routes/management-api/helpers.d.ts +26 -4
  26. package/dist/types/routes/management-api/index.d.ts +248 -247
  27. package/dist/types/routes/management-api/keys.d.ts +12 -12
  28. package/dist/types/routes/management-api/logs.d.ts +4 -4
  29. package/dist/types/routes/management-api/organizations.d.ts +1 -1
  30. package/dist/types/routes/management-api/prompts.d.ts +6 -6
  31. package/dist/types/routes/management-api/roles.d.ts +1 -1
  32. package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
  33. package/dist/types/routes/management-api/tenants.d.ts +3 -3
  34. package/dist/types/routes/management-api/users.d.ts +26 -26
  35. package/dist/types/routes/saml/index.d.ts +6 -6
  36. package/dist/types/routes/saml/samlp.d.ts +6 -6
  37. package/dist/types/routes/universal-login/common.d.ts +10 -10
  38. package/dist/types/routes/universal-login/continue.d.ts +2 -2
  39. package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
  40. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  41. package/dist/types/routes/universal-login/impersonate.d.ts +4 -4
  42. package/dist/types/routes/universal-login/index.d.ts +8 -8
  43. package/dist/types/routes/universal-login/screens/account-mfa-phone-enrollment.d.ts +0 -5
  44. package/dist/types/routes/universal-login/screens/account-mfa-totp-enrollment.d.ts +0 -5
  45. package/dist/types/routes/universal-login/screens/account-passkeys.d.ts +0 -5
  46. package/dist/types/routes/universal-login/screens/connect-tenant-select.d.ts +0 -10
  47. package/dist/types/routes/universal-login/screens/identifier.d.ts +0 -5
  48. package/dist/types/routes/universal-login/screens/login.d.ts +0 -8
  49. package/dist/types/routes/universal-login/screens/mfa-login-options.d.ts +0 -5
  50. package/dist/types/routes/universal-login/screens/mfa-phone-challenge.d.ts +0 -5
  51. package/dist/types/routes/universal-login/screens/mfa-phone-enrollment.d.ts +0 -5
  52. package/dist/types/routes/universal-login/screens/mfa-totp-challenge.d.ts +0 -5
  53. package/dist/types/routes/universal-login/screens/mfa-totp-enrollment.d.ts +0 -5
  54. package/dist/types/routes/universal-login/screens/passkey-challenge.d.ts +0 -14
  55. package/dist/types/routes/universal-login/screens/passkey-enrollment-nudge.d.ts +0 -15
  56. package/dist/types/routes/universal-login/screens/passkey-enrollment.d.ts +0 -9
  57. package/dist/types/routes/universal-login/screens/reset-password-code.d.ts +0 -9
  58. package/dist/types/routes/universal-login/screens/reset-password.d.ts +2 -6
  59. package/dist/types/routes/universal-login/u2-index.d.ts +7 -7
  60. package/dist/types/routes/universal-login/u2-routes.d.ts +7 -7
  61. package/dist/types/state-machines/index.d.ts +3 -1
  62. package/dist/types/state-machines/login-session-data.d.ts +19 -0
  63. package/dist/types/state-machines/login-session.d.ts +67 -3
  64. package/dist/types/state-machines/password-reset.d.ts +46 -0
  65. 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" | "ready" | "failed" | undefined;
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?: "never" | "always" | undefined;
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?: "code" | "link" | undefined;
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: "sms" | "email" | "username";
565
- authConnection: "sms" | "email" | "username";
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: ("client_id" | "sub" | "sid" | "tenant_id" | "org_name" | "scope" | "exp" | "iat" | "org_id" | "iss" | "aud" | "auth_time" | "acr" | "amr" | "permissions" | "nbf" | "jti" | "act" | "requested_userinfo_claims" | "gty")[];
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: ("client_id" | "sub" | "sid" | "tenant_id" | "org_name" | "scope" | "exp" | "iat" | "org_id" | "iss" | "aud" | "auth_time" | "acr" | "amr" | "azp" | "permissions" | "nbf" | "jti" | "act" | "requested_userinfo_claims" | "gty")[];
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>;