config: Config

configR Documentation

Config

Description

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

Usage

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.

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.

Value

Path to file.

Environment Variables

  • FIREBASE_API_KEY

  • FIREBASE_PROJECT_ID

  • FIREBASE_AUTH_DOMAIN

  • FIREBASE_STORAGE_BUCKET

  • FIREBASE_APP_ID

  • FIREBASE_DATABASE_URL

Note

Do not share this file with anyone.

Examples

## Not run: firebase_config("xXxxx", "my-project")


firebase documentation built on July 9, 2023, 7:07 p.m.