LifeMate — Personal, Family & Learning Companion

test/android-reminder-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 27 lines 1.79 KB
Rendered Raw
1 # LifeGuide — authentication limits behind a shared family connection
2
3 The production middleware currently sends every `/v1/auth/` request into the
4 same IP bucket (10 requests per 600 seconds). Capability discovery, session
5 refresh and logout therefore consume the budget for login and recovery. Three
6 independent clients sharing a home/public IP can receive 429 while reopening.
7
8 Only literal `GET /v1/auth/capabilities` uses the existing bounded general
9 budget (120/60). Only literal `POST /v1/auth/refresh` and
10 `POST /v1/auth/logout` share a separate IP session budget (60/600), configured
11 through `RATE_LIMIT_SESSION_MAX` and `RATE_LIMIT_SESSION_WINDOW_SECONDS`.
12 Other authentication methods/paths retain the strict 10/600 budget, including
13 case variants and trailing/nested paths that Express may otherwise match.
14 Authentication/token validation, hashed refresh storage and rotation remain
15 unchanged. Public health and OPTIONS behavior and the pinned-proxy allowlist
16 remain unchanged. This does not implement a distributed limiter or per-account
17 quotas; multiple processes still have their existing independent IP buckets.
18
19 Acceptance uses one uninterrupted real production entrypoint, default limits,
20 synthetic PostgreSQL and three independent users on the same loopback IP. Twelve
21 capability GETs precede real login; at least twelve successful refreshes rotate
22 tokens and invalidate old proofs independently checked in PostgreSQL. Ten strict
23 requests are accepted by the limiter, and the eleventh is 429 with Retry-After.
24 Wrong methods/near paths and forged forwarding headers cannot escape that
25 bucket. Session request 61 is 429; both session paths share the limit. Capabilities
26 remain bounded by the real general bucket. No bucket reset, fake clock, live
27 server restart, global quota increase or disabled middleware is used.