I've already solved this (hence why the question is so specific) but thought it would be worth sharing....
I use codesandbox a lot in developing Firestore-based React apps, and ran into an "interesting" issue. When Codesandbox forks a project, it generates a pseudo-random domain to allow for testing - so, you may see the project called lumininous-fraternity-df7gxk, and the built app will deploy at
df7gxk.csb.app .
Where it gets fun is sometimes the generated sub-domain will START with a digit - for example,
2omvk.csb.app (real case)
I found out the hard way that Firebase Auth does NOT accept that as a sub-domain. the *exact same code*, forked again so that the sub-domain does *not* start with a digit, works fine.
Easy fix, obviously, just fork again. But it took a bit of sleuthing (and, well, 40 years of experience with weird problems) to speculate that *that* was the problem, and try the solution.
Just sharing... If any Firebasers think this is a new issue, I'll file a bug report...
Tracy Hall