title: Firebase Auth: can't delete Firestore documents in promise returned from currentUser.delete()
body: <p>I am using firebase authentication and angularfirestore in my app, and I came across a strange problem. I want to delete a user document in firestore after I delete the user in firebase auth as shown below, but the firestore portion doesnt work.</p>
  <p><strong>Edit 2</strong>: In the code, <code>this.currentUser</code> is not the same as <code>angularFireAuth.auth.currentUser</code>. It is a local variable I created separately.</p>
  <pre><code>return this.angularFireAuth.auth.currentUser.delete().then(() =&gt; {
              this.angularFirestore.collection(&quot;userData&quot;).doc(this.currentUser.email).delete().then(() =&gt; {
                  this.currentUser = null;
                  this.currentUserSubject$.next(this.currentUser);
                  this.setAuthenticationDetails({authType: null, rememberMe: false});
                  this.storageService.setRememberedUser(null);
              });
          })
  </code></pre>
  <p>However, if I were delete the document from firestore first, and delete the user from firebase auth afterwards, it works.</p>
  <pre><code>return this.angularFirestore.collection(&quot;userData&quot;).doc(this.currentUser.email).delete().then(() =&gt; {
              return this.angularFireAuth.auth.currentUser.delete().then(() =&gt; {
                  this.currentUser = null;
                  this.currentUserSubject$.next(this.currentUser);
                  this.setAuthenticationDetails({authType: null, rememberMe: false});
                  this.storageService.setRememberedUser(null);
              });
          })
  </code></pre>
  <p>Anyone knows why this is happening? They both return promises so i expected the behaviour to be the same.</p>
  <p><strong>Edit 1</strong>: added catch, but nothing's being printed</p>
  <pre><code>return this.angularFireAuth.auth.currentUser.delete().then(() =&gt; {
              return this.angularFirestore.collection(&quot;userData&quot;).doc(this.currentUser.email).delete().then(() =&gt; {
                  this.currentUser = null;
                  this.currentUserSubject$.next(this.currentUser);
                  this.setAuthenticationDetails({authType: null, rememberMe: false});
                  this.storageService.setRememberedUser(null);
              }, (error) =&gt; {
                  console.log(error);
              });
          }, (error) =&gt; {
              console.log(error);
          })
  </code></pre>
  <p><strong>Edit 3:</strong> Security Rules</p>
  <pre><code>rules_version = '2';
  service cloud.firestore {
    match /databases/{database}/documents {
      match /{document=**} {
        allow read, write: if true;
      }
    }
  }
  </code></pre>