Open dinko7 opened 1 month ago
First of all, thank you making this SDK.
When using an emulator, I can specify port for different emulators using firebase.json.
firebase.json
Example firebase.json:
{ "emulators": { "auth": { "port": 9000 }, "firestore": { "port": 8000 }, } }
In that case, the SDK doesn't connect to the emulator because hardcoded values are used.
firebase_admin_app.dart:
firebase_admin_app.dart
void useEmulator() { _isUsingEmulator = true; authApiHost = Uri.http('127.0.0.1:9099', 'identitytoolkit.googleapis.com/'); firestoreApiHost = Uri.http('127.0.0.1:8080', '/'); }
Firebase documentation specifies the following environment variables that are being set by the emulator that can be used instead of hardcoded values:
FIREBASE_AUTH_EMULATOR_HOST Docs FIRESTORE_EMULATOR_HOST Docs
FIREBASE_AUTH_EMULATOR_HOST
FIRESTORE_EMULATOR_HOST
I'm happy to contribute if you are busy.
Sure, I'd be happy to see a PR :)
First of all, thank you making this SDK.
When using an emulator, I can specify port for different emulators using
firebase.json
.Example
firebase.json
:In that case, the SDK doesn't connect to the emulator because hardcoded values are used.
firebase_admin_app.dart
:Firebase documentation specifies the following environment variables that are being set by the emulator that can be used instead of hardcoded values:
FIREBASE_AUTH_EMULATOR_HOST
DocsFIRESTORE_EMULATOR_HOST
DocsI'm happy to contribute if you are busy.