We would like to perform Oauth2 authentication in order to grant permission to api's in our shiny apps. While developing the apps, it would be great to allow the oauth dance with a redirect to the localhost like it was sketched by Hadley Wickham in: Sketch of shiny + oauth · GitHub
However, we use Rstudio Server Pro and when we test a shiny app we are not on "localhost" but on a Rstudioserver session. Does anyone know how I can extract the Rstudio Server session url and use that as a redirect url?
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.