Skip to content

[FR] Connect to Firebase Emulator (Auth) using custom hostname and port #772

Open
@alinturbut

Description

@alinturbut

Is your feature request related to a problem? Please describe.
I am trying to setup a testing phase that would run tests on the Emulator by connecting to it. The Emulator is prepared using TestContainers which don't open specific ports, but rather random. Because of this I cannot use the environment variable specified as that blocks me into selecting a hostname and port.

Describe the solution you'd like
Make the hostname and port dynamic when initialising FirebaseAuth / FirebaseApp.

Describe alternatives you've considered

Additional context

Expected usage

FirebaseAuth.getInstance(firebaseApp()).useEmulator('localhost', '9099')

For example, Firestore has this enabled using FirestoreOptions.newBuilder().setEmulatorHost()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions