# Rules - Failed Login Attempts, Alternate Actions?

**URL:** <https://community.auth0.com/t/rules-failed-login-attempts-alternate-actions/102635>\
**Category:** Get Help\
**Tags:** rules-management-api, management-api\
**Created:** [March 15, 2023, 7:06pm UTC](https://community.auth0.com/t/rules-failed-login-attempts-alternate-actions/102635 "2023-03-15T19:06:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sai](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@Sai](https://community.auth0.com/u/Sai)\
**Post date:** [March 15, 2023, 7:06pm UTC](https://community.auth0.com/t/rules-failed-login-attempts-alternate-actions/102635/1 "2023-03-15T19:06:40Z")

</div>

Hi! Is there a way, via the API, to trigger custom actions when the logs collect a user error (failed login, etc)? A post from 2021 on this forum indicated that Auth0 rules do not apply to pre-login scenarios. I am also following a path of reviewing log streams and triggering custom actions, but it is a considerable amount of work. Am I missing a resource here? Can the Auth0 Rules now handle pre-login scenarios such as a failed login?

Thanks!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 15, 2023, 9:19pm UTC](https://community.auth0.com/t/rules-failed-login-attempts-alternate-actions/102635/3 "2023-03-15T21:19:34Z")

</div>

Hi @Sai,

Welcome to the Auth0 Community!

> [@Sai](#):
>
> Can the Auth0 Rules now handle pre-login scenarios such as a failed login?

Unfortunately, Auth0 Rules only executes in a post-login flow and cannot handle pre-login scenarios.

In this case, the recommended approach of using log streams to trigger custom webhooks is the best way to handle these failed login attempts as you have found.

I understand that it requires some uplift on your end, however, this would be the way to handle this use case.

Here are some resources to help you:

- [Create Custom Log Streams Using Webhooks](https://auth0.com/docs/customize/log-streams/custom-log-streams)
- [Log Stream Filters](https://auth0.com/docs/customize/log-streams/event-filters)

Lastly, I know you mentioned using Actions. Unfortunately, with Actions, there isn’t a pre-login flow available. See our [Actions Flows and Triggers](https://auth0.com/docs/customize/actions/flows-and-triggers) documentation for the list of available flows.

I hope this helps!

Please let me know if there’s anything else I can do to help.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 29, 2023, 9:20pm UTC](https://community.auth0.com/t/rules-failed-login-attempts-alternate-actions/102635/4 "2023-03-29T21:20:24Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
