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