Skip to content

fix(auth): remove sign-in discovery rate limits - #5498

Merged
pandemicsyn merged 2 commits into
mainfrom
fix/sign-in-discovery-missing-rate-limits
Aug 26, 2026
Merged

fix(auth): remove sign-in discovery rate limits#5498
pandemicsyn merged 2 commits into
mainfrom
fix/sign-in-discovery-missing-rate-limits

Conversation

@pandemicsyn

@pandemicsyn pandemicsyn commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the IP and normalized-email Vercel Firewall checks added to /api/sso/organizations by feat(auth): add email-first sign-in #5453.
  • Prevent legitimate email-first and SSO sign-ins from receiving discovery 429 responses.
  • Retain Turnstile verification before provider or SSO discovery, along with existing magic-link and account-creation rate limits.

Verification

  • Not manually tested against production because this change must be deployed before production can exercise the updated route. The focused route suite covers normal discovery and confirms Turnstile remains required.

Visual Changes

N/A

Reviewer Notes

Production telemetry showed legitimate discovery requests receiving 429 responses after the new sign-in-discovery-ip and sign-in-discovery-email policies were enabled. This removes only those two discovery limits; the pre-existing magic-link-email limit, signup IP limits, and Turnstile gate remain unchanged.

After deployment, the two now-unused Vercel Firewall rules can be removed.

Automated checks run locally:

  • pnpm --filter web test apps/web/src/app/api/sso/organizations/route.test.ts --runInBand (14 tests)
  • pnpm --filter web typecheck
  • pnpm --filter web lint
  • git diff --check

@kilo-code-bot

kilo-code-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • apps/web/src/app/api/sso/organizations/route.ts
  • apps/web/src/app/api/sso/organizations/route.test.ts
Previous Review Summary (commit 45b260f)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 45b260f)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • apps/web/src/app/api/sso/organizations/route.ts
  • apps/web/src/app/api/sso/organizations/route.test.ts

Reviewed by grok-4.6 · Input: 38K · Output: 4.8K · Cached: 190.5K

Review guidance: REVIEW.md from base branch main

@pandemicsyn pandemicsyn changed the title fix(auth): tolerate missing discovery rate limits fix(auth): remove sign-in discovery rate limits Aug 26, 2026
@pandemicsyn
pandemicsyn merged commit 53714b0 into main Aug 26, 2026
12 checks passed
@pandemicsyn
pandemicsyn deleted the fix/sign-in-discovery-missing-rate-limits branch August 26, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants