this code allow get the private_key from serviceAccount.json if don't have a apiKey
hello, as it says in issue #98, a user could authenticate with just the serviceAccount.json file, so I made this small change in the code so that if you don't have an api key in config then look in the file serviceAccount.json the api key
changes:
class Firebase:
""" Firebase Interface """
def __init__(self, config):
if config.get("apiKey"):
self.api_key = config["apiKey"]
else:
with open(config["serviceAccount"],'r') as file:
data = file.read()
self.api_key = json.loads(data)["private_key"]
this code allow get the private_key from serviceAccount.json if don't have a apiKey
hello, as it says in issue #98, a user could authenticate with just the serviceAccount.json file, so I made this small change in the code so that if you don't have an api key in config then look in the file serviceAccount.json the api key
changes: