Background
The Discord OAuth callback does not verify the state nonce, allowing login CSRF. Generate and validate a state value.
Files to modify (2-3)
src/lib/discord/oauth.ts
src/middleware/security.ts
Acceptance Criteria
Implemented across the listed files
Unit/integration tests added or updated and passing
No regression; follows project coding standards
Background
The Discord OAuth callback does not verify the state nonce, allowing login CSRF. Generate and validate a state value.
Files to modify (2-3)
src/lib/discord/oauth.ts
src/middleware/security.ts
Acceptance Criteria
Implemented across the listed files
Unit/integration tests added or updated and passing
No regression; follows project coding standards