I have two Firebase projects, A and B. When a user follows another user on Project A, data is written to /followers/{followedUid}/{followerUid}
. I would like to perform this same update to Project B.
Users of Project A aren't (can't be) authorized to write to Project B, so I need to use a cloud function. I already do things like this with Node.js functions and firebase-admin using service accounts, but here I want to use a function deployed to Firebase.
How can I add or reference a service account, or otherwise authorize a second project in a Firebase cloud function?