Christian Genco

Firebase

Firestore #

Google Cloud Storage #

Firebase Cloud Functions #

Environment variables #

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

# get all environment variables
firebase functions:config:get

To read these environment variables from a firebase cloud function, use:

const functions = require("firebase-functions");

functions.config().someservice.id;

To populate environment variables in your local environment (ex: when using ``):

firebase functions:config:get > .runtimeconfig.json
echo .runtimeconfig.json >> .gitignore

Sources:

Error: Forbidden. Your client does not have permission to get URL /twitterSave from this server. #

Try explicitly allowing unauthenticated invocation of a function by adding the allUsers member id to the function with the Cloud Functions Invoker role in Google Cloud Console with this guide from Google.

Sources:

Deploying #

Functions deploy had errors with the following functions #

Try:

Sources: