> For the complete documentation index, see [llms.txt](https://enappd.gitbook.io/ionic-grocery-shopping-app-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enappd.gitbook.io/ionic-grocery-shopping-app-platform/firebase-setup/firebase-integration-in-grocery-dashboard-app.md).

# Firebase Integration

It has the following steps:

1. [**Editing environment files in project**](https://app.gitbook.com/@enappd/s/ionic-4-grocery-shopping-app-platform/~/drafts/-M5LWsCICWcHUVGOtxeg/firebase-setup/firebase-integration-into-user-app#1-editing-environment-files-in-project)
2. [**Creating database in Firebase**](https://app.gitbook.com/@enappd/s/ionic-4-grocery-shopping-app-platform/~/drafts/-M5LWsCICWcHUVGOtxeg/firebase-setup/firebase-integration-into-user-app#2-creating-database-in-firebase)
3. [**Enable Sign In Provider**](https://app.gitbook.com/@enappd/s/ionic-4-grocery-shopping-app-platform/~/drafts/-M5LWsCICWcHUVGOtxeg/firebase-setup/firebase-integration-into-user-app#3-enable-sign-in-provider)
4. [**Add User**](/ionic-grocery-shopping-app-platform/firebase-setup/firebase-integration-in-grocery-dashboard-app.md#4-add-user)

### &#x20;1. Editing environment files in project

1.1 Open the project in your code editor and navigate as follows:-

Src -> Environments -> “environments.ts”

&#x20;1.2 The code to be replaced is shown and highlighted below. Replace the highlighted code below with the code you copied to text editor from firebase in previous step.

![](/files/-M5M0-2_SBiC6MrGBKAU)

1.3. Now open “environments.prod.ts” file from “Environments” folder.

1.4. The code to be replaced is shown and highlighted below. Replace the highlighted code below with the code you copied to text editor from firebase in previous step. ( Same step as above )

![](/files/-M5M0AQvZxrEf8M2kVwH)

### 2. Creating database in Firebase

2.1 The image shown below is the same screen we saw after competing all the steps of [New Firebase Project Setup](/ionic-grocery-shopping-app-platform/firebase-setup/new-firebase-project-setup.md) section in firebase console. Click on “Continue to console” button.

![](/files/-M5M3rzp_tX-qdpmogH8)

2.2 You should see the following screen where your app will be added to firebase.

![](/files/-M5M4QmJ2ItV484yL-M_)

\
2.3 Click on **Database**  shown under the "Develop" section.It should show you the following screen and click on “Create database”&#x20;

![](/files/-M5M4ipmjL4wusLXDA_j)

2.4 Select “Start in test mode” and click “Next” as shown below.&#x20;

![](/files/-M5M4s3v6GVw3itxx_v5)

2.5. Click on “Done”. It should show you the following screen.

![](/files/-M5M4xZEf7vkboU5pE1t)

### 3. Enable Sign In Provider

3.1 Click on “Authentication” shown under the "Develop" section. It should show you the following screen.&#x20;

![](/files/-M5MDC1EeO6VvNEvHEfI)

3.2 Click on "Sign in method". It should show you the following screen.

![](/files/-M5MDJLy122yqD2Pin7i)

3.3 Select the "Email/Password" at the top of this list of "Provider" (which is disabled currently). It should show you the following screen. "Enable" the first option and make sure that second one is "diasbled" and click “Save”.

![](/files/-M5MDSs7Gi4bj0RHJNMv)

### 4. Add user

4.1 Click on **Users** shown under the **Authentication** section. It should show you the following screen where no user is present currently.

![](/files/-M5MFeVamgGjm3Q9zpcu)

4.2 Click on **Add** **user**. It should show you the following screen.

![](/files/-M5MFxG8hcVVrFDZsVcx)

4.3 Add **Email** and **Password** of the user you want to add and click on **Add** **user a**s shown below.

![](/files/-M5MGNd_7BqN-VfBkgmq)

4.4 The user you added should appear in **Users** section, with the email id you provided as the **Identifier** field. It is shown in the following screen.

![](/files/-M5MGqkYkhEulqY47n5A)

### Testing Grocery Dashboard App Login

Now we have successfully created a new user for our Grocery App. Let us go back to the browser where we can test our Dashboard app for Login.&#x20;

Go to [Grocery Dashboard Testing](/ionic-grocery-shopping-app-platform/how-to-use-this-starter-1/grocery-dashboard-app-setup/testing-dashboard-after-firebase.md) section to see how to do it.
