How to configure the Firebase plugin/Firebase demo:
To configure the Demo, start in Step 2.
Step 1 - Create 5 Site Properties:
FbAPIKey - API Key, as defined in the Firebase console;
FbProjectId - Firebase project id, as defined in the Firebase console;
FbServiceAccountPrivateKey - Service Account Private Key, which can be found in the Firebase Project console; (Only required for authentication with Tokens)
FbServiceAccountClientEmail - Service Account Client Email, which can be found in the Firebase Project console; (Only required for authentication with Tokens)
FbDatabaseURL - Firebase Realtime Database URL, which can be found in the Firebase Project console.
Step 2 - Configure the FbAPIKey and FbProjectId:
Go to the Firebase Console and click on the “gear” icon;
Click on the “Project Settings” button;
On the “Settings” tab, copy the Project Id value and assign it to the site property FbProjectId;
On the “Settings” tab, copy the Web API Key value and assign it to the site property FbAPIKey.
Step 3 Configure the FbDatabaseURL:
Go to the Firebase console and click on the “Realtime Database” menu item;
On the Data tab:
Copy the Database URL and assign it to the site property FbDatabaseURL.
Step 4 - Configure the FbServiceAccountPrivateKey and the FbServiceAccountClientEmail: (Only required for authentication with Tokens)
Click on the “Service Account” tab;
On “Firebase Admin SDK”, click on the button “Generate new private key”. A JSON file will be downloaded;
Open the JSON file and copy the values of the keys “client_email” and “private_key” and assign them to the site properties FbServiceAccountClientEmail and FbServiceAccountPrivateKey.
Step 5 (only for Email + Password authentication and Anonymous authentication) - Configure authentication sign methods in Firebase Console:
Go to the Firebase console and click on the “Authentication” menu item;
Click on the tab “Sign-in method”
Enable the authentication method:
For Email and Password, enable the Email/Password method;
For Anonymous, enable the Anonymous method.