Polished Now Supports Shiny Rmds

[This article was first published on Posts on Tychobra, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

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, polished users have 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 is not straightforward.

Polished now allows you to secure you 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 is touch if you have questions or feedback! I’d love to hear from you.

To leave a comment for the author, please follow the link and comment on their blog: Posts on Tychobra.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)