# Logout button does not work (using Auth0)

**URL:** <https://support.openanalytics.eu/t/logout-button-does-not-work-using-auth0/1480>\
**Category:** ShinyProxy\
**Created:** [December 21, 2019, 12:24pm UTC](https://support.openanalytics.eu/t/logout-button-does-not-work-using-auth0/1480 "2019-12-21T12:24:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WillP](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/willp/32/296_2.png) [@WillP](https://support.openanalytics.eu/u/WillP)\
**Post date:** [December 21, 2019, 12:24pm UTC](https://support.openanalytics.eu/t/logout-button-does-not-work-using-auth0/1480/1 "2019-12-21T12:24:17Z")

</div>

Hi there,  
I’ve been trying for quite a while to get the logout button to work on my ShinyProxy app, but have failed. I don’t know what I’m doing wrong, and would really appreciate some help.

My app is running in app\_direct mode. As a result, I’ve been using the HTML function in Shiny to add the code for the button to the app:  
`HTML('<a role="button" style="position: absolute; top: 100px; margin-right:20px; right:0px;" class="btn btn-primary btn-sm" th:href="@{/logout}" th:if="${isLoggedIn}">Log out</a>')`  
…with this in the application.yml:  
`logout-url: https://myauth0username.auth0.com/v2/logout?returnTo=https%3A%2F%2Fmyappaddress.com`  
This approach seems to have no effect at all. The button just doesn’t do anything.

I’ve also tried to add the logout address manually. This actually does something, but still doesn’t return the app to the auth0 login screen. Instead, it just returns to the app, still logged in:  
`HTML('<a role="button" style="position: absolute; top: 100px; margin-right:20px; right:0px;" class="btn btn-primary btn-sm" href="https://myauth0username.auth0.com/v2/logout?returnTo=https%3A%2F%2Fmyappaddress.com" th:if="${isLoggedIn}">Log out</a>')`

Anyone know what I need to do to get the button to log the user out and then return to the auth0 log in screen?

Any help greatly appreciated,  
Will

---

<div class="post-metadata">

**Author:** ![WillP](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/willp/32/296_2.png) [@WillP](https://support.openanalytics.eu/u/WillP)\
**Post date:** [December 26, 2019, 4:31pm UTC](https://support.openanalytics.eu/t/logout-button-does-not-work-using-auth0/1480/2 "2019-12-26T16:31:06Z")

</div>

I found the solution here: [Custom CSS Styling](https://discourse.openanalytics.eu/t/custom-css-styling/562/6)  
See the comments by @fifthace and @fmichielssen on adding the logout button. Thanks guys!

Will

---

<div class="post-metadata">

**Author:** ![TMTK](https://support.openanalytics.eu/letter_avatar_proxy/v4/letter/t/f08c70/32.png) [@TMTK](https://support.openanalytics.eu/u/TMTK)\
**Post date:** [September 9, 2024, 2:49pm UTC](https://support.openanalytics.eu/t/logout-button-does-not-work-using-auth0/1480/3 "2024-09-09T14:49:31Z")

</div>

I know it is an old thread but I have the same problem. Unfortunately, the link is broken. Can anyone please post the solution here?

---

<div class="post-metadata">

**Author:** ![tdekoninck](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/tdekoninck/32/1079_2.png) [@tdekoninck](https://support.openanalytics.eu/u/tdekoninck)\
**Post date:** [September 12, 2024, 12:16pm UTC](https://support.openanalytics.eu/t/logout-button-does-not-work-using-auth0/1480/4 "2024-09-12T12:16:48Z")

</div>

The link points to [Custom CSS Styling - #6 by fifthace](https://support.openanalytics.eu/t/custom-css-styling/562/6) .  
Feel free to open a new topic for your issue. You can also have a look at the documentation on the logout-url here: [Configuration | ShinyProxy](https://shinyproxy.io/documentation/configuration/#openid-logout-url)

---

<div class="post-metadata">

**Author:** ![WillP](https://support.openanalytics.eu/user_avatar/support.openanalytics.eu/willp/32/296_2.png) [@WillP](https://support.openanalytics.eu/u/WillP)\
**Post date:** [September 13, 2024, 4:10pm UTC](https://support.openanalytics.eu/t/logout-button-does-not-work-using-auth0/1480/5 "2024-09-13T16:10:24Z")

</div>

Yes, exactly as the comment link @tdekoninck suggests. All I did when I was doing this was add a logout path to the end of my app domain in the hyperlink for a button, e.g. href = “[https://myshinyapp.com/logout](https://myshinyapp.com/logout)”
