⌘K

Grocery, Food Delivery, Fruits/Vegetable Store eCommerce Website, App With Management Software

Firebase Setup

Last updated
STEP 1 – Create Firebase Project
  1. Goto Firebase console.
  2. Register new account or try to log in with existing accout

Once logged in, you can see firebase console dashboard. Click on Add Project. Provide a project name, and then select country and then after that click on Create Project. For example, see the below image.

Once the project has been created, it will automatically redirect to Firebase dashboard screen

As eCart Front End is a web project, you need to add web project/application to the firebase project.

As mentioned in an earlier image, you can add Firebase to your web app.

Once the web app been added into Firebase, you’ll get a web app configuration Javascript code which you have copy and paste in resources/views/themes/ekart/common/footer.blade.php

Then in firebase console you will be redirected to the web app dashboard screen.

STEP 2 – Enable Phone Authentication in Firebase console
  1. Once the web app is created and credentials have been set, we need to enable phone authentication mode from the Firebase console. From the left sidebar there will be an option for Authentication. Once you click on the Authentication menu there will be an option for Sign-In Method.

Once you click on Sign-In Method, a new list with the multiple sign in providers will appear. From that list you need to choose the Phone option to enable it. So you need to click on the pencil icon which will appear when you hover on Phone from the list. You need to eneble the phone authentication from the screen just like the below images.

There will be an option to test authentication as well, so you can click on it. There, you need to provide the number. It will automatically send the verification code to the given number. In this way you can test and verify the authentication using your phone number.

Now at the bottom of the page, in “Authorized domains”, localhost and a Firebase domain are automatically added. Here we’ve to add domain name without http:// and https:// whever eCart Front End Website will get hosted. If you’re using www as prefix of domain name then you must have to add that.

STEP 3 – Google Service Account
  1. Firebase projects support Google service accounts, To authenticate a service account and authorize it to access Firebase services, you must generate a private key file in JSON format.
  2. To generate a private key file for your service account:
    • In the Firebase console, open Settings > Service Accounts.
    • Click Generate New Private Key, then confirm by clicking Generate Key.
    • Securely store the JSON file containing the key at path : config/firebase.json
Congratulations. You’re Done.

Feel Free to contact us for any queries.

Facebook Comments

Still stuck? How can we help? Get Help