thisbejim / Pyrebase

A simple python wrapper for the Firebase API.
2.06k stars 527 forks source link

Add support for firebase AppCheck #394

Open Bark-fa opened 3 years ago

Bark-fa commented 3 years ago

Hi, it would be great if you could add support for firebase AppCheck By using AppCheck one can protect their backend infrastructure from being abused by attackers/malicious users, however, an engineering problem presents itself, there's no way of enabling AppCheck for a single app, it needs to be enabled project wise, for all apps.

I for example have an android app as the front-end and a python backend and use real-time database, the python code fetched data from a website and updates the firebase real-time Database, Enabling AppCheck for the android app is as simple as adding one line of code, but currently, there doesn't seem to be a way to enable it in python, and since the feature must be enabled project-wise, once I enforce it for Android it's also going to start enforcing it for the python backend web app, and since pyrebase doesn't support this feature any read/write operation would be rejected.

Currently, the only "feasible" solution is to re-write the backend in JavaScript.

Neutron-Jimmy commented 1 year ago

Were you able to come up with a solution to this issue? I'm currently dealing with the same problem.

AsifArmanRahman commented 1 year ago

headers = {"X-Firebase-Appcheck": "APPCHECK TOKEN HERE"}

Is that all it requires? If so, I'll try to implement a way for it to be configured in the library it-self.