Logout from Lock w/o redirect?

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?

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.

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