Logout button does not work (using Auth0)

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

I found the solution here: Custom CSS Styling
See the comments by @fifthace and @fmichielssen on adding the logout button. Thanks guys!

Will

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?

The link points to Custom CSS Styling - #6 by fifthace .
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

1 Like

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