The Problem:
I was deep into building resumpire.vercel.app (a resume builder app) when I hit a wall. Firebase kept rejecting my authentication requests with an “Unauthorized Domain” error.
At first, I was running through all the usual suspects:
Maybe I broke something in my codebase?
Could there be a dependency version conflict?
Is there a typo in my config?
After scouring my codebase trying to find the bug, I finally spotted the issue.
Turns out, the issue was much simpler.
The Culprit: Firebase’s Authorized Domain List
Firebase Authentication only allows requests from domains you explicitly authorize. That means:
If you’re testing locally, you must add http://localhost (or your custom dev URL) to Firebase’s Authorized Domains list.
If you’re deploying, your live domain (e.g., resumpire.vercel.app) needs to be added too.
My deployed domain resumpire.vercel.app wasn't in the Firebase Authorized Domains list. I'd only added localhost during development.
How I Fixed It
Opened Firebase Console → Authentication → Settings
Scrolled to “Authorized Domains”
Added my production domain (resumpire.vercel.app)
Reloaded the app → Auth worked instantly
Lesson learned: Always check the docs (and the obvious settings) first.
Why This Matters
This wasn’t just about fixing an error—it reinforced a bigger lesson:
Small oversights cause big blockers.
Reading docs > guessing.
Every error is an avenue to learn and grow which makes you a better dev.
Top comments (0)