Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[FR] Add check to verify if auth emulator host is valid

未关闭
#2,881 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
50/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
nodejs, typescript

调研方向

在仓库中搜索 FIREBASE_AUTH_EMULATOR_HOST 的处理方式,并将其与 src/storage/storage.ts 中链接的验证逻辑进行比较。确认预期的主机格式,并为 http 或 https 前缀添加所请求的诊断,然后运行相关的身份验证测试,以验证无效设置是否得到清晰报告。

由索引模型根据 Issue 内容生成。

描述

api: auth type: feature request

Is your feature request related to a problem? Please describe.
I accidentally used http://127.0.0.1:9099 instead of 127.0.0.1:9099 when setting FIREBASE_AUTH_EMULATOR_HOST.

Even though the emulator thew an error like below, it still took me a while to figure out what I did wrong 🤦 :

FirebaseAppError: Error while making request: getaddrinfo ENOTFOUND http. Error code: ENOTFOUND
    at C:\Users\PATH\firebase-admin-node\lib\utils\api-request.js:268:19
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async main (file:///C:/Users/PATH/auth.js:12:5) {
  errorInfo: {
    code: 'app/network-error',
    message: 'Error while making request: getaddrinfo ENOTFOUND http. Error code: ENOTFOUND'
  },
  codePrefix: 'app'
}

Describe the solution you'd like
Throw an error message indicating that http and https should not be included when setting FIREBASE_AUTH_EMULATOR_HOST. Found a similar logic in https://github.com/firebase/firebase-admin-node/blob/a46086b61f58f07426a6ca103e00385ae216691d/src/storage/storage.ts#L51-L56

Describe alternatives you've considered
N/A

Additional context
N/A

主要语言
TypeScript
星标
1.7k
派生
419
平均合并
4 天 20 小时
30 天内合并 PR
16

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

firebase/firebase-admin-node 的其他 Issue

查看 firebase/firebase-admin-node 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。