Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

133
Views
Firebase config object posted on github

I worked on a personal project for last few weeks, and used github asa the VCS, but now i want to make the project public so i have to ask the next thing.

I forgot to create an individual file for the firebase config object and add it to gitignore, so it is visible in the project if you search for it

var firebaseConfig = {
  apiKey: "API_KEY",
  authDomain: "PROJECT_ID.firebaseapp.com",
  databaseURL: "https://PROJECT_ID.firebaseio.com",
  projectId: "PROJECT_ID",
  storageBucket: "PROJECT_ID.appspot.com",
  messagingSenderId: "SENDER_ID",
  appId: "APP_ID",
  measurementId: "G-MEASUREMENT_ID",
};

The object contains this data, my question is, could i do anything to secure the firebase account so that when i publish the project there won't be problems with people trying to mess with my backend?

Or is there any other option?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

In addition of resetting your key, you could use git filter-repo (see INSTALL) in order to rewrite all commits, changing the content of that version file with a blob callback.

You would replace apiKey: "..." by apiKey: "XXX".

git filter-repo --blob-callback '
    blob.data = blob.data.replace(b"yourKey", b"AN_ENVIRONMENT_VARIABLE")
'

That way, your code history is based on an environment variable name, instead of an old key value.

about 4 years ago · Juan Pablo Isaza Report

0

You can navigate to Google Cloud Credentials, there click on 'API Key'(Browser key probably) and in the top of the page you will have the option to reset the API key. The same goes for OAuth Client ID. After that, use those new credentials that you can find in firebase > project overview > project settings.

I suggest using environmental variables to hide your API Keys

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!