Skip to content

Firebase database configuration

Teodor edited this page May 14, 2025 · 6 revisions

Firebase Logo

Create a Firebase project

Eva_Capture730658673 Eva_Capture1624227105 Eva_Capture2118563010

Create a Real-Time database

Eva_Capture943251498 Eva_Capture373120185 Eva_Capture134707599

Set the database rules

Copy the database rules from the firebase_database_rules.json into the rules section of the Firebase real-time database. The file can be found in both the release binaries as well as the application's source code.

Eva_Capture1144461688 Eva_Capture2054255715

Create a Firebase Web App

Eva_Capture286435708 Eva_Capture1021315879 Eva_Capture1649772397 Eva_Capture1656007421

Configure the server configuration file (appsettings.json / appsettings.Development.json)

Set the server to use Firebase as the database system

The server is pre-configured to use MySQL database by default. To set the server to use Firebase as its database system, set the value of the field use_firebase in the configuration file to true as shown below.

...
 "use_firebase": true,
...

Set the database url, api key, and authorisation domain

Copy the fields authDomain, databaseURL, and apiKey from the Firebase app configuration file into their respective fields within the server configuration file.

...
  "firebase_database_url": "https://thetatest-57a1f-default-rtdb.firebaseio.com",
  "firebase_api_key": "AIzaSyC-r3ggHI84_f6MkRf5ZK9vxMkCGA26BW4",
  "firebase_auth_domain": "thetatest-57a1f.firebaseapp.com",
...

Eva_Capture1721544213

Set the database admin token

Copy the database admin token from the Database Secrets section of the project section into its respective field within the configuration file as shown below.

...
 "firebase_admin_token": "MBZuiQKDoNQ3ocZyhJNi7YWBTcA2FGbY8EyRsOSm",
...

Eva_Capture341175733

Clone this wiki locally