firebase / firebase/firebase-admin-java
[FR] Connect to Firebase Emulator (Auth) using custom hostname and port
- 主要语言
- Java
- 星标
- 620
- 派生
- 305
- 平均合并
- 3 小时 23 分钟
- 30 天内合并 PR
- 1
描述
**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()`
贡献指南
调研方向
首先跟踪 FirebaseAuth 和 FirebaseApp 的初始化,然后对比现有的 FirestoreOptions.setEmulatorHost() 方案。当 FirebaseAuth.getInstance(firebaseApp()).useEmulator('localhost', '9099') 接受用于模拟器连接的自定义主机名和端口(包括动态分配的 TestContainers 端点)时,这项工作就完成了。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- firebase, java
- 领域
- authentication
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100