firebase/firebaseui-web-react

Ui doesn't connect to the auth emulator

jtonneyck opened this issue ยท 7 comments

I'm running a create react app with the firestore, functions, database and authentication emulators enabled.

When I try to signup a user, it connects to the live authentication service. The other emulators do work and I also do get the Running in emulator mode. Do not use with production credentials. message. If I try non interactive testing it does connect to the emulator.

This seems to be a bug or undescribed behaviour although I'm relatively new to Firebase.

I'm also experiencing this issue. From what the auth emulator docs suggest, it seems like it should be as simple as:

// initialize app
firebase.auth().useEmulator('http://localhost:9099/');

and the API key + auth domain shouldn't be required?

It seems like the issue might be in the underlying Firebase Web UI library as there's a similar issue:
firebase/firebaseui-web#778

This package's only dependency firebaseui has fixed the underlying issue firebase/firebaseui-web#778 as part of the latest release v4.7.2+. Does this package require any development to enable local auth emulation? Or is it just a case of updating the dependency?

I made a local patch, and it seems to be working! I haven't done any robust testing, so don't just take my word for it. The local emulator is a real game changer :D.

For anyone just looking to get the feature up and running quickly:

Update and save the firebaseui dependency inside your local installation of the react-firebaseui package.
cd <package_path> && npx i firebaseui@latest --save

Optionally, you can keep a record of the temporary patch.
npx patch-package react-firebaseui.

If you are using Yarn, add this to package.json:

  "resolutions": {
    "react-firebaseui/firebaseui": "^4.7.3"
  },

Then run yarn install again.

Any updates to this issue?

This has been fixed in react-firebaseui@5.0.1