Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#2,881 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
50/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
nodejs, typescript

Research direction

Search the repository for FIREBASE_AUTH_EMULATOR_HOST handling and compare it with the validation logic linked in src/storage/storage.ts. Confirm the expected host format and add the requested diagnostic for http or https prefixes, then run the relevant authentication tests to verify the invalid setting is reported clearly.

Written by the indexing model from the issue text.

Description

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

Dominant language
TypeScript
Stars
1.7k
Forks
419
Avg merge
4d 20h
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/firebase-admin-node

All issues in firebase/firebase-admin-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.