Firebase: Error (auth/unauthorized-domain) on Cloudflare Workers

Sign-in fails the moment it starts, with Firebase: Error (auth/unauthorized-domain).

Why

Firebase only lets sign-in start from hosts listed in Authentication → Settings → Authorised domains. A host that isn’t on the list gets auth/unauthorized-domain. We reproduced this in our lab on 24 Oct 2026 on an unregistered host, and Google’s own button also refused the origin. When you add a Custom Domain to your Worker, that domain is a new host.

The fix

  1. Firebase console → Authentication → Settings → Authorised domains → Add domain (console path as of Oct 2026).
  2. Enter the exact host from your address bar, for example yourapp.com. Every domain you sign in from needs its own entry.
  3. Reload and try again.

This is a console step you do yourself. The free check reads only your public page, so it can’t see this list; the error message itself is the signal.

Next: make Google’s sign-in say your domain

Once sign-in starts, Google’s chooser may still say “to continue to <project>.firebaseapp.com”. On Cloudflare Workers on your own domain you can change that, and we ran the route in our lab on 24 Oct 2026: Google named our domain. It takes one more console step (the handler redirect URI, or Google shows Error 400: redirect_uri_mismatch) and a small change in your Worker. Full route: Show your own domain at Google sign-in on Cloudflare Workers.

A workers.dev address shows your platform address at sign-in, not your brand, so this works once your Worker has a domain you own.

Under 10 seconds · read-only

For Cloudflare Workers on your own domain, the Signhome fix pack (one-time) has the Worker code, a paste-ready prompt for your AI agent and the owner checklist for the console steps. Your price is shown with your result.

FAQ

What if it doesn’t work for me?

Works on Cloudflare Workers on your own domain, or your money back (14 days). Our refund policy says: “Works or your money back. If within 14 days you've followed the pack and Google's sign-in still doesn't show your domain, email support with your re-check link. We'll help you fix it, and if we can't, we refund you in full.” It covers apps served by Cloudflare Workers on your own domain, the hosting setup we’ve tested, and sits alongside your rights under UK consumer law. Full terms: https://pewterkit.com/refunds

Do I need to be a developer?

Your fix pack has a paste-ready prompt for your AI builder, the exact snippet we tested, and a re-check that runs the free check on your app again, so you can see the name Google’s sign-in shows after your change.

Is the check safe?

It’s read-only. It reads your public page and its same-origin scripts, the same page any visitor can open, and sends no cookies. It never asks for a sign-in, a password or access to your accounts.

Which hosts does it cover?

Cloudflare Workers on your own domain. In our lab on Cloudflare Workers, Google’s sign-in showed our own domain (re-checked 24 Oct 2026). A workers.dev address can’t show your own domain at sign-in. You need a domain you own. On Cloudflare Pages, Firebase Hosting, Vercel or Netlify, run the free check, pick your host and leave your email: we’ll email you once when yours is ready.

What’s in the fix pack?

It’s built from the check we ran on the domain you entered: the exact snippet we tested for your host, the two console settings to change with the click path to each, a paste-ready prompt for your AI builder, and a re-check. One-time payment, no subscription.