Sign-in and backends
Connect the Firebase server key to your app
What is Firebase?
Firebase is a free toolkit from Google for apps. This part is the server key file: it lets your app’s server send notifications to phones and check who is signed in.
- What it costs
- Free: the starting plan (called Spark) needs no card, and sending notifications costs nothing.
- Time needed
- About 15 minutes the first time. You need a Google account. It is easier on a computer, but a phone works.
- If you skip it
- Your app still works. Only the parts that use Firebase — usually notifications or sign-in — stay off until you connect it.
What you can build with Firebase
How to get it, step by step
Create a Firebase project (first time only)
- Open console.firebase.google.com and sign in with your Google account.
- Press the button to create a new Firebase project. If you already made one for this app, open it and skip to the next part.
- Type a project name — the name of your app is fine.
- It may offer Google Analytics. You can turn it off; you can add it later.
- Press Create project and wait until it says it is ready.
Get the server key file (project ID, client email, private key)
- In your Firebase project, press Settings at the top of the left-hand panel, then open the Service accounts tab.
- Press Generate new private key, then Generate key. A small file (ending in .json) downloads.
- Open that file. It holds the three values below. You can also paste the whole file into BooDoo at once — we pick out all three for you.
Which value goes in which box
- Project ID
FIREBASE_PROJECT_IDNot secret - The text after "project_id" in the file, without the quotes. Your “project ID” is your Firebase project’s own name, like my-app-1a2b3.
- Client email
FIREBASE_CLIENT_EMAILNot secret - The text after "client_email" — it looks like an email address ending in .iam.gserviceaccount.com.
- Private key
FIREBASE_PRIVATE_KEYKeep private - The text after "private_key": everything from -----BEGIN PRIVATE KEY----- to -----END PRIVATE KEY-----, both lines included. This one is secret.
Watch out for
- The private key (from the server key file) is the only secret part. Never post it or send it to anyone; if it leaks, delete it in Service accounts and make a new one.
- The key file cannot be downloaded again. If you lose it, just generate a new one.
- A work or school Google account may not be allowed to create key files. If Firebase refuses, try a personal Google account.
- The Android package name must match exactly, or notifications quietly never arrive.