Skip to content

Rate limits: make them filterable and log when they trigger #60

Open

Description

@bordoni

The auth rate limits are hard-coded, and nothing records when one triggers. When customers report "too many requests", there's no way to see which bucket stopped them or to tune it for a site behind a proxy or a support desk.

Fix

  • A filter per bucket on the policy TieredRateLimiter uses (limit and window), e.g. workos_rate_limit_policy( array $policy, string $bucket ). Defaults unchanged.
  • When a request is limited:
    • fire workos_rate_limited( string $bucket, string $subject_hash, int $retry_after );
    • write an activity-log entry with the bucket and a hashed subject, never the raw email or IP.
  • Document the buckets and their defaults in docs/.

Done when

  • The filter changes the limit a request sees.
  • A limited request fires the action once and logs once.
  • Tests cover both.

Activity

  1. added this to the 1.0.11 milestone on Oct 17, 2026
  2. added
    enhancementNew feature or request
    area: authAuthentication / AuthKit / Login Profiles
    on Oct 17, 2026
  3. modified the milestones: 1.0.11, 1.0.12 on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: authAuthentication / AuthKit / Login ProfilesenhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions