I just deleted 1,740 lines

Izzy

Izzy Chinwuba

I just deleted 1,740 lines of code. The auth still works. Actually, it works better now. Here's the thing: I was verifying JWT tokens in two places. Frontend middleware doing crypto checks, then the backend doing the exact same thing again. The frontend can't be trusted anyway. It just needs to know one thing: "Is this token expired?" for routing. The backend handles real security when API calls happen. What changed: 110-line middleware → 25 lines 5 auth docs explaining complexity → 0 2 duplicate token endpoints → 1 clean pattern Same security. 10x clearer. Faster page loads. The most satisfying code you'll ever write is the code you delete.
Like this project

Posted Nov 18, 2025

I just deleted 1,740 lines of code. The auth still works. Actually, it works better now. Here's the thing: I was verifying JWT tokens in two places. Fronten...

Likes

0

Views

0