authhero 8.9.0 → 8.9.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 (36) hide show
  1. package/dist/assets/u/widget/index.esm.js +1 -1
  2. package/dist/authhero.cjs +85 -85
  3. package/dist/authhero.d.ts +246 -246
  4. package/dist/authhero.mjs +1837 -1770
  5. package/dist/stats.html +1 -1
  6. package/dist/tsconfig.types.tsbuildinfo +1 -1
  7. package/dist/types/authentication-flows/password.d.ts +10 -1
  8. package/dist/types/authentication-flows/passwordless.d.ts +6 -6
  9. package/dist/types/index.d.ts +246 -246
  10. package/dist/types/routes/auth-api/index.d.ts +30 -30
  11. package/dist/types/routes/auth-api/passwordless.d.ts +14 -14
  12. package/dist/types/routes/auth-api/revoke.d.ts +6 -6
  13. package/dist/types/routes/auth-api/token.d.ts +10 -10
  14. package/dist/types/routes/management-api/action-executions.d.ts +1 -1
  15. package/dist/types/routes/management-api/actions.d.ts +1 -1
  16. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  17. package/dist/types/routes/management-api/branding.d.ts +13 -13
  18. package/dist/types/routes/management-api/clients.d.ts +8 -8
  19. package/dist/types/routes/management-api/connections.d.ts +21 -21
  20. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  21. package/dist/types/routes/management-api/failed-events.d.ts +1 -1
  22. package/dist/types/routes/management-api/forms.d.ts +126 -126
  23. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  24. package/dist/types/routes/management-api/index.d.ts +214 -214
  25. package/dist/types/routes/management-api/log-streams.d.ts +6 -6
  26. package/dist/types/routes/management-api/logs.d.ts +3 -3
  27. package/dist/types/routes/management-api/organizations.d.ts +4 -4
  28. package/dist/types/routes/management-api/prompts.d.ts +4 -4
  29. package/dist/types/routes/management-api/tenants.d.ts +6 -6
  30. package/dist/types/routes/management-api/themes.d.ts +6 -6
  31. package/dist/types/routes/management-api/users.d.ts +2 -2
  32. package/dist/types/routes/universal-login/common.d.ts +14 -14
  33. package/dist/types/routes/universal-login/flow-api.d.ts +12 -12
  34. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  35. package/dist/types/routes/universal-login/index.d.ts +2 -2
  36. package/package.json +5 -5
@@ -1,7 +1,16 @@
1
1
  import { Context } from "hono";
2
- import { AuthParams, LoginSession } from "@authhero/adapter-interfaces";
2
+ import { AuthParams, LoginSession, User } from "@authhero/adapter-interfaces";
3
3
  import { EnrichedClient } from "../helpers/client";
4
4
  import { Bindings, GrantFlowUserResult, Variables } from "../types";
5
+ /**
6
+ * Clear the failed-login counter for a user. Failed logins are always
7
+ * recorded on the primary account (see {@link recordFailedLogin}), so this
8
+ * resolves the linked primary before clearing. Called on a successful
9
+ * password login and after a successful password reset — both are strong
10
+ * evidence the legitimate account owner is back in control, so a stale
11
+ * lockout shouldn't block them.
12
+ */
13
+ export declare function clearFailedLogins(data: Bindings["data"], tenantId: string, user: User): Promise<void>;
5
14
  export declare function passwordGrant(ctx: Context<{
6
15
  Bindings: Bindings;
7
16
  Variables: Variables;
@@ -367,7 +367,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
367
367
  active?: boolean | undefined;
368
368
  } | undefined;
369
369
  signup?: {
370
- status?: "optional" | "disabled" | "required" | undefined;
370
+ status?: "optional" | "required" | "disabled" | undefined;
371
371
  verification?: {
372
372
  active?: boolean | undefined;
373
373
  } | undefined;
@@ -384,7 +384,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
384
384
  active?: boolean | undefined;
385
385
  } | undefined;
386
386
  signup?: {
387
- status?: "optional" | "disabled" | "required" | undefined;
387
+ status?: "optional" | "required" | "disabled" | undefined;
388
388
  } | undefined;
389
389
  validation?: {
390
390
  max_length?: number | undefined;
@@ -401,7 +401,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
401
401
  active?: boolean | undefined;
402
402
  } | undefined;
403
403
  signup?: {
404
- status?: "optional" | "disabled" | "required" | undefined;
404
+ status?: "optional" | "required" | "disabled" | undefined;
405
405
  } | undefined;
406
406
  } | undefined;
407
407
  } | undefined;
@@ -414,7 +414,7 @@ export declare function passwordlessGrantUser(ctx: Context<{
414
414
  } | undefined;
415
415
  } | undefined;
416
416
  passkey_options?: {
417
- challenge_ui?: "both" | "autofill" | "button" | undefined;
417
+ challenge_ui?: "button" | "both" | "autofill" | undefined;
418
418
  local_enrollment_enabled?: boolean | undefined;
419
419
  progressive_enrollment_enabled?: boolean | undefined;
420
420
  } | undefined;
@@ -541,8 +541,8 @@ export declare function passwordlessGrantUser(ctx: Context<{
541
541
  } | undefined;
542
542
  authenticated_at?: string | undefined;
543
543
  };
544
- connectionType: "sms" | "email" | "username";
545
- authConnection: "sms" | "email" | "username";
544
+ connectionType: "username" | "email" | "sms";
545
+ authConnection: "username" | "email" | "sms";
546
546
  session_id: string | undefined;
547
547
  authParams: {
548
548
  client_id: string;