# Custom text when authentication failed

**URL:** <https://community.auth0.com/t/custom-text-when-authentication-failed/78256>\
**Category:** Get Help\
**Created:** [February 14, 2022, 7:20pm UTC](https://community.auth0.com/t/custom-text-when-authentication-failed/78256 "2022-02-14T19:20:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gwettstein](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gwettstein/32/20260_2.png) [@gwettstein](https://community.auth0.com/u/gwettstein)\
**Post date:** [February 14, 2022, 7:20pm UTC](https://community.auth0.com/t/custom-text-when-authentication-failed/78256/1 "2022-02-14T19:20:32Z")

</div>

Hello, I’m trying the Actions options to prevent that users log in on anothe applications. Works very well, but I want to change the text that it’s show on authentincation failed.

The action that I’m using is:

```auto
exports.onExecutePostLogin = async (event, api) => {

if (event.client.name === "Some App" && event.user.email=="some@mail.com") {
    api.access.deny("Usuario no autorizado para usar Some App);
  }
}

```

The `deny` text it’s showing in the Logs but in the browser I get this (please see the attached image):

`There was an error trying to log you in: ''`

 ![Captura de pantalla 2022-02-14 160812](https://global.discourse-cdn.com/auth0/original/3X/d/1/d1913254155a26e12922467f5246569723132a32.png)

It’s is possible to change that?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 24, 2022, 10:52pm UTC](https://community.auth0.com/t/custom-text-when-authentication-failed/78256/3 "2022-02-24T22:52:08Z")

</div>

Hey there @gwettstein ~ Did you ever get this working?

You should definitely be able to return a custom URL query String param here. I just set up a quick test action using the same code you shared and can confirm it’s possible (See below). I’d expect you to get a different error message so I assume the missing `"` in your custom error message is just a typo on this end.

 ![Screen Shot 2022-02-24 at 3.48.35 PM](https://global.discourse-cdn.com/auth0/original/3X/6/d/6dc1b52f3e62ed2ccda1b85b4ce0b8a1e2a8dc7d.png)

---

<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 11, 2022, 10:52pm UTC](https://community.auth0.com/t/custom-text-when-authentication-failed/78256/4 "2022-03-11T22:52:38Z")

</div>

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