# Close button to step back

**URL:** <https://community.auth0.com/t/close-button-to-step-back/63226>\
**Category:** Product Feedback\
**Tags:** ui, ux, lock\
**Created:** [May 23, 2021, 1:29pm UTC](https://community.auth0.com/t/close-button-to-step-back/63226 "2021-05-23T13:29:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naren](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/naren/32/13118_2.png) [@Naren](https://community.auth0.com/u/Naren)\
**Post date:** [May 23, 2021, 1:29pm UTC](https://community.auth0.com/t/close-button-to-step-back/63226/1 "2021-05-23T13:29:14Z")

</div>

**Please provide cancel/back button options in universal login**

**Customisation option to close the Login/signup form to redirect back to Origin**

Just like this: [Providing redirect to the close button when using the hosted universal login](https://community.auth0.com/t/providing-redirect-to-the-close-button-when-using-the-hosted-universal-login/11738)

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 24, 2021, 10:35am UTC](https://community.auth0.com/t/close-button-to-step-back/63226/2 "2021-05-24T10:35:56Z")

</div>

Thanks for sharing this feedback. Let’s see how many people will be interested in such feature!

---

<div class="post-metadata">

**Author:** ![charlesbullis](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/charlesbullis/32/12821_2.png) [@charlesbullis](https://community.auth0.com/u/charlesbullis)\
**Post date:** [September 17, 2021, 6:44pm UTC](https://community.auth0.com/t/close-button-to-step-back/63226/3 "2021-09-17T18:44:31Z")

</div>

Hi, I’m evaluating Auth0 for integration into an online service. The very first thing I noticed is the user can’t back out of the Universal Login page. This is such a glaring omission that I at first thought there is some fundamental reason for it’s absence. Can you dig a little deeper into this? This is a violation of fundamental UX design principals, so it’s worth the extra effort on your part.

---

<div class="post-metadata">

**Author:** ![Omer\_G](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/omer_g/32/37606_2.png) [@Omer\_G](https://community.auth0.com/u/Omer_G)\
**Post date:** [November 29, 2022, 7:47pm UTC](https://community.auth0.com/t/close-button-to-step-back/63226/4 "2022-11-29T19:47:55Z")

</div>

Writing to anyone who might search for it. You can add it manually by entering the following code to the Universal Login custom page.  
**After lock.show()**, add:

```auto
let closeButton = document.querySelector(".auth0-lock-close-button");
closeButton.addEventListener('click', function handleClick(event) {
			history.back()
});

```

---

<div class="post-metadata">

**Author:** ![andresr](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andresr/32/42140_2.png) [@andresr](https://community.auth0.com/u/andresr)\
**Post date:** [December 22, 2022, 10:51pm UTC](https://community.auth0.com/t/close-button-to-step-back/63226/5 "2022-12-22T22:51:54Z")

</div>

I have done this but it does not change anything in my universal login page, is there any other step that I might be missing?

---

<div class="post-metadata">

**Author:** ![andresr](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andresr/32/42140_2.png) [@andresr](https://community.auth0.com/u/andresr)\
**Post date:** [December 22, 2022, 11:20pm UTC](https://community.auth0.com/t/close-button-to-step-back/63226/6 "2022-12-22T23:20:09Z")

</div>

My bad, I was missing to set the closable property to true. If anyone is still struggling with this issue you need to do 2 things in the Universal Login custom page:

1. Find the `closable` property within the `var lock = new Auth0Lock(config.clientID, config.auth0Domain, {` code block and set it to true (it’s at the end of it).
2. Add the code suggested by Omer\_G after the line with `lock.show()`

I hope you find this helpfull 😉

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 23, 2022, 7:38am UTC](https://community.auth0.com/t/close-button-to-step-back/63226/7 "2022-12-23T07:38:37Z")

</div>

Thanks for sharing it with the rest of community @andresr !

---

<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:** [January 6, 2023, 7:38am UTC](https://community.auth0.com/t/close-button-to-step-back/63226/8 "2023-01-06T07:38:47Z")

</div>

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