I am designing my web application using firebase in which the admin had to create the user accounts. I am using createUserWithEmailandPassword method to create the user acccounts.
firebase.auth().createUserWithEmailAndPassword(email, password)
.catch(function(error) {
});
But whenever i use this method to create an account the admin accounts gets signed out and is signed in with the newly created user account.
I don't want to be signed in with newly created account and should be continued with the old admin account. Please tell me an alternative for this.