Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Is it possible to use the emulator suite with Firebase (Dart) #410

Open
bynicodevelop opened this issue Dec 3, 2021 · 1 comment
Open

Comments

@bynicodevelop
Copy link

bynicodevelop commented Dec 3, 2021

I wish I could use the firebase emulator with authentication and firestore with this package : https://pub.dev/packages/firebase

But it seems to me that the useEmulator method does not exist.
Is there a solution ?

I tried this this, but it doesn't work.

import 'package:firebase/firebase.dart';

Future<void> main() async {
  App app = initializeApp(
    apiKey: apiKey,
    appId: appId,
    messagingSenderId: messagingSenderId,
    projectId: projectId,
  );

  Auth authInstance = auth(app);

  authInstance.useEmulator("HOST:PORT"); // <=  it doesn't work
}

I specify that this script is then transformed into JS with the command

Thanks for your feedback

dart build js -o OUTPUT INPUT

@kevmoo
Copy link
Contributor

kevmoo commented Dec 3, 2021 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants