Skip to content

feat(auth): overhaul SEP-10 JWT generation and rate limiting - #74

Merged
0dillon merged 1 commit into
mainfrom
feat/auth-jwt-overhaul
Aug 29, 2026
Merged

feat(auth): overhaul SEP-10 JWT generation and rate limiting#74
0dillon merged 1 commit into
mainfrom
feat/auth-jwt-overhaul

Conversation

@0dillon

@0dillon 0dillon commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

This PR introduces a major overhaul of our authentication layer to ensure stability under high loads.

The JWT signing logic has been extracted into a centralized \AuthUtil.ts\ utility, and we have migrated from HS256 to the more robust RS256 algorithm. A new keypair is dynamically generated if not supplied via the environment, ensuring seamless development workflows.

Additionally, we've implemented a strict Redis-backed sliding window rate limiter directly scoped to the /auth/challenge\ endpoint to prevent brute-force attacks. We also added an integration test using mocked ioredis instances that verifies the system accurately issues 429 Too Many Requests responses after 100 requests per minute.

Closes #31.

@0dillon
0dillon merged commit db0724d into main Aug 29, 2026
3 of 5 checks passed
@0dillon
0dillon deleted the feat/auth-jwt-overhaul branch August 29, 2026 09:05
0dillon added a commit that referenced this pull request Aug 29, 2026
Co-authored-by: enny791 <enny791@github.com>
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.

feat(auth): overhaul SEP-10 JWT generation and rate limiting

1 participant