# Log the User In

This action logs the user in using Email/Password authentication.

***

## <mark style="color:blue;">Inputs and Settings</mark>

<div align="left"><figure><img src="https://284736847-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiWu3FezEjWxrPbkf8zIP%2Fuploads%2F6OXm2DDrUarxBJltYZxC%2Fimage.png?alt=media&#x26;token=144464d8-34c6-445e-b47b-eeeb6f5f3693" alt=""><figcaption></figcaption></figure></div>

### Email

The email linked to the user's account to be authenticated.

### Password

The user's account authentication password.

### Trigger ID (optional)

This will link the action with a [Action Listener](https://estare.gitbook.io/firebase-auth-firestore-and-storage-plugin/plugin-elements/firebase-action-listener) of the same ID.&#x20;

If left blank, all listener on the page with blank ID's will be triggered at the same time, so we suggest to always define a Trigger ID.

When the function finishes running, it will trigger the [User Logged In](https://estare.gitbook.io/firebase-auth-firestore-storage-plugin/plugin-elements/firebase-action-listener#user-logged-in) event, storing the [User ID](https://estare.gitbook.io/firebase-auth-firestore-storage-plugin/plugin-elements/firebase-action-listener#new-user-id) and [User Email](https://estare.gitbook.io/firebase-auth-firestore-storage-plugin/plugin-elements/firebase-action-listener#new-user-email) on the listener's states.

***

## <mark style="color:blue;">Triggered events</mark>

Those events are triggered by an [Action Listener](https://estare.gitbook.io/firebase-auth-firestore-and-storage-plugin/plugin-elements/firebase-action-listener) with the same ID as the [Trigger ID](#trigger-id-optional) provided on the action.

* User Logged In (if the action was successful)
* Error in Action (if an error occurs)

***

## <mark style="color:blue;">Stored values on the listener</mark>

### User ID

The ID of the user authenticated by the action.

### User Email

The email of the user authenticated by the action.

### Error Message

If an error occurs, you can check its details on this state on the action listener.


---

# 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://estare.gitbook.io/firebase-auth-firestore-and-storage-plugin/plugin-front-end-actions/firebase-auth/log-the-user-in.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.
