This function is used to secure your Shiny app's server function. Make sure to pass
your Shiny app's server function as the first argument to secure_server()
at
the bottom of your Shiny app's server.R
file.
secure_server(
server,
custom_sign_in_server = NULL,
custom_admin_server = NULL,
allow_reconnect = FALSE,
override_user = TRUE
)
A Shiny server function (e.g function(input, output, session) {}
)
Either NULL
, the default, or a Shiny module server containing your custom
sign in server logic.
Either NULL
, the default, or a Shiny module server function containing your custom admin
server functionality.
argument to pass to the Shiny session$allowReconnect()
function. Defaults to
FALSE
. Set to TRUE
to allow reconnect with shiny-server and RStudio Connect. Set to "force"
for local testing. See https://shiny.rstudio.com/articles/reconnecting.html for more information.
whether or not to override the session$user
with the polished
session$userData$user
user. By default this is now set to TRUE
, but if you are
using a hosting option that uses the session$user
(e.g. RStudio Connect), then you
may want to set this to FALSE. The polished user can always be found at session$userData$user()
.