# Redirect 403 to Login

The **Redirect 403 to Login** ECA model automatically redirects anonymous (non-logged-in) users to the login page when they encounter a 403 Access Denied error. This improves user experience by guiding users to authenticate rather than showing them an error page.

* **Improved User Experience**: Users are guided to login rather than seeing an error page
* **Seamless Authentication Flow**: Original destination is preserved, so users return to their intended page after login
* **Automatic Process**: No manual intervention required
* **Role-Specific**: Only affects anonymous users; authenticated users with insufficient permissions still see the 403 error

<figure><img src="/files/3ttwGnoOiUXe1UDEK1vy" alt="Workflow Sequence - Redirect 403 to Login"><figcaption><p>Workflow Sequence - Redirect 403 to Login</p></figcaption></figure>

This model intercepts that error and redirects them to the login page, preserving the originally requested URL so they can be redirected back after successful authentication.

Cloned from [**Redirect 403 to Login Page**](https://ecaguide.org/library/use%20case/redirect_403_to_login_page/) In the [**ECA Library**](https://ecaguide.org/library) and use cases.

### Related Resources

* [ECA Guide Library](https://ecaguide.org/)
* [Drupal ECA Project](https://www.drupal.org/project/eca)


---

# 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://docs.varbase.vardot.com/10.1.x/developers/varbase-eca-visual-workflow-builder/redirect-403-to-login.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.
