Configure Firebase, either using a config file or by setting environment variables (see section below).

firebase_config(
  api_key,
  project_id,
  auth_domain = NULL,
  storage_bucket = NULL,
  app_id = NULL,
  database_url = NULL,
  overwrite = FALSE
)

Arguments

api_key

API key of your project.

project_id

Id of your web project.

auth_domain

Authentication domain, if NULL attempts to build firebase's default domain.

storage_bucket

URl to the bucket. if NULL attempts to build firebase's default storage domain.

app_id

Application ID, necessary for Analytics.

database_url

URL to the database, required to use the RealtimeDatabase.

overwrite

Whether to overwrite any existing configuration file.

Value

Path to file.

Details

Creates the configuration file necessary to running fireblaze. Note that if you changed the project you must use said ID here, not the one originally created by Google.

Classes of the package look first for the configuration file then, if not found look for the environment variables.

Note

Do not share this file with anyone.

Environment Variables

  • FIREBASE_API_KEY

  • FIREBASE_PROJECT_ID

  • FIREBASE_AUTH_DOMAIN

  • FIREBASE_STORAGE_BUCKET

  • FIREBASE_APP_ID

  • FIREBASE_DATABASE_URL

Examples

if (FALSE) firebase_config("xXxxx", "my-project")