Skip to content
Favas
← All writing

· AI · 2 min read

AI wrote my auth in ten minutes

By

One lobe per minute of reading. The dot marks the day it was written.

AI wrote my entire authentication system in ten minutes. I sat there with my coffee going cold, watching it produce cleaner code than my three-hour attempt.

The login flow had been fighting me for weeks. Sessions expired at random. The refresh token logic looked like a Rube Goldberg machine. Password reset worked exactly once, under conditions I could never reproduce.

Out of frustration, I opened Claude, described the problem, and asked it to start from scratch.

In under ten minutes I had:

  • A complete JWT-based auth system with key rotation
  • Token refresh logic that handled race conditions
  • Password reset with email verification and expiring tokens
  • Rate limiting, security headers and CSRF protection
  • React hooks with proper loading and error states

It was good code, with security practices I hadn't even asked for. The code I'd write if deadlines happened to other people.

It felt like watching someone else parallel park the car you've been circling the block with for twenty minutes.

What it didn't know

The code was clean. It was also naive. It didn't know our users sometimes sign up with the same email through two different OAuth providers. It didn't know our billing system expects a user object before the auth flow finishes.

I still had to:

  • Understand business rules nobody had written down
  • Design the experience around edge cases only people notice
  • Test the situations that only show up in production at 2AM on a Friday
  • Fit it into systems that existed before I arrived
  • Make architecture calls that would compound over the next three years

What AI gave me was the implementation: the tedious, well-documented, pattern-matching part I'd been pretending was the interesting part of my job. It wasn't. The interesting part was always judgment. AI just made that obvious.

Should I be worried?

The debate about AI in engineering tends to split into two positions: nothing changes, or everything does.

What I see is less dramatic. AI handles the repetitive, well-understood patterns. We handle context, ambiguity, and noticing when one requirement contradicts another.

I'm not worried about AI taking that part of the job. If anything, it's the part that got more interesting.