factorio-prints
factorio-prints copied to clipboard
[bug] Firebase auth does not work in Firefox
Expected Behavior
Sign in
/Join
should successfully pass oauth validation with either provider on both factorioprints (old) and factorioprints (new), with firefox.
Current Behavior
On firefox, the popup successfully opens, and prompts you to select a valid account (google) and successfully creates an auth token without actually logging you in. If you try to sign up using github, the popup just opens and instantly closes again.
Steps to Reproduce
- Open firefox (any recent flavor, any OS)
- Click
Sign in / Join
- Choose any available provider
- Grant oauth access to whichever provider you chose in step 3
- Redirect succeeds without error but without logging you in
Context
I cloned the repo locally in the hopes I could fiddle with the firebase bits, to no avail. I have no background in javascript, though I understand the concepts and reading the code isn't hard.
After running yarn install
and ignoring the baffling amount of flat out deprecated and removed dependencies, it built. I didn't downgrade my installed node version, so I had to convince react to run some ancient ssl mode.
I tried to convert https://github.com/FactorioBlueprints/factorio-prints/blob/7a0d8e9d242ee2da8d5ef9881bc7282c567769c3/src/components/Header.js#L95-L103
to use signInWithRedirect
instead, because I didn't feel like updating 2 years worth of dependencies and refactoring basically the entire thing to match the current conventions, but that caused the exact same behavior just in a new tab instead of popup.
I found several issues on the firebase-js-sdk repo regarding this behavior in regards to firefox. firebase/firebase-js-sdk#1003 firebase/firebase-js-sdk#5849 firebase/firebase-js-sdk#4590
All of which are stale, not directly related to the core issue, or just closed with suggestions to upgrade to the latest version of the sdk. Which is a big leap given that 2 major version separate the sdk from master.
Environment
All of the tests (both prod and dev local) were performed on:
- Fedora 36 with kernel 5.18.11-200.fc36
- Firefox Developer Edition 102.0.1
I created a post on reddit and the user r/ferrybig confirmed that the issue persist on windows as well.
I'm not hopeful to see a fix after that much of an inactivity period in a fast-paced environment like nodejs, given that a major part of the dependencies no longer exist, but I'm filing this issue for posterity regardless.
Cheers, snwflake