polished
authenticationglobal configuration for polished
authentication
polished_config(
app_name,
api_key = get_api_key(),
firebase_config = NULL,
is_invite_required = TRUE,
sign_in_providers = "email",
is_email_verification_required = TRUE,
cookie_expires = 365L,
is_auth_required = TRUE,
is_two_fa_required = FALSE
)global_sessions_config(...)
invisible(NULL)
the name of the Shiny app.
the polished
API key, available at https://dashboard.polished.tech.
if using Social Sign In (see https://polished.tech/docs/03-social-sign-in
for more documentation), a list containing your Firebase project configuration (Default: NULL
).
This list should have the following named elements:
apiKey
authDomain
projectId
TRUE
by default. Whether or not to require the user to have an
invite before registering/signing in
a character vector of sign in providers to enable. Valid values are "google"
"email"
, "microsoft"
, and/or "facebook"
. Defaults to "email"
.
TRUE
by default. Whether or not to require the user to
verify their email before accessing your Shiny app.
the number of days before a user's cookie expires.
Set to NULL
to force Sign Out at session end. This argument is passed to
the expires
option in js-cookie: https://github.com/js-cookie/js-cookie#expires.
Default value is 365L
(i.e. 1 year)
TRUE
by default. Whether or not to require users to be signed
in to access the app. It can be useful to set this argument to FALSE
if you want to
allow users to do certain actions (such as viewing charts and tables) without signing in,
and only require users to sign in if they want to save data to your database.
boolean specifying whether or not 2 factor authentication is required. Defaults
to FALSE
.
arguments to pass to polished_config
This is the primary function for configuring polished
. It configures your app's instance of
the Polished
class that manages polished
authentication. Call this function in
your global.R
file. See https://github.com/Tychobra/polished/blob/master/inst/examples/polished_example_01/global.R
for a complete example.
if (FALSE) {
# global.R
polished_config(
app_name = "",
api_key = "",
firebase_config = list(
apiKey = "",
authDomain = "
Run the code above in your browser using DataLab