> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/configure-targets/configure-authentication/configure-login-sequence.md).

# Login sequence

Configure login sequence authentication to scan web applications with complex or multi-step login flows.

A login sequence handles authentication processes that cannot be managed by simple form submission. This includes multi-step authentication flows, dynamic form elements, and JavaScript-based login processes.

Snyk API & Web replays the recorded sequence during scans to authenticate successfully and access protected areas of your application.

Create a dedicated user account for testing rather than using a real user account. Snyk submits forms and clicks buttons during scans, which can create unwanted data in the account.

## Prerequisites

* You must have added the target to Snyk API & Web
* Your application uses a complex login flow that requires specific interaction steps
* You have recorded a login sequence using the [Snyk API & Web Sequence Recorder](/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/configure-targets/configure-web-targets/use-sequence-recorder.md).

## Configure the login sequence

1. From the **Targets** page, locate your target in the list.
2. Click the **gear icon** to access the target settings.
3. Select the **Authentication** tab.
4. Select the **Login Sequence** radio button to display the configuration form.
5. In the configuration form, click **Add Login Sequence**.
6. Enter a name for the sequence.
7. Provide the recorded login sequence using one of these methods:
   * **Paste sequence**: Paste the sequence in plain text JSON format
   * **Upload sequence**: Upload the sequence from a JSON file
8. Click **Submit Sequence**.

## Record a login sequence

If you have not recorded a login sequence yet, follow these steps using the Snyk API & Web Sequence Recorder browser plugin:

1. Ensure you are logged out of your target application.
2. Open the Snyk API & Web Sequence Recorder plugin. Visit [Use sequence recorder](/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/configure-targets/configure-web-targets/use-sequence-recorder.md) for installation instructions.
3. Provide the homepage URL of your target (not the URL of the login page).
   * For example, if the login page is `https://example.com/login`, provide `https://example.com/`
4. Start recording.
5. Perform all steps to reach the login page:
   * If the target automatically redirects you to the login page, wait for the redirect
   * If you need to navigate to the login page, perform those navigation steps
6. After you reach the login page, complete the login process:
   * Enter all credentials manually (do not use browser-saved values)
   * Click all necessary buttons to complete the login
7. Stop recording.
8. Copy or download the login sequence.
9. Use the sequence in the target configuration.

Important: While recording, use your mouse and keyboard to perform all actions. Type all values manually so the plugin correctly records each action.

## Save and enable

1. Review your configuration.
2. Click **Save and enable**.

You can disable or enable this authentication anytime using the **Off/On** toggle button, or delete the configuration using the **Delete** button.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/configure-targets/configure-authentication/configure-login-sequence.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
