Polished Now Supports Shiny Rmds

Andy Merlino



tldr: You can now use polished to secure Rmarkdown documents that use the shiny runtime. This includes flexdashboards!

For example, if you have a flexdashboard that uses shiny. e.g.

Your Rmd Shiny App

With a single function call, you can add an authentication layer with prebuilt sign in / registration pages, a user admin dashboard, and many other features. Here is an example sign in page:

Sign In Page

For a while now, users have been able to use polished to secure traditional shiny apps and static documents, but polished did not support Rmarkdown documents using the shiny runtime (I’ll refer to Rmarkdown documents using the shiny runtime as “Shiny Rmds”). This was unfortunate as Shiny Rmds are popular, and, since the actual shiny app is generated behind the scenes by rmarkdown, adding authentication to Shiny Rmds is not straightforward.

Polished now allows you to secure your Shiny Rmd by calling the polished::secure_rmd() function. Make sure you have the development version of polished installed before trying it out. You can install it with:


Here is a full example:

You can sign into the above live app with:

The polished::secure_rmd() function takes the shiny app generated by the your Shiny Rmd and wraps polished authentication around it. You can specify the arguments to secure_rmd() in your Shiny Rmd YAML header, or you can pass the arguments to the secure_rmd() function directly.

You can then deploy your app anywhere you can host a regular shiny app, including Polished Hosting. To deploy to Polished Hosting, use the polished::deploy_app() function the same way you would deploy a regular shiny app.

Additional docs available here:

Please get in touch if you have questions or feedback! We’d love to hear from you.

comments powered by Disqus