Category : firebase-admin

What I’m trying to do is connect an emulator to an instance of firebase_admin for admin authentication and another instance for web authentication in the same api. The problem is that i cannot set the host of each emulator for each instance of firebase_admin. What happens is that it always takes the environment variable that ..

Read more

I just getting started with the firebase_admin package from a Jupyter notebook, I was able to import credentials module but when It comes for filestore nothing works!!. import firebase_admin from firebase_admin import credentials from firebase_admin import filestore I get the traceback: ImportError: cannot import name ‘filestore’ from ‘firebase_admin’ (C:XXXXXAnaconda3libsite-packagesfirebase_admin_init_.py) I try several things suchs as ..

Read more

I have written the following code : def check_token(token): response = requests.get("https://www.googleapis.com/robot/v1/metadata/x509/[email protected]") key_list = response.json() decoded_token = jwt.decode(token, key=key_list, algorithms=["RS256"]) print(f"Decoded token : {decoded_token}") I am trying to decode the token provided by firebase client side to verify it server-side. The above code is throwing the following exception : TypeError: Expecting a PEM-formatted key. I ..

Read more

I am getting error ‘Credentials’ object has no attribute ‘Certificate’. I already tried to reinstall the firebase_admin package. Traceback (most recent call last): File "main.py", line 29, in <module> cred = credentials.Certificate(‘./FStoreCredential/credentials.json’) AttributeError: ‘Credentials’ object has no attribute ‘Certificate’ Source: Python..

Read more

with HTTPS requests I send messages like this request.setRawHeader("Content-Type","application/json"); request.setRawHeader("Authorization",…); QJsonObject notification; notification["title"]=user_data["username"].toString(); notification["body"]=message; notification["link"]="https://url.com/goto?user="+user_data["username"].toString(); QJsonObject msg; msg["notification"]=notification; msg.insert("registration_ids",tokens); QJsonDocument doc(msg); QNetworkReply *reply = mgr->post(request,doc.toJson()); And the deep link works by clicking on the notification in android, but in python, with firebase admin SDK I can’t send a message with the deep link Python _notification= ..

Read more