use_shinyOAuth: Add JavaScript dependency to the UI of a Shiny app
Description
Adds the package's client-side JavaScript helpers as an htmlDependency to
your Shiny UI. This enables features such as redirection and setting
the browser cookie token.
Without adding this to the UI of your app, the oauth_module_server() will not function.
Usage
use_shinyOAuth(inject_referrer_meta = TRUE)
Value
A tagList containing a singleton dependency tag that ensures the JS
file inst/www/shinyOAuth.js is loaded
Arguments
inject_referrer_meta
If TRUE (default), injects a
<meta name="referrer" content="no-referrer"> tag into the document
head. This reduces the risk of leaking OAuth callback query parameters
(like code and state) via the Referer header to third-party
subresources during the initial callback page load.
Details
Place this near the top-level of your UI (e.g., inside fluidPage() or
tagList()), similar to how you would use shinyjs::useShinyjs().