title: Could not parse auth token (Firebase)
body: <p>I am trying to save data in my firebase realtime database using this rule:</p>
  <pre><code>{
    &quot;rules&quot;: {
      &quot;users&quot;: {
        &quot;$uid&quot;: {
          // Allow only authenticated content owners access to their data
          &quot;.read&quot;: &quot;auth != null &amp;&amp; auth.uid == $uid&quot;,
          &quot;.write&quot;: &quot;auth != null &amp;&amp; auth.uid == $uid&quot;,
        },
      },
    },
  }
  </code></pre>
  <p>I need to create a child of users and name it the uid of that user. So, I did this:</p>
  <pre><code>user=auth.sign_in_with_email_and_password('email', 'password')
  database.child('users').child(user['localId']).set(&quot;nahid&quot;,user['localId'])
  </code></pre>
  <p>but when I run this, I get this error:</p>
  <pre><code>requests.exceptions.HTTPError: [Errno 401 Client Error: Unauthorized for url: https://khelobd-6f730-default-rtdb.firebaseio.com/users/7Km7srPfqqccZwa0On5i2QaJDUi2.json?auth=7Km7srPfqqccZwa0On5i2QaJDUi2] {
    &quot;error&quot; : &quot;Could not parse auth token.&quot;
  }
  </code></pre>
  <p>How can I solve this?</p>