slack_shiny_ui: Require Slack login to a Shiny app

View source: R/wrapper.R

slack_shiny_uiR Documentation

Require Slack login to a Shiny app

Description

This is a function factory that wraps a Shiny ui. If the user does not have a cookie for that site, they are prompted to login. Once they have a cookie, the UI displays as normal. #5

Usage

slack_shiny_ui(
  ui,
  team_id,
  expiration = 90,
  shinyslack_key = Sys.getenv("SHINYSLACK_KEY")
)

Arguments

ui

A 0- or 1-argument function defining the UI of a Shiny app, or a shiny::tagList().

team_id

The Slack team ID through which the user is being authenticated.

expiration

Days after which the cookie should expire. To remove an HttpOnly cookie, send a negative value for this attribute.

shinyslack_key

(optional) A key to use to encrypt the string. If not set, the string is returned unencrypted.

Value

A function defining the UI of a Shiny app (either with login or without).


r4ds/shinyslack documentation built on March 26, 2024, 4:26 a.m.