I'm trying to use the new firebase authentication emulator on React Native (0.63.3) on an android studio emulator (Pixel 4 API 29). In the newest major update of react-native-firebase
(V 10.0.0), support for this was added, and I can see both the function and type definition in the node-modules
package. But when I try and use the function, it simply isn't defined on the object. A lot of other functions are defined and work as expected (on production data), but not the useEmulator
function. I've tried several ways of getting access to the object:
importing it directly:
import app from "@react-native-firebase/app";
import auth from "@react-native-firebase/auth";
app.initializeApp(...);
console.log(auth().useEmulator);
importing the module like this:
import app from "@react-native-firebase/app"
import "@react-native-firebase/auth";
const auth = app.auth();
console.log(auth.useEmulator);
And they all log undefined
. If I could get some tips on how to get this to work, it'd be greatly appreciated. Having access to the emulator while developing makes everything a little bit easier than having to make test users in the production data. The functions.useEmulator
and firestore.settings
works well and are defined, so there looks like there is something specific with the auth function.
My npm dependencies relating to this question:
"react": "16.13.1",
"react-native": "0.63.3",
"@react-native-firebase/app": "^10.5.0",
"@react-native-firebase/auth": "^10.5.1",
"firebase": "^8.2.4",
My android firebase auth implementation version, if it is necessary:
implementation "com.google.firebase:firebase-auth:20.0.2"