deploy functions firebase
$ firebase deploy --only functions
view firebase functions config
firebase functions:config:get
firebase functions config
const functions = require('firebase-functions');const request = require('request-promise');exports.userCreated = functions.database.ref('/users/{id}').onWrite(event => { let email = event.data.child('email').val(); return request({ url: 'https://someservice.com/api/some/call', headers: { 'X-Client-ID': functions.config().someservice.id, 'Authorization': `Bearer ${functions.config().someservice.key}` }, body: {email: email} });});
firebase functions config
{ "someservice": { "key":"THE API KEY", "id":"THE CLIENT ID" }}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us