You'll see:
- auth/unauthorized-domain
- Google sign-in popup closes immediately on your deployed site
Why it happens
Firebase only allows sign-in from domains on the Authorized domains list. Your new hosting domain isn't on it. Projects created after April 28, 2025 also don't include localhost by default.
How to fix it
-
Add your domain
Firebase console → Authentication → Settings → Authorized domains → Add domain. Add the bare domain (yourdomain.com), plus any preview domain you use.
-
Add localhost for development if needed
-
Retry in a fresh tab