title: Firebase Storage/Firestore unauthorized due to no Auth object on Rules
body: <p><strong>Update</strong></p>
  <p>I use this plugin to Phone auth <a href="https://ionicframework.com/docs/native/firebase-authentication" rel="nofollow noreferrer">https://ionicframework.com/docs/native/firebase-authentication</a>. So how can I transfer that Auth details to the AngulraFireAuth?</p>
  <pre><code>  async signIn(): Promise&lt;void&gt; {
        await this.firebaseAuthentication.signInWithVerificationId(verificationId, securityCode);   
    }
  </code></pre>
  <p>auth.service.ts</p>
  <pre><code> onAuthStateChanged(): void {
      this.firebaseAuthentication.onAuthStateChanged().subscribe((res) =&gt; {
  
        this.zone.run(async () =&gt; {
          if (res) {
             // code
          });
      });
    }
  </code></pre>
  <p><strong>Original</strong></p>
  <p>I have a Firebase Storage bucket permission like so: Same for the <code>Firestore</code> too.</p>
  <pre><code>service firebase.storage {
    match /b/{bucket}/o {
      match /{allPaths=**} {
        allow read, write:if request.auth != null;
      }
    }
  }
  </code></pre>
  <p>Client-side code: i.e. upload an image</p>
  <pre><code> console.log('user', await this.afAuth.currentUser); //null
  
   const filePath: string = `signatures/${user.uid}`;
  
   const afUploadTask: AngularFireUploadTask = afStorageReference.putString(imageDataUrl, 'data_url');
  </code></pre>
  <p>But it fails:</p>
  <blockquote>
  <p>vendor.js:44100 ERROR Error: Uncaught (in promise):
  FirebaseStorageError:
  {&quot;code_&quot;:&quot;storage/unauthorized&quot;,&quot;message_&quot;:&quot;Firebase Storage: User
  does not have permission to access
  'signatures/gx3TlaSFQoPhQXCnjk3QCrq2j9x1'.&quot;,&quot;serverResponse_&quot;:&quot;{\n
  &quot;error&quot;: {\n    &quot;code&quot;: 403,\n    &quot;message&quot;: &quot;Permission
  denied. Could not perform this operation&quot;\n
  }\n}&quot;,&quot;name_&quot;:&quot;FirebaseError&quot;}</p>
  </blockquote>
  <p>So how can I configure this kind of rule with Storage? Without any rule above code is working fine.</p>