Create a Firebase Project
First things first - In order for your Firepress app to be able to interact with Firebase services, you need to first create a Firebase project.
Last updated
Was this helpful?
First things first - In order for your Firepress app to be able to interact with Firebase services, you need to first create a Firebase project.
Last updated
Was this helpful?
You can read all about Firebase and its features at
using your Google account.
In the , click Add project, then select or enter a Project name.
(Optional) If you created a new project, you can edit the Project ID.
Firebase automatically assigns a unique ID to your Firebase project. Visit to learn about how Firebase uses the project ID.After Firebase provisions resources for your Firebase project, you cannot change your project ID. To use a specific identifier, you must edit your project ID during this setup step.
Click Continue.
(Optional) Set up Google Analytics for your project.
Click Create project.
Firebase automatically provisions resources for your Firebase project. When the process completes, you'll be taken to the overview page for your Firebase project in the Firebase console.
After you have a Firebase project, you can add your web app to it.
If you've already added an app to your Firebase project, click Add app to display the platform options.
Enter your app's nickname.
The nickname is an internal, convenience identifier and is only visible to you in the Firebase console.
(Optional) Set up Firebase Hosting for your web app. If you do not set up Hosting now it's not a problem as Firepress will handle this during deployment.
Click Register app.
You can skip through the next few steps as we will handle that in the coming sections.
In this step we will be enabling Firebase Authentication so that we can later log in as an admin user and create updates.
On the Users tab, click the button to Set up a sign-in method.
Enable the Google provider.
Firepress CMS uses cloud firestore to manage stored data.
Click the Create Database button.
Select Start in production mode and click Next.
When the database has finshed provisioning, go to the Data tab and click Start Collection.
Add the collection blocks. -- This blocks collection is where all of the Firepress CMS content will be stored.
In order to create a collection the collection must also include a document. Click the Auto-id button to generate a random id, and then click Next. -- This document won't be used and is solely there to enable the creation of the blocks collection.
If you created your database in production mode, your rules should look like:
rules_version ='2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if false;
}
}
}
rules_version ='2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth.token.editor == true;
}
}
}
Click Publish to save you changes.
Visit to learn more about best practices and considerations for adding apps to a Firebase project.
In the , click the Web icon (< />) to launch the setup workflow.
From the , go to the Authentication section.
From the , go to the Cloud Firestore section.
Next, go to the Rules tab. -- You can read more about Firebase Rules at
This currently blocks all read/write updates from outside of privaliged enironments.
We are going to update this rule to allow read/write operations from authenticated users with the custom claim of editor
. You can read more about custom claims at .
Update your rules to be the following: