Learn R Programming

polished (version 0.1.0)

global_sessions_config: Configuration for global sessions

Description

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.

Usage

global_sessions_config(
  app_name,
  api_key,
  firebase_config = NULL,
  admin_mode = FALSE,
  is_invite_required = TRUE,
  api_url = "https://api.polished.tech",
  sign_in_providers = c("google", "email")
)

Arguments

app_name

the name of the app.

api_key

the API key. Either from polished.tech or your on premise polished API deployment.

firebase_config

a list containing your Firebase project configuration. This list should have the following named elements:

  • apiKey

  • authDomain

  • projectId

admin_mode

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` to FALSE before deploying your app.

is_invite_required

TRUE by default. Whether or not to require the user to have an invite before registering/signing in

api_url

the API url. Defaults to "https://api.polished.tech".

sign_in_providers

the sign in providers to enable. Valid values are "google" "email", "microsoft", and/or "facebook". Defaults to c("google", "email").

Examples

Run this code
# 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