title: Firebase firestore not updating email verification status
body: <p>I have my security rules setup like so (in firestore console). </p>
  
  <pre><code>    service cloud.firestore {
    match /databases/{database}/documents {
      match /{document=**} {
  
        allow read: if request.auth.uid != null &amp;&amp; request.auth.token.email_verified;
        allow write: if false; 
      }
    }
  }
  </code></pre>
  
  <p>Firebase auto logs-in new users. 
  Therefore, a recent user will have a non verified email address. </p>
  
  <p>When the user verifies their email, I'm getting these results in my app. </p>
  
  <pre><code>Auth.auth().currentUser?.isEmailVerified // This is true
  </code></pre>
  
  <p>But when I make a request to the firestore I'm getting an error back that says that the user doesn't have enough permission to access that data. </p>
  
  <p>When I sign the user out and then sign them back in, everything works fine. </p>
  
  <p>My initial thoughts are that maybe there is a token that is not refreshed ? 
  But this seems extremely confusing because I already refreshed the current user before attempting to make the request to firestore. </p>
  
  <pre><code>Auth.auth().currentUser?.reload()
  </code></pre>
  
  <hr>
  
  <p>I feel like I'm missing something. </p>
  
  <p>Why are user's forced logged-in after they signup but then their email verification status isn't updated accordingly ? </p>
  
  <p>Do we have to request-reauthentication ? </p>
  
  <p>If so, what was the point of force log-in ? </p>
  
  <hr>
  
  <p>This is getting extremely frustrating because I don't know how I'm suppose to manage my users. </p>
  
  <p>Is signing in unverified user's something that we should do ? 
  Wouldn't this lead to security concerns like user's making fake accounts and spamming your application.</p>
  
  <hr>
  
  <p><strong>Update</strong> </p>
  
  <p>I read <a href="https://stackoverflow.com/a/47281903/3366784">this non swift response</a> which re-enforces my suspicion. </p>
  
  <p>I'm going to test this solution tomorrow, the swift version of it is: </p>
  
  <pre><code>Auth.auth().currentUser?.getIDTokenForcingRefresh(forceRefresh: , completion: )
  </code></pre>
  
  <blockquote>
    <p>Docs for the method: </p>
    
    <p>Retrieves the Firebase authentication token, possibly refreshing it if
    it has expired. Remark</p>
    
    <p>The authentication token will be refreshed (by making a network
    request) if it has expired, or if <code>forceRefresh</code> is YES.</p>
  </blockquote>
  
  <p>I'm guessing that in my case I have to force refresh because the token will not be expired. </p>