# Firebase

## Authentication Using Firebase

This starter provides you with Login, Signup and Reset Password functionality using Firebase Authentication.&#x20;

You can test the authentication in the already provided app code.

When you want to attach the authentication process to your own Firebase project, simply get the `config` parameters from Firebase console.

![](/files/-LubEAmtO1myztXhDyoh)

Once you have the `config` parameters, paste them in the `environment` files in the starter code. There are two environment files, one for `dev` and one for `prod` app.

![](/files/-LubE4fkwxcOb_KaMDvf)

This configuration can be imported in `app.module.ts` and `main.ts` by importing the `environment`&#x20;

```
import { environment } from 'src/environments/environment';
```

{% hint style="info" %}
Make sure to have the `config` in the `environment.prod.ts` when you create a production build
{% endhint %}

## Code Structure

![](/files/-LubDySrmiUkiZxg9ZUY)

The `src/app/pages/firebase` folder contains the code related to&#x20;

* Login - Email login
* Signup - Email signup
* Image Upload
* CRUD data functions - `firebase-home`

These files use service data and functions provided in `src/app/services/firestore`&#x20;

* `filestorage.service.ts` - For storage purpose
* `firebase-authentication.service.ts` - For Authentication functions
* `firestore.services.ts` - For CRUD functions

{% hint style="info" %}
When you are using the app Sidemenu, the **Login** option actually performs a **Logout** actions to take you to the Login page.
{% endhint %}

Following articles from our knowledge base can assist you with Firebase features

{% embed url="<https://enappd.com/blog/how-to-integrate-firebase-in-ionic-4-apps/23>" %}

{% embed url="<https://enappd.com/blog/email-authentication-with-firebase-in-ionic-4/38>" %}

{% embed url="<https://enappd.com/blog/firebase-with-ionic-4-hosting-auth-and-db-connection/58>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://enappd.gitbook.io/capacitor-full-app-ionic-angular/features/startup-features/firebase.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
