title: Firebase Auth signIn distinction
body: <p>On my website, I have two portals for login. Portal A is login for learners. Portal B is login for teachers. </p>
  
  <p>Both learners' and teachers' accounts are located in the same Firebase project, in another words, both types of accounts are located in the same authentication space. Both portals use the same simple login code:<br>
  <code>firebase.auth().signInWithEmailAndPassword(user_email, user_password).catch(function(error) {})</code></p>
  
  <p>Currently, the learners can login at both portals, and same for the teachers. What I am trying to do is to prevent the teachers to login at the learners' portal and vice versa. I am not sure how to implement this. I have made a <code>setCustomUserClaim</code> to give an identity to the two types of accounts on the authentication token. But I can only grab the auth token once the user is logged in, not before I think. Also, I have a Firestore collection that stores all the info of the users including their identity. But each user's document is named with their corresponding UID. The latter can be grabbed once they login in as well. Any idea on how to implement this?</p>