Thanks a lot Jonathan. This is indeed exactly what I asked for.
Unfortunately, I did not realize that this does not solve my Oauth issue
.
Now with rstudioapi::translateLocalUrl I am able to extract the session specific url, each time different for each session and each user. However, on the Oauth2.0 server we are not allowed to use wildcards and thus we cannot configure a general redirect url.
We figured out the approach for published shiny apps (= fixed redirect url) but I can't seem to find the right solution that allows Oauth2 during shiny app development on the Rstudio Server.