LifeMate — Personal, Family & Learning Companion

test/personal-recovery-acceptance
chore/phase1-repository-cleanup deploy/stable-web-apk deployment-static design/mobile-accessibility-v2 design/mobile-navigation-review docs/child-education-access-decision docs/offline-data-rescue-options docs/owner-guide-and-delivery-plan docs/phase1-policy-options docs/public-review-live-2026-10-15 feat/aparat-learning-library feat/child-device-safety feat/child-identity-schema feat/flutter-mobile-navigation feat/learning-content-operations feat/local-signing-preflight feat/online-family-stage0 feat/personal-encrypted-recovery feat/private-planner-series-api feat/public-review-page feat/standalone-weekly-planner feat/weekly-planner-android final-feature-1/iran-family-school fix/auth-abuse-expiry-safety fix/auth-expiry-after-lock fix/backend-request-safety fix/lifeguide-bootstrap-naming-ci fix/lifeguide-pages-qa-base-preflight fix/lifeguide-qa-pages-env-deployment fix/local-task-persistence fix/managed-child-session-boundary fix/personal-jalali-dates fix/personal-notification-controls fix/personal-upgrade-delivery-guard fix/sms-approval-gates fix/study-duration-display infra/cloudflare-neon-migration infra/lifeguide-cloudflare-qa infra/lifeguide-github-pages-qa infra/lifeguide-supabase-qa main phase-1/foundation-completion phase-2/product-foundation-identity phase-3/planner-school-family-core phase-4/ai-learning-wellbeing phase-5/hardening-observability-release test/android-reminder-acceptance test/personal-notification-settings test/personal-recovery-acceptance test/role-entry-apk
md 1.79 KB

LifeGuide — authentication limits behind a shared family connection

The production middleware currently sends every /v1/auth/ request into the same IP bucket (10 requests per 600 seconds). Capability discovery, session refresh and logout therefore consume the budget for login and recovery. Three independent clients sharing a home/public IP can receive 429 while reopening.

Only literal GET /v1/auth/capabilities uses the existing bounded general budget (120/60). Only literal POST /v1/auth/refresh and POST /v1/auth/logout share a separate IP session budget (60/600), configured through RATE_LIMIT_SESSION_MAX and RATE_LIMIT_SESSION_WINDOW_SECONDS. Other authentication methods/paths retain the strict 10/600 budget, including case variants and trailing/nested paths that Express may otherwise match. Authentication/token validation, hashed refresh storage and rotation remain unchanged. Public health and OPTIONS behavior and the pinned-proxy allowlist remain unchanged. This does not implement a distributed limiter or per-account quotas; multiple processes still have their existing independent IP buckets.

Acceptance uses one uninterrupted real production entrypoint, default limits, synthetic PostgreSQL and three independent users on the same loopback IP. Twelve capability GETs precede real login; at least twelve successful refreshes rotate tokens and invalidate old proofs independently checked in PostgreSQL. Ten strict requests are accepted by the limiter, and the eleventh is 429 with Retry-After. Wrong methods/near paths and forged forwarding headers cannot escape that bucket. Session request 61 is 429; both session paths share the limit. Capabilities remain bounded by the real general bucket. No bucket reset, fake clock, live server restart, global quota increase or disabled middleware is used.