shinyproxy icon indicating copy to clipboard operation
shinyproxy copied to clipboard

external-app: logout + login

Open kramerrs opened this issue 4 months ago • 1 comments

We have an app that we set as an external url ( external-app: ) in the application .yml. We were required to set an app timeout. Which we do by redirecting to the logout URL. However, when the user logs back in ShinyProxy logs the user back into our main portal.

Is there anyway to redirect the user back to the same app on relogin after being logged out?

kramerrs avatar Aug 18 '25 17:08 kramerrs

Hi

I believe this is quite difficult to achieve. We cannot store the last app in a cookie or the local storage of a browser, since on logout all this information should be removed.

At the same time, it would be difficult to store this server side, since it would cause issues if the users logs in using multiple browsers.

Since this is quite a specific use case, you could have a look to implement this using a bit of JS in a custom template. For example, in your logout code, you set a cookie with the app id. When the user then opens the landing page, you check this cookie and redirect the user to the app. But note that this information is then stored, even if the user is logged out (this might not be allowed by some cybersec policies).

LEDfan avatar Aug 22 '25 14:08 LEDfan