Firebase Configuration

Important: in this documentation, we will show you how to quickly implement Firebase, but with basic settings. If you want to increase the security of your firebase settings, read the Firebase documentation here: https://firebase.google.com/docs

Create an Account on Firebase

Create your Account on Firebase at https://firebase.google.com

You can register to the Free Spark Plan which is enough for working with Thorium.

Start the Console and Create your first Firebase Project

We now have to create a first Project:

...

GO TO THE FIREBASE CONSOLE

...

ADD A NEW PROJECT

...

SET THE NAME OF THE PROJECT

...

YOUR PROJECT IS NOW READY

Add an App to your Project

At this step, we need to create a Firebase App, and then get all our API keys (Firebase SDK Configuration)

...

GO TO THE PROJECT SETTINGS

...

ADD AN APP (WEB TYPE)

...

ENTER THE NAME OF YOUR APP

...

COPY SOMEWHERE THE FIREBASE PARAMETERS (IN THE RED SQUARE)

Firebase Auth Setup

It is now necessary to setup the Firebase Auth  in order to decide how the users will connect to your Firebase project:

...

CLICK ON AUTHENTIFICATION

...

SELECT SETUP SIGN-IN METHOD

...

ENABLE EMAIL/PASSWORD PROVIDER

...

SELECT THE OTHER PROVIDERS YOU WANT TO ENABLE

Cloud Firestore Setup

Now we need to setup Cloud Firestore. Cloud Firestore is the NoSQL Database, we will use it for storing Data.

...

CLICK ON CREATE DATABASE

...

SELECT START IN PRODUCTION MODE

...

CHOOSE YOUR LOCATION SETTINGS

...

SELECT THE “RULES” OPTION

...

CHANGE THE RULE EXACTLY LIKE IN THE SCREEN SHOT

Storage Setup

Now we need to setup Firebase Storage.We need it to store the user’s profile images and the various documents (Images, Audio…) we will add to the Cloud Firestore Database.

...

SELECT THE “STORAGE” OPTION

...

EDIT THE STORAGE RULES AND CHANGE IT AS SHOWN
ALLOW READ, WRITE: IF REQUEST.AUTH != NULL;

...

CHOOSE YOUR CLOUD STORAGE LOCATION

...

OUR STORAGE IS READY!

Your Firebase Configuration is now ready, it is time to setup the Thorium Part.
You need first to enable the Firebase Plugin in your Thorium Project, click on the Project name in the Thorium Projects list, and select the Plugins tab:

...

ENABLE THE Google Firebase PLUGIN

...

EDIT THE STORAGE RULES AND CHANGE IT AS SHOWN
ALLOW READ, WRITE: IF REQUEST.AUTH != NULL;

...

Choose your preferences for your Thorium Project

Set the profile image store folder to “userprofiles” for example.
And choose if you want the users to connect anonymously and/or select the Sign-In providers you want to enable.

Your Environment is now ready, you can start working on your App.

Copyright©  Nymphide Lab 2020 - All Rights Reserved 

...