authhero 9.43.0 → 9.44.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.
Files changed (61) hide show
  1. package/dist/assets/u/widget/index.esm.js +1 -1
  2. package/dist/authhero.cjs +197 -163
  3. package/dist/authhero.d.ts +219 -215
  4. package/dist/authhero.mjs +11076 -11010
  5. package/dist/{mfa-C8qBEQeH.js → mfa-B0J_xOxl.js} +1 -1
  6. package/dist/{mfa-CVF4Wbdz.mjs → mfa-CX1JyNyV.mjs} +1 -1
  7. package/dist/{mfa-attempts-sV0Xs59R.mjs → mfa-attempts-BNf9KSrR.mjs} +3 -1
  8. package/dist/{mfa-attempts-CzGjIGzD.js → mfa-attempts-suDM5Cv-.js} +3 -3
  9. package/dist/{passkey-enrollment-CAb2zWEF.js → passkey-enrollment-D180Gog3.js} +1 -1
  10. package/dist/tsconfig.types.tsbuildinfo +1 -1
  11. package/dist/types/authentication-flows/passwordless.d.ts +2 -2
  12. package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
  13. package/dist/types/helpers/login-migration.d.ts +23 -2
  14. package/dist/types/helpers/reserved-claims.d.ts +2 -2
  15. package/dist/types/index.d.ts +219 -215
  16. package/dist/types/routes/auth-api/authorize.d.ts +13 -13
  17. package/dist/types/routes/auth-api/device.d.ts +21 -21
  18. package/dist/types/routes/auth-api/index.d.ts +69 -69
  19. package/dist/types/routes/auth-api/logout.d.ts +2 -2
  20. package/dist/types/routes/auth-api/oidc-logout.d.ts +3 -3
  21. package/dist/types/routes/auth-api/passwordless.d.ts +10 -10
  22. package/dist/types/routes/auth-api/register/index.d.ts +2 -2
  23. package/dist/types/routes/auth-api/revoke.d.ts +6 -6
  24. package/dist/types/routes/auth-api/token.d.ts +12 -12
  25. package/dist/types/routes/management-api/action-executions.d.ts +1 -1
  26. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  27. package/dist/types/routes/management-api/branding.d.ts +7 -3
  28. package/dist/types/routes/management-api/client-registration-tokens.d.ts +8 -8
  29. package/dist/types/routes/management-api/clients.d.ts +16 -16
  30. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  31. package/dist/types/routes/management-api/failed-events.d.ts +2 -2
  32. package/dist/types/routes/management-api/forms.d.ts +8 -8
  33. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  34. package/dist/types/routes/management-api/helpers.d.ts +1 -1
  35. package/dist/types/routes/management-api/index.d.ts +123 -119
  36. package/dist/types/routes/management-api/keys.d.ts +12 -12
  37. package/dist/types/routes/management-api/log-streams.d.ts +6 -6
  38. package/dist/types/routes/management-api/logs.d.ts +4 -4
  39. package/dist/types/routes/management-api/organizations.d.ts +4 -4
  40. package/dist/types/routes/management-api/prompts.d.ts +6 -6
  41. package/dist/types/routes/management-api/rollouts.d.ts +6 -6
  42. package/dist/types/routes/management-api/self-service-profiles.d.ts +8 -8
  43. package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
  44. package/dist/types/routes/management-api/tenant-operations.d.ts +5 -5
  45. package/dist/types/routes/management-api/tenants.d.ts +9 -9
  46. package/dist/types/routes/management-api/users.d.ts +20 -20
  47. package/dist/types/routes/saml/index.d.ts +10 -10
  48. package/dist/types/routes/saml/samlp.d.ts +10 -10
  49. package/dist/types/routes/universal-login/common.d.ts +2 -0
  50. package/dist/types/routes/universal-login/continue.d.ts +4 -4
  51. package/dist/types/routes/universal-login/dark-theme.d.ts +14 -2
  52. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  53. package/dist/types/routes/universal-login/impersonate.d.ts +4 -4
  54. package/dist/types/routes/universal-login/index.d.ts +8 -8
  55. package/dist/types/routes/universal-login/u2-index.d.ts +9 -9
  56. package/dist/types/routes/universal-login/u2-routes.d.ts +7 -7
  57. package/dist/types/routes/universal-login/u2-widget-page.d.ts +20 -2
  58. package/dist/types/routes/universal-login/universal-login-template.d.ts +5 -0
  59. package/dist/types/state-machines/login-session.d.ts +1 -1
  60. package/dist/types/strategies/apple.d.ts +1 -1
  61. package/package.json +7 -7
@@ -175,8 +175,8 @@ export declare function passwordlessGrantUser(ctx: Context<{
175
175
  authenticated_at?: string | undefined;
176
176
  tenant_id?: string | undefined;
177
177
  };
178
- connectionType: "email" | "username" | "sms";
179
- authConnection: "email" | "username" | "sms";
178
+ connectionType: "username" | "email" | "sms";
179
+ authConnection: "username" | "email" | "sms";
180
180
  session_id: string | undefined;
181
181
  authParams: {
182
182
  audience?: string | undefined;
@@ -24,10 +24,10 @@ export declare const dcrRequestSchema: z.ZodObject<{
24
24
  response_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
25
  token_endpoint_auth_method: z.ZodOptional<z.ZodEnum<{
26
26
  none: "none";
27
+ private_key_jwt: "private_key_jwt";
27
28
  client_secret_post: "client_secret_post";
28
29
  client_secret_basic: "client_secret_basic";
29
30
  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>>;
@@ -1,4 +1,4 @@
1
- import { Client, DataAdapters, Tenant } from "@authhero/adapter-interfaces";
1
+ import { Branding, Client, DataAdapters, Tenant } from "@authhero/adapter-interfaces";
2
2
  import { LoginRoutePrefix } from "./login-version";
3
3
  /**
4
4
  * Tooling for moving tenants from the classic login (/u) to the widget login
@@ -44,13 +44,34 @@ export interface SetTenantVersionResult {
44
44
  to?: string;
45
45
  /** Clients pinned to /u by a "1" override, which stay on /u. */
46
46
  pinned: string[];
47
+ /**
48
+ * Set when moving to /u2: the branding dark mode settings before the flip.
49
+ * The flip locks the tenant to light mode, since /u has no dark variant.
50
+ */
51
+ branding?: {
52
+ from: Pick<Branding, "dark_mode" | "dark_mode_toggle">;
53
+ to: Pick<Branding, "dark_mode" | "dark_mode_toggle">;
54
+ };
47
55
  }
56
+ /**
57
+ * Branding a tenant gets when it moves to /u2: light mode with the toggle
58
+ * hidden, so the login looks like it did on /u until someone checks a dark
59
+ * variant and turns the toggle on.
60
+ */
61
+ export declare const MIGRATED_TENANT_BRANDING: {
62
+ readonly dark_mode: "light";
63
+ readonly dark_mode_toggle: false;
64
+ };
48
65
  /**
49
66
  * Sets (or with `undefined`, removes) the tenant flag
50
67
  * `flags.universal_login_version`. Client overrides are left untouched.
51
68
  * Removing the flag restores the earlier routing only if the tenant had no
52
69
  * flag or "1" before; `from` in the result reports the previous value.
70
+ *
71
+ * Setting "2" also locks the tenant's branding to light mode and hides the
72
+ * dark mode toggle (`MIGRATED_TENANT_BRANDING`). Rolling back leaves the
73
+ * branding as is: /u ignores both settings.
53
74
  */
54
- export declare function setTenantLoginVersion(data: Pick<LoginMigrationData, "tenants" | "clients">, tenantId: string, version: "1" | "2" | undefined, { dryRun }?: {
75
+ export declare function setTenantLoginVersion(data: Pick<LoginMigrationData, "tenants" | "clients" | "branding">, tenantId: string, version: "1" | "2" | undefined, { dryRun }?: {
55
76
  dryRun?: boolean;
56
77
  }): Promise<SetTenantVersionResult>;
@@ -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: ("scope" | "client_id" | "sid" | "tenant_id" | "org_name" | "iss" | "sub" | "aud" | "exp" | "iat" | "auth_time" | "acr" | "amr" | "jti" | "permissions" | "org_id" | "gty" | "nbf" | "act" | "requested_userinfo_claims")[];
17
+ export declare const SERVICE_TOKEN_RESERVED_CLAIMS: ("scope" | "tenant_id" | "client_id" | "org_name" | "jti" | "sid" | "org_id" | "iss" | "sub" | "exp" | "iat" | "aud" | "auth_time" | "acr" | "amr" | "gty" | "nbf" | "act" | "permissions" | "requested_userinfo_claims")[];
18
18
  /** Client-bound mints: `azp` must stay the registered client id. */
19
- export declare const CLIENT_SERVICE_TOKEN_RESERVED_CLAIMS: ("scope" | "client_id" | "sid" | "tenant_id" | "org_name" | "iss" | "sub" | "aud" | "exp" | "iat" | "auth_time" | "acr" | "amr" | "azp" | "jti" | "permissions" | "org_id" | "gty" | "nbf" | "act" | "requested_userinfo_claims")[];
19
+ export declare const CLIENT_SERVICE_TOKEN_RESERVED_CLAIMS: ("scope" | "tenant_id" | "client_id" | "org_name" | "jti" | "sid" | "org_id" | "iss" | "sub" | "exp" | "iat" | "aud" | "auth_time" | "acr" | "amr" | "azp" | "gty" | "nbf" | "act" | "permissions" | "requested_userinfo_claims")[];
20
20
  export type AccessTokenReservedClaim = (typeof ACCESS_TOKEN_RESERVED_CLAIMS)[number];
21
21
  export type IdTokenReservedClaim = (typeof ID_TOKEN_RESERVED_CLAIMS)[number];
22
22
  /**