How to generate a new Firebase ApiKey

It's supposed to be like that. Firebase has security rules for protecting the data. https://firebase.google.com/docs/database/security/quickstart https://firebase.google.com/docs/storage/security/start

You can set the rules from the Firebase Console, under (Project --> Database/Storage -->Rules) like this:

{
  "rules": {
    ".read": "auth != null",
    ".write": "auth != null"
  }
}

Unless the users are authenticated, they can neither read nor write data to the database/storage.


Firebase is a client side service. As soon as you use firebase in production that key will become public. Your key isn't meant to be private, your database and storage security rules should be used to secure your data private.


If you would like to have a special key for use in a server, then you can generate one by navigating to the firebase console for your project, selecting the gear in the top left hand corner and selecting project settings. Then select service accounts at the top. Then select Firebase Admin SDK and then generate new private key. Hope this helps!


Any project created on firebase will be present in google cloud also.

You can regenerate the "web API Key" of a firebase from google cloud.

enter image description here

If this is the web API key you want to regenerate, read on!

  1. Go to google cloud -> open your console -> select your project

enter image description here

If you don't find your project under the "RECENT" tab, lookout in the "ALL" tab.

enter image description here

  1. Go to "APIs & Services"/"Credentials" from navigator

enter image description here

  1. Select to edit the key which you want to update/regenerate.

enter image description here

  1. Regenerate your key from here.

enter image description here

And you are done! Once you refresh firestore, you will see the new key in your settings.

** The new key will be available immediately. The current key will be deactivated permanently in 24 hours.