Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

132
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda