title: How to get the authentication id of a user with a LOCAL session in Firebase after reloading the site?
body: <p>Users can sign in with Firestore and the authentication data should be stored in the Browser with a LOCAL session.</p>
  <pre><code>firebase.auth().setPersistence(firebase.auth.Auth.Persistence.LOCAL)
  .then(() =&gt; {
             // Existing and future Auth states are now persisted in the current
             // session only. Closing the window would clear any existing state even
             // if a user forgets to sign out.
             // ...
             // New sign-in will be persisted with session persistence.
             return firebase.auth().signInWithEmailAndPassword(email, password)
                 .then((userCredential) =&gt; {
                     // Signed in
                     const user = userCredential.user;
                     return user;
                     // ...
                 })
                 .catch((error) =&gt; {
                     const errorCode = error.code;
                     const errorMessage = error.message;
                     return errorCode;
                 });
         })
  .catch((error) =&gt; {
             // Handle Errors here.
             const errorCode = error.code;
         });
  
  </code></pre>
  <p>After reloading the site I want to access the LOCAL stored data, but when I use</p>
  <pre><code>const user = firebase.auth().currentUser;
  console.log(user)
  </code></pre>
  <p>The result is undefined. How can I access the data?</p>