title: Manage User - Firebase and Angular
body: <p>I am trying to get a user by email, and it seems to be pretty simple. I am following this <a href="https://firebase.google.com/docs/auth/admin/manage-users" rel="nofollow noreferrer">documentation</a></p>
  
  <p>It seems that my code does not recognize <code>admin</code>, what it is normal cause I haven't defined anywhere. What I have done is to change <code>admin</code> for <code>firebase</code>, being firebase:</p>
  
  <pre><code>import * as firebase from "firebase/app";
  </code></pre>
  
  <p>and the code would be:</p>
  
  <pre><code>firebase.auth.getUserByEmail(participantEmail)
  </code></pre>
  
  <p>but I get the following error:</p>
  
  <blockquote>
    <p>Property 'getUserByEmail' does not exist on type 'Auth'.ts(2339)</p>
  </blockquote>
  
  <p>Do I need to pre-install something before? Do I miss something?</p>
  
  <p>My aim is to get the list of all the users' email registered on my system and then filter them, or directly get on a specific user by looking within an email (the second option would be better).</p>
  
  <p><strong>UPDATE</strong>
  Now I am creating a user list each time somebody logs in, but I think that firebase is restricting somehow the information.</p>
  
  <p><em>Register</em></p>
  
  <pre><code>  registerUser(
      email: string,
      pass: string,
      displayName: string,
      photoURL: string
    ) {
      return new Promise((resolve, reject) =&gt; {
        this.afAuth.auth.createUserWithEmailAndPassword(email, pass).then(
          user =&gt; {
            resolve(user);
            user.updateProfile({
              displayName: displayName, // some displayName
              photoURL: photoURL
            });
            //NEEDS TO BE INSIDE UPDATEPROFILE
            this.insertUser(user);
          },
          err =&gt; {
            this.s_registerError = err.message;
            reject(err);
          }
        );
      });
    }
  </code></pre>
  
  <p><em>Insert list</em></p>
  
  <pre><code>  //Insert a new bet
    insertUser(user) {
      console.log(user);
      console.log(user.email);
      console.log(user.displayName);
  
      this.listToStore = this.db.list("users");
      this.listToStore.push({
        photoURL: user.photoURL,
        email: user.email,
        displayName: user.displayName
      });
    }
  </code></pre>
  
  <p>in here, I get the value of <code>user</code> within all its fields, meaning that when I use <code>console.log(user)</code> I am able to see the <code>displayName</code>, <code>email</code>, and <code>photoURL</code>. Nevertheless, If I try to use <code>console.log(user.displayName)</code> prints <code>null</code> and if I use <code>console.log(user.email)</code> prints its value.</p>
  
  <p>I have thought that could be because <code>user.updateProfile()</code> did not finish, but actually, I get the value of <code>user</code> in <code>insertUser()</code> without any problem</p>