Why is it possible to take firebase configs API key from my live project, use it in the firebase auth REST API and create anonymous user in my project?
I found that if you take API key from the client side firebase configs of any live system, and use it to call any REST API of firebase auth (API Docs: https://firebase.google.com/docs/reference/rest/auth) eg. Sign in anonymously, you will be actually creating user in that firebase project.
Tried solutions to prevent
- I googled and learnt solution that I can apply referrer restriction to the API Key from GCP Console to prevent requests from other domains. Workaround to pass that security is use Firebase REST Apis with spoofed referrer using tools like Postman.
Root issue
I believe firebase should have some security settings to avoid others creating users in my project authentication section. Why is it like that? Am i missing something?
Thanks in advance.