# How do I show error message from Post-Login Action deny into auth0-lock?

**URL:** <https://community.auth0.com/t/how-do-i-show-error-message-from-post-login-action-deny-into-auth0-lock/183478>\
**Category:** Get Help\
**Tags:** login-prompt-new-experience, login-experience\
**Created:** [March 6, 2025, 8:28pm UTC](https://community.auth0.com/t/how-do-i-show-error-message-from-post-login-action-deny-into-auth0-lock/183478 "2025-03-06T20:28:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![baohouse](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/baohouse/32/73455_2.png) [@baohouse](https://community.auth0.com/u/baohouse)\
**Post date:** [March 6, 2025, 8:28pm UTC](https://community.auth0.com/t/how-do-i-show-error-message-from-post-login-action-deny-into-auth0-lock/183478/1 "2025-03-06T20:28:34Z")

</div>

I’m using Lock v13 with Google connection only (no email/password). I want to block emails by domain, and I do have the Action setup within the Post-Login trigger.

 ![Screenshot 2025-03-06 at 12.17.03 PM](https://global.discourse-cdn.com/auth0/original/3X/c/e/ceb7686aa54bb72d8b507661fa7d2c3b877d83c0.png)

Now in the frontend code, I have listeners on a bunch of events on the Auth0Lock instance.

```auto
lock.on('authenticated', handleAuth);
lock.on('unrecoverable_error', handleAuth);
lock.on('authorization_error', handleAuth);
lock.on('signup error', handleAuth);
lock.on('hash_parsed', handleAuth);

```

For allowed emails, the “authenticated” event triggers fine. But for blocked emails, it’s not triggering any of those events. I do see a warn in the browser console:

There was an error fetching the SSO data. This could simply mean that there was a problem with the network. But, if a “Origin” error has been logged before this warning, please add “[http://localhost:3000](http://localhost:3000)” to the “Allowed Web Origins” list in the Auth0 dashboard.

Is there a way to intercept the error from the Action to render in the UI (that their email is not allowed)?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [March 7, 2025, 5:25pm UTC](https://community.auth0.com/t/how-do-i-show-error-message-from-post-login-action-deny-into-auth0-lock/183478/3 "2025-03-07T17:25:56Z")

</div>

Hi @baohouse

Please check out these community posts regarding the matter which I believe can be helpful:

- [Pre-Registration Action calls api.access.deny, how to show specific message in Universal Login - #4 by jesse2](https://community.auth0.com/t/pre-registration-action-calls-api-access-deny-how-to-show-specific-message-in-universal-login/94025/4)
- [Auth0 still lacks the ability to show custom error message when using custom HTML universal login page](https://community.auth0.com/t/auth0-still-lacks-the-ability-to-show-custom-error-message-when-using-custom-html-universal-login-page/104639)

Let me know if you have any other questions!

Kind Regards,  
Nik

---

<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 21, 2025, 5:26pm UTC](https://community.auth0.com/t/how-do-i-show-error-message-from-post-login-action-deny-into-auth0-lock/183478/4 "2025-03-21T17:26:23Z")

</div>

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