Short answer
The domain your app runs on isn’t in Firebase’s Authorized domains list. In the Firebase console, go to Authentication, then Settings, then Authorized domains, and add the exact domain, such as app.example.com, without https:// or a path. Every preview URL counts as its own domain, and projects created after April 28, 2025 no longer include localhost.
The usual causes, and the fix
01
A new custom domain
You moved the app from a hosting subdomain to your own domain, and the new domain was never added. Add it, and the www version if your site uses it.
02
Preview and branch deploy URLs
Netlify and Vercel give each preview its own address, and each address is a separate domain to Firebase. Add the preview domains you test sign-in on, or test sign-in on one fixed staging domain that is on the list.
03
localhost is missing
“In projects created after April 28, 2025, Firebase Authentication no longer includes localhost as an authorized domain by default.” Firebase docs, Authentication FAQ and troubleshooting
Add localhost in the development project if you sign in locally. Google advises keeping it out of the production project. 127.0.0.1 is a different domain from localhost, so open the app on the one you added.
04
Redirect sign-in on a custom domain
If you use signInWithRedirect and your app is on its own domain, Firebase’s redirect guide says to set that domain as authDomain and add https://your-domain/__/auth/handler as a redirect URI at the sign-in provider. Add the domain to Authorized domains too. The guide also lists switching to signInWithPopup.
Checked against the vendor’s docs on : Firebase docs: Authentication FAQ and troubleshooting; Firebase docs: Best practices for using signInWithRedirect.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way.See scope and start
Related: Supabase auth emails link to localhost · Free Firebase rules checker