Home > database >  Firebase function not serving routes when deployed
Firebase function not serving routes when deployed

Time:02-27

Some context to my problem: I'm wanting to write a firebase function including Express that sits in between a users' browser and the Notion API. I drafted up some code for minimal functionality which works with the local emulators firebase provides. I've tested the two routes locally, both are served properly and execute without error.

When I try to deploy the function all goes well. However, upon calling the route it responds with a 403 error page. No other errors logged, just this "Error: Forbidden" disclaimer.

Am I missing something really obvious here or using functions outside of their intended scope?

CodePudding user response:

I managed to fix it!

The 403 Error did originate from the cloud function itself. This answer explains it quite well - it's an issue of missing permissions when trying to call a function which is resolved by adding the Cloud Functions Invoker permission to the allUsers user of your cloud function.

  • Related