Article

Firebase Cloud Functions Config

AOAnonymous One· Sep 1, 20221 min read
  • #Firebase
  • #Firebase Cloud Functions

Firebase Cloud Functions Config

Set, retrieve, and delete environment data:

To store environment data:

firebase functions:config:set someservice.key="THE API KEY" someservice.id="THE CLIENT ID"

After running ‘functions:config:set’, you must redeploy functions to make the new configuration available.

To retrieve current environment configuration:

firebase functions:config:get

To access environment configuration in a function:

import * as functions from 'firebase-functions';

API_KEY = functions.config().someservice.key;
API_ID = functions.config().somserservice.id;

To delete environment data:

firebase functions:config:unset someservice.key someservice.id

References:

0 Comments

Sign in to join the conversation.

Search

Jump to a page, story or project