The newest release of polished
, 0.6.0, is now on CRAN. The biggest user facing enhancement of this release is the new ability to secure R Markdown documents using Polished Auth. The secured R Markdown output can be a static document, or it can use the shiny
runtime. We discussed this capability in more detail in a previous post here.
Another welcome addition in this release is the ability to access each polished
users' data via the session$user
object. By default, polished
now passes the signed in user's data to session$user
. This won't break any of your existing polished
Shiny apps as the signed in user's data will always still be available at session$userData$user()
as it has been in all previous polished
releases.
Polished
has historically stored the user's data at this session$userData$user()
location because that is where shiny
recommends shiny
developers and package authors store arbitrary user data. However, as long as you are not using an RStudio hosting option, session$user
is usually unused, and, with polished
, you can now use it as an alias to session$userData$user()
. If you need access to session$user
as set by RStudio Connect (or another RStudio hosting option), set the override_user
argument of polished_config()
to FALSE
.
The largest change in this release was an internal refactor of many of the objects and functions for managing Polished Auth. We switched from using a single large R6
class to a base R environment and regular R functions (rather than R6
methods). This change was inspired by our development efforts on a new package, polishedpayments
. polishedpayments
makes it easy to add Stripe payments to your polished
Shiny app. polishedpayments
sits between polished
and your custom Shiny app. It needs to intercept the polished
user and handle the user based on your selected polished
and polishedpayments
options before passing the user along to your Shiny app.
In our earlier development of polishedpayments
, we were having difficulty integrating polishedpayments
with polished
. After this refactor, the integration is much more seamless. We plan to continue development on other R packages that similarly provide middleware between the polished
users and the your custom polished
Shiny app. We will share more details on polishedpayments
and how you can write similar packages in upcoming blog posts. In the meantime, the source code for polishedpayments
can be found here & the development version of the package can be installed with remotes::install_github("Tychobra/polishedpayments")
.
There are several other minor updates in this polished
release. See the release notes for a full list of updates.
Please subscribe below if you'd like to be notified when new blog posts are released. As always, please reach out if you have suggestions, feedback, or just want to get in touch!
Top comments (0)