Setting up Firebase for Firebase-Data

Getting our Firebase config object

Walking through how to get your firebaseConfig object step by step.

Troubleshooting

There are two main issues that can come up during the setup mostly due to the UI being a little confusing & focusing on different use-cases than what we’re looking for. 

Common Problem #1

You’ve set up a Cloud Firestore rather than a Realtime Database.

Solution
Ensure this dropdown at the top of your Database dashboard says ‘Realtime Database’.
(If you change this, make sure to follow the Problem #2 Solution as well)

Common Problem #2

Your security rules aren’t allowing reads and writes. Because we’re just storing basic variables and we’re not deploying a production app, we want our security rules to be defined as public so users don’t have to login to our prototypes.

Solution
On the Database dashboard under the ‘Rules’ tab you’ll want to make sure both .read and .write are set to true.