toppsdown
toppsdown

Reputation: 401

Restricting Default Firebase API Key Restrictions

I've recently added Firebase authentication to my react native app. In the setup process, I set up the API keys for android/iOS to connect to firebase and included those in the app bundle.

By default, firebase allows access to 25 APIs, but some of these seem overly permissive.

Here's the list it grants access to:

In particular, the access to CloudSQL Admin API seems dangerous. I'd like to restrict the available APIs that seem unnecessary, but another SO post indicates that it may cause unexpected errors.

Anyone with more experience have any recommendations? Should I just not worry about it?

Upvotes: 0

Views: 37

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 599866

The Firebase FAQ contains this relevant question:

Which APIs are required in the "API restrictions" allowlist for a Firebase API key?

I recommend clicking the link, but from there it seems that these are the API/service names required for Authentication:

  • firebase.googleapis.com
  • logging.googleapis.com
  • identitytoolkit.googleapis.com
  • securetoken.googleapis.com

So I'd recommend starting with just these and testing if your app still works.

Upvotes: 1

Related Questions