> For the complete documentation index, see [llms.txt](https://help.form.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.form.io/form-building/actions/login-actions.md).

# Login Actions

Configuring a Login action to fire on form submission

## Login

The Login Action is typically connected to a User-based resource (like the default User or Admin Resources that come with each project) and Email/Password fields from the Login form are then mapped to the Email/Password field from the connected Resource using the Login action settings.

When the Action is executed, the Email/Password data is then verified from the Resource Data Base. If a match is found, the user will then be authenticated into the application.

<figure><img src="https://501951130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6LdEf8SjBIeQDsRL3BdV%2Fuploads%2FuD2kPC4m0UJdIX82FHPT%2Flogin.jpg?alt=media&amp;token=7287f74f-0d56-4002-9041-4b72f1c7989c" alt=""><figcaption><p>Login action mapped to the User Resource</p></figcaption></figure>

## Settings

**Resources:** The Resource the action will reference for matching Email/Password information.

**Username/Password Field:** Map the fields from your form to the connected resource to validate a match for Login authentication.

**Maximum Login Attempts:** The number of times a User can fail a Login attempt before being locked out. Use 0 for an unlimited number of attempts.

**Login Attempt Time Window:** The window of time in seconds to count the login attempts. Once the User is outside of the time threshold, the Login Attempt number is reset, as long as they have not been locked.

**Locked Account Wait Time:** The amount of time in seconds a person needs to wait before they can try to log in again.

## Video

{% embed url="<https://youtu.be/h9pvYHWkJD0>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.form.io/form-building/actions/login-actions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
