title: Firebase 9 : Realtime database permission denied
body: <p>Im making a chat app with vue3 and firebase 9, everything works except the delete function.
  it shows on the console:</p>
  <pre><code>@firebase/database: FIREBASE WARNING: set at /message/-MzxBJXezscUw4PbEAys failed: permission_denied
  </code></pre>
  <p>This is my security rules in firebase realtime database</p>
  <pre><code>{
     &quot;rules&quot;: {
         &quot;messages&quot;: {
             &quot;.read&quot;: &quot;auth != null&quot;,
             &quot;.write&quot;: &quot;auth != null&quot;
         }
     }
  }
  </code></pre>
  <p>Delete Message Method:</p>
  <pre><code>deleteMessage(key) {
    remove(db, `messages/${key}`)
  }
  </code></pre>
  <p>HTML:</p>
  <pre><code>&lt;div class=&quot;chat-delete-wrapper&quot; v-if=&quot;msg.userUID == user.uid&quot;&gt; 
     &lt;button class=&quot;delete-btn&quot; @click=&quot;deleteMessage(msg.id)&quot;&gt;
        &lt;i class='bx-fw bx bxs-trash'&gt;&lt;/i&gt;
     &lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  <p>How can i fix this and delete the message?</p>