Authentication
Get Started
Custom Branding
Social Sign In
Rmarkdown
Hosting
Get Started
Custom Domains
Database Connections
PDF Generation
Rmarkdown
API


Secure Rmarkdown


You can use Polished Authentication to secure Rmarkdown documents. Flexdashboard, html_output, and pdf_output are all supported. You can even use Rmarkdown with Shiny runtime!

Use the secure_rmd() function to secure an Rmarkdown document.

secure_rmd() is currently only available with the development version of polished on GitHub. After installing the development version of polished from GitHub, see an example app with Shiny runtime here.

I recommend creating an "app.R" file in the same directory as your Rmarkdown document, and, in "app.R", include the call to secure_rmd() as shown in this example code.

You can specify the arguments to pass to secure_rmd() in the YAML header of your Rmarkdown document. Below is a minimal YAML header to set up your .Rmd with polished.

---
polished:
  app_name: "<your Polished app name>"
---


And here are are all the values you can pass to polished in the YAML header of your .Rmd. All the YAML values not in the above code block are optional.

---
polished:
  app_name: "<your Polished app name>"
  api_key: "<your Polished API key>"
  firebase_config: "<your Firebase config>"
  admin_mode: false
  is_invite_required: true
  sign_in_providers: "email"
  is_email_verification_required: true
  is_auth_required: true
  cookie_expires: 365
  sign_in_page:
    color: "#006CB5"
    company_name: "Tychobra"
    logo: "<path to your logo image>"
    background_image: "<path to your background image>"
---


See ?polished_config for additional detail on the arguments you can pass to the above "polished" YAML value. Additional docs and examples of Rmd documents using Polished are available in the secure_rmd() function documentation.

Next Steps


Now that your authentication is all set, you can optionally go to the next page for instructions on how to deploy your Shiny app with Polished Hosting.






Secure Rmarkdown


You can use Polished Authentication to secure Rmarkdown documents. Flexdashboard, html_output, and pdf_output are all supported. You can even use Rmarkdown with Shiny runtime!

Use the secure_rmd() function to secure an Rmarkdown document.

secure_rmd() is currently only available with the development version of polished on GitHub. After installing the development version of polished from GitHub, see an example app with Shiny runtime here.

I recommend creating an "app.R" file in the same directory as your Rmarkdown document, and, in "app.R", include the call to secure_rmd() as shown in this example code.

You can specify the arguments to pass to secure_rmd() in the YAML header of your Rmarkdown document. Below is a minimal YAML header to set up your .Rmd with polished.

---
polished:
  app_name: "<your Polished app name>"
---


And here are are all the values you can pass to polished in the YAML header of your .Rmd. All the YAML values not in the above code block are optional.

---
polished:
  app_name: "<your Polished app name>"
  api_key: "<your Polished API key>"
  firebase_config: "<your Firebase config>"
  admin_mode: false
  is_invite_required: true
  sign_in_providers: "email"
  is_email_verification_required: true
  is_auth_required: true
  cookie_expires: 365
  sign_in_page:
    color: "#006CB5"
    company_name: "Tychobra"
    logo: "<path to your logo image>"
    background_image: "<path to your background image>"
---


See ?polished_config for additional detail on the arguments you can pass to the above "polished" YAML value. Additional docs and examples of Rmd documents using Polished are available in the secure_rmd() function documentation.

Next Steps


Now that your authentication is all set, you can optionally go to the next page for instructions on how to deploy your Shiny app with Polished Hosting.