Back to Blog

Users Could Sign Up… But Their Profiles Didn’t Exist

I shipped a change recently and accidentally broke new user onboarding.

Not in an obvious way though.

Users could still sign up. Auth worked. No errors. Everything looked fine.
But their profiles weren’t being created, which meant things quietly broke later.

It took me longer than I’d like to admit to notice — mostly because:

  • I didn’t walk through the full signup flow after the change
  • I didn’t have tests covering new user onboarding

So the bug just sat there, silently.

The root cause was simple. I was assuming profile creation would always happen after auth. Most of the time it did. Sometimes it didn’t. No crashes, just missing data.

The fix was intentionally boring:

  • If a user exists and their profile doesn’t, create it
  • Make that logic safe to run more than once

But the real fix was adding a test that signs up a brand new user and checks that a profile exists afterward.

Lesson (for future me):
Auth succeeding doesn’t mean onboarding worked. If it matters, test it — or you’ll find out the slow way.