refactor(services): extract auth module and isolate server rate limiter#1624
Merged
OneStepAt4time merged 3 commits intodevelopfrom Apr 10, 2026
Merged
refactor(services): extract auth module and isolate server rate limiter#1624OneStepAt4time merged 3 commits intodevelopfrom
OneStepAt4time merged 3 commits intodevelopfrom
Conversation
Move auth implementation into src/services/auth, introduce shared RateLimiter, and keep src/auth.ts as compatibility re-export. Refs: #1614 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
114d8ff to
b8a6d1f
Compare
Apply IP throttling to hook-secret, metrics-token, SSE-token auth success paths, and the public /v1/auth/verify endpoint so all authorization flows are covered. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reintroduced checkIpRateLimit/checkAuthFailRateLimit helper functions as delegates to the extracted RateLimiter service so server auth flow callsites remain consistent while preserving the auth-service extraction. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements issue #1614 by extracting auth concerns into a dedicated service module and isolating route rate-limiter logic from server.ts.
What changed
Validation
pm run build ✅
px tsc --noEmit ✅
pm test ✅
Closes #1614