protectedServerJS | R Documentation |
Returns ShinyJS-compatible JS code to support cookie-based token storage.
protectedServerJS()
## Not run:
jscookie_src <- "https://cdnjs.cloudflare.com/ajax/libs/js-cookie/2.2.0/js.cookie.js"
ui <- fluidPage(
shiny::tags$head(
shiny::tags$script(src = jscookie_src)
),
useShinyjs(),
extendShinyjs(text = solvebio::protectedServerJS(),
functions = c("enableCookieAuth", "getCookie", "setCookie", "rmCookie"))
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.