Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R fix empty site_url in initialize_users function Mar 13, 2019
ci init Mar 8, 2019
examples
man
tests
DESCRIPTION
NAMESPACE
README.md
circle.yml
mock_server.py
shiny.users.Rproj

README.md

shiny.users

Basic authorization support for Shiny applications.

CircleCI

Visit Shiny Users web portal to receive your APP KEY.

Install

Command line: R -e 'devtools::install_git("git@github.com:Appsilon/shiny.users.package.git")'

R: devtools::install_git("git@github.com:Appsilon/shiny.users.package.git")

Example

library(shiny)
library(shiny.users)

# get your shiny.users key from here: https://shinyusers-app.appsilon.com
SHINY.USERS.APP_KEY <- "1337"

ui <- shinyUI(fluidPage(
  div(class = "container",
    style = "padding: 4em",
    login_screen_ui("login_screen"),
    uiOutput("authorized_content")
  )
))

server <- shinyServer(function(input, output) {
  users <- initialize_users(SHINY.USERS.APP_KEY)

  callModule(login_screen, "login_screen", users)

  output$authorized_content <- renderUI({
    if (!is.null(users$user())) {
      tagList(
        shiny::numericInput("secret_input", "Input secret number", 0),
        uiOutput("secret_output")
      )
    }
  })
  output$secret_output <- renderUI({
    span(as.numeric(input$secret_input) * 2)
  })
})

shinyApp(ui, server)

More examples are in the examples folder.

You can’t perform that action at this time.