The answer to the question: you cannot.
We have a similar situation when we have users with administrator rights who can create other users. With 2.x it was easy. With 3.x, this is a failure since this feature has been completely removed.
If you create a user in 3.x, you authenticate as that user and do not authenticate the account that is logged in.
This goes deeper as you will need to re-authenticate to create another user; therefore, the administrator either does this manually, or (retrieves) saves the authentication data locally so that it can be an automated process (remove the perversion, please do not do this)
Firebase has publicly emphasized that 2.x will continue to be supported, so you can just drop 3.x.
Update :
one of Firebaser actually came up with a way around this. Conceptually, you are logged in as an administrator. Then you create a second connection to firebase and authenticate with another user, which then creates a new user. Rinse - repeat.
Update again
See this question and answer
Firebase kicks the current user
Jay
source share