Login Module for Shiny with local User and Password. This must be added in the server section (no need to add UI)
Arguments
- input, session
Shiny's input and session objects.
- users, pwds
Character Vector. User and password combinations accepted
- logo
Character. Select image for logo display. Host local file in your www directory preferably
- logo_height
Character. Height for rendering the logo.
- lang
Character. Language. Currently accepted: es, en
- style
List. Possible values for styling the module such as
botton_txt_colour
andbotton_bgd_colour
.- change_text
Named list. Change the default texts used.
- logged
Boolean. You might want to set to TRUE when developing or testing your app so this module doesn't show up every time. Check the personal parameter as well
- personal
Character vector. If you wish to auto-login certain user(s), set the values from
Sys.info()[["nodename"]]
.
Examples
if (interactive()) {
ui <- fluidPage("Hello lareshiny!")
server <- function(input, output, session) {
login <- module_login(input, session, personal = "")
observe({
if (login$authenticated) message("We are in!")
})
}
shinyApp(ui, server)
}