title: Permission denied on Firebase Database using Pyrebase
body: <p>I have managed to sign up a user and properly sign them in shortly after they've signed up all in the same requests. Also in my request, I am trying to store the user information in the Firebase Database using the python package Pyrebase.</p>
  
  <p>I have properly initialized my firebase app as well as my firebase database within my flask app</p>
  
  <pre><code>config = {
      "apiKey": "apikey",
      "authDomain": "proj.firebaseapp.com",
      "databaseURL": "https://proj.firebaseio.com",
      "storageBucket": "proj.appspot.com",
      "messagingSenderId": "930158028418",
      "serviceAccount.json": "path/to/theServiceAccountStuff.json"
  }
  
  app = Flask(__name__)
  firebase = pyrebase.initialize_app(config)
  auth = firebase.auth()
  firedb = firebase.database()
  </code></pre>
  
  <p>I am creating this dictionary </p>
  
  <p><code>userInfo = {"email": email, "password": password, "stripeID": customer.id, "subscriptionID": subID,"subscription": "active", "startdate": "Today bro"}</code></p>
  
  <p>And passing it into my set function that is supposed to (or at least I thought it did) save my JSON object into the Firebase Database.</p>
  
  <p><code>firedb.child("users").child(user['localId']).set(data=userInfo)</code></p>
  
  <p>I am trying to store users under "users" and then categorize them all with a custom key being their localId.</p>
  
  <p>For some reason every time, I hit the line of code above, I get an error saying this</p>
  
  <pre><code>requests.exceptions.HTTPError: [Errno 401 Client Error: Unauthorized for url: https://myproj.firebaseio.com/users/someid.json] {
    "error" : "Permission denied"
  }
  </code></pre>
  
  <p>These are my database rules in firebase</p>
  
  <p><a href="https://i.stack.imgur.com/TdnnI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TdnnI.png" alt="enter image description here"></a></p>
  
  <p>Is there something I am missing? I have even gone a step further to remove all rules so anyone can access it and I have also put in dummy data just to see if it works. Dummy data is possible because I am manually entering in all the information. </p>