4

I'm working on the implementation of some Cloud Functions for Firebase and one of these require some configuration to call external providers.

I was able to successfully configure these values using firebase functions:config:set key="value" but I was wondering what are the actors able to read this value.

Is the function the only capable of read it? Should I encrypt "value"? At the end will have to have the key in order to decrypt it.

Thanks

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
martosoler
  • 423
  • 1
  • 5
  • 10

1 Answers1

2

Environment configuration is created exactly for keeping some settings or 3rd-party services keys.

Only your google functions will be able to extract the value on remote environment. Also you can check those values locally using firebase functions:config:get key command.

To get those variables from the code of your function use this:

const functions = require('firebase-functions');
const someEnvVar = functions.config().key  
// where key is name of key you setted before

See more in official docs

Artem Arkhipov
  • 7,025
  • 5
  • 30
  • 52