Setting shiny.user from code?




Is it possible to set the Shiny.user variable from within a shiny app?
I would like to set it based on the header (HTTP_X_AUTH_USERNAME) that is passed into Shiny so that I can take advantage of the user tracking example in

Setting the session$user directly in the server function didn’t seem to work.




You can do this if you are using Shiny Server Pro: If not, you would have to get that variable to the client some other way besides session$user/Shiny.user.


Fantastic, thanks. It appears a similar approach works for Rstudio Connect.