Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcoded Firebase API key found #2

Open
marnixbent opened this issue Nov 11, 2022 · 1 comment
Open

Hardcoded Firebase API key found #2

marnixbent opened this issue Nov 11, 2022 · 1 comment

Comments

@marnixbent
Copy link

Hi,

I just stumbled across this line where I found (potentially live ) hardcoded API details for firebase. Take care!

apiKey: "AIzaSyDYXNe8SruSoEgaWWXyiIgZmGBm2xCleQ4",

@saltycrane
Copy link
Owner

Hi Marnix, thank you for alerting me to this. This scared me, but I just looked at the Firebase documentation and it says it is ok to include API keys in the code:

Unlike how API keys are typically used, API keys for Firebase services are not used to control access to backend resources; that can only be done with Firebase Security Rules (to control which users can access resources) and App Check (to control which apps can access resources).

Usually, you need to fastidiously guard API keys (for example, by using a vault service or setting the keys as environment variables); however, API keys for Firebase services are ok to include in code or checked-in config files.

from https://firebase.google.com/docs/projects/api-keys#api-keys-for-firebase-are-different

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants