Create Firebase User on ios without auto-signin
<p>i'm writing an ios-app with firebase as backend.
In my app, there are some admins, who should be able to create new users. A new user should not be able to create an account on his own.</p>

<p>On web, i'm using the function </p>

<pre><code>ref.createUser({
        email: ctrl.user.email,
        password: ctrl.user.password
    }, function(error, userData) { // }
</code></pre>

<p>with a random password and reset the password afterwards. So the user will receive an email with a password reset link and can set a new password and log in after that. After creating the user, i'm storing all relevant userdata to the database.</p>

<p>On ios i'm trying to create a new user with:</p>

<pre><code>FIRAuth.auth()?.createUser(withEmail: email, password: password) { (user, error) in }
</code></pre>

<p>But if I do it this way, I'm signed out with my admin-account and logged in with my fresh created account. Due to this, I'm not able, to store the userdata to the database, because this is restricted to admins....</p>

<p>Is there a way on ios to only create an user, without to auto-signin with this user?</p>

<p>Best wishes</p>

<p>Tobi</p>

<p><strong>EDIT</strong>
I've written an AWS lambda function with the firebase admin sdk for node.js and create the user inside the function and trigger the function via a webservice-call from my ios-app.
Not perfect, but working....</p>