0

As i have 2 different projects its not possible to use functions.pubsub.topic i.e.

    exports.helloPubSub = functions.pubsub.topic('topic-name').onPublish((message) => {
  // ...
});

i managed to invoke/subscriptions-work using regular Firebase HTTP functions / https.onRequest function but as there is no way to verify auth token sent from Service accounts on function call, this option is also not working for me.

is there any way to call HTTPS callable functions directly from pubsub subscriptions or any other way to achieve this

The Black Horse
  • 2,328
  • 1
  • 14
  • 21

1 Answers1

0

You cannot achieve this through triggering a function in PubSub, however you might be able to do it by using additional conditions inside the callable functions to, for example, check the service account and try to get it's auth token, an you can do it by using Identity-Aware Proxy (IAP).

You can find an example and explanation on the concepts behind IAP in this documentation, also, you can refer to this community answer as an example of how to use IAP to authenticate accounts between different GCP products.

NOTE: The documenation provided uses AppEngine, however, Cloud Functions also supports IAP so it also applies.

Ralemos
  • 5,571
  • 2
  • 9
  • 18