# Logout from Lock w/o redirect?

**URL:** <https://community.auth0.com/t/logout-from-lock-w-o-redirect/18875>\
**Category:** Get Help\
**Tags:** lock\
**Created:** [December 9, 2018, 5:10pm UTC](https://community.auth0.com/t/logout-from-lock-w-o-redirect/18875 "2018-12-09T17:10:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![heike](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/heike/32/10402_2.png) [@heike](https://community.auth0.com/u/heike)\
**Post date:** [December 9, 2018, 5:10pm UTC](https://community.auth0.com/t/logout-from-lock-w-o-redirect/18875/1 "2018-12-09T17:10:34Z")

</div>

I am using the lock widget (v11) for user login:

> ```
> lockAuth(e) {
> this.lock.show()
> }
> 
> ```

For logout I am using the following code:

> ```
> lockLogout() {
> this.lock.logout(
> {
> returnTo: window.location.href
> }
> )
> }
> 
> ```

This leads to a reload of my application after each logout.

I would like to avoid the redirect after login and rather not reload my SPA after logout. Is this possible?

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [December 16, 2018, 5:25pm UTC](https://community.auth0.com/t/logout-from-lock-w-o-redirect/18875/2 "2018-12-16T17:25:44Z")

</div>

If you remove the `returnTo` parameter, Auth0 will just show an “OK” message instead of redirecting to the `returnTo` URL. Or you can also provide a different URL pointing to a lightweight page served from your app domain that simply shows a logout message.

---

<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:** [August 28, 2019, 2:46pm UTC](https://community.auth0.com/t/logout-from-lock-w-o-redirect/18875/3 "2019-08-28T14:46:30Z")

</div>

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