Tychobra / polished

Authentication and Administration for Shiny apps
https://polished.tech
Other
234 stars 36 forks source link

Flex template #163

Closed merlinoa closed 2 years ago

merlinoa commented 2 years ago

There is a new template for using polished with flexdashboards. If you click in Rstudio to create a new .Rmd you can start with the new polished flexdashboard template in the normal Rstudio way here:

Screen Shot 2021-12-10 at 3 15 34 PM

If you click the "Knit" button in Rstudio Screen Shot 2021-12-10 at 3 31 35 PM , it will simply knit a normal Rmd (i.e. polished auth will not be included).

However, if you use the new polished::secure_render("<your rmd file path.Rmd>") function, the Rmd document will be rendered with polished auth.

Polished must be configured via options set in the YAML header of the Rmd. All arguments passed to global_sessions_config() can be set in the YAML header and a limited set of secure_ui arguments can be set in the YAML header to customize the look of the sign in / register pages. See the template for all possible secure_ui options.

polished::secure_render() supports html_document, pdf_document, flexdashboard output formats. You can use flexdashboard and html_document with Shiny! i.e. runtime = shiny

See the docs at ?secure_render for 4 example Rmds that you can render with polished::secure_render.

@phoward38 please review for merge