title: How to distinguish admin and customer role when create user with createUserWithEmailAndPassword firebase auth in ReactJS
body: <p>I have two reactjs websites, one for client user and one for admin. I have graphql api for data access. Currently, admin is using JWT and we will change to firebase authentication.</p>
  <p>I already implement both login and registration using firebase package.</p>
  <p>here is the create user function. So it worked and can login successfully. But my question is that how can I distinguish admin user and customer user. I saw that setCustomUserClaims is only for firebase-admin. May I know how to set the role in firebase and what is the correct way to set?</p>
  <pre><code>function register(name, email, password) {
  return createUserWithEmailAndPassword(auth, email, password).then((res) =&gt; {
    const auth = getAuth();
    
    updateProfile(auth.currentUser, {
      displayName: name
    }).then(() =&gt; {
      // Profile updated!
      // ...
    }).catch((error) =&gt; {
      // An error occurred
      // ...
      console.log(error.message);
    });
  });
  </code></pre>
  <p>}</p>