0

I'm new to Firebase, and I'm not sure I'm going about what I'm trying to do the right way, but my question is essentially the title. For an app, I'd like to restrict my functions in Firebase to only be available on a custom hostname I've configured. I'm not sure if there is an easy enough way to do this without creating separate Firebase projects?

My main goal is to setup the functions to respond on a url like api.myapp.com while hooking into authentication that can have callback emails that are sent from myapp.com. I've done some digging and can't seem to find much on how to go about this. Thanks in advance!

Dharmaraj
  • 47,845
  • 8
  • 52
  • 84
Su_toL
  • 167
  • 2
  • 15
  • I think you are looking for [Firebase App Check](https://firebase.google.com/docs/app-check). Have you checked that out already? – Dharmaraj Dec 27 '22 at 16:09
  • 1
    If you want to prevent the Cloud Functions being called from other domains, have a look at https://stackoverflow.com/questions/65347293/only-allow-firebase-cloud-functions-through-hosting-rewrites – Frank van Puffelen Dec 27 '22 at 16:10

1 Answers1

0

The documentation says

The steps required to set up API Gateway to manage and secure a Cloud Functions backend service are outlined in the API Gateway Quickstarts.

Documentation also says

API Gateway uses Identity and Access Management (IAM) to control access to your API.

IAM is very granular and would allow you to specify domain names for allow action.

Ronnie Royston
  • 16,778
  • 6
  • 77
  • 91