Home > OS >  Does "allUsers" in Cloud Functions allow only the users of my app?
Does "allUsers" in Cloud Functions allow only the users of my app?

Time:11-05

I recently started working with firebase functions. My intention is to have a function that "all users" within my app can use. More specifically I want everyone that is signed in to their account to be able to call this function. You can't reach calling the function without being logged in.

Would it be appropriate to use the authentication "allUsers" to this function in google cloud, or does this tag mean more than what I specified?

CodePudding user response:

The Cloud Functions setting "allUsers" allows all users, not just those of your app. If you want to restrict usage to just the users of your app, have a look at Firebase App Check which you can use to enforce this requirement.

As @ESun commented too, if your users are signing in with Firebase Authentication, you can validate that too. See How to protect firebase Cloud Function HTTP endpoint to allow only Firebase authenticated users?

  • Related