This is the primary function for configuring polished
. It configures your app's instance of the
Sessions
class that manages your user's polished
sessions. 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.
global_sessions_config(
app_name,
api_key,
firebase_config = NULL,
admin_mode = FALSE,
is_invite_required = TRUE,
sign_in_providers = "email",
is_email_verification_required = TRUE,
is_auth_required = TRUE,
sentry_dsn = NULL
)
the name of the app.
the API key. Either from https://polished.tech or your on premise polished
API
deployment.
a list containing your Firebase project configuration. This list should have the following named elements:
apiKey
authDomain
projectId
FALSE
by default. Set to TRUE
to enter the polished
Admin Panel without needing
to register and sign in. This is useful during development for inviting the first users to your app.
Make sure to set admin_mode = FALSE
before deploying your app.
TRUE
by default. Whether or not to require the user to have an
invite before registering/signing in
the 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.
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 user 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.
either NULL
, the default, or your Sentry project DSN.
# NOT RUN {
# }
# NOT RUN {
# global.R
global_sessions_config(
app_name = "<your app name>",
api_key = "<your API key>"
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab