title: FirebaseAuth is changing my current Auth UID
body: <p>I'm making an app that registers a user which I'm creating manually from Firebase Authentication panel. After I login with that user my Auth is equal to the auth I have on Firebase </p>
  
  <p><a href="https://i.stack.imgur.com/4YqQs.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4YqQs.jpg" alt="enter image description here"></a></p>
  
  <p>So far that login is working nice since after I login with it gaves to my <code>mAuth.getCurrentUser().getUid();</code> that id.</p>
  
  <p>Now, the problem is the following, in the next Activity I need to create users with a dialog that needs to be stored inside that UID, now I managed to do that in this way.</p>
  
  <pre><code> final UserModel userModel = new UserModel();
          userModel.setNombre(nombre);
          userModel.setApellido(apellido);
          final ProgressDialog pd = new ProgressDialog(mContext);
          pd.setMessage("Estamos cargando su paciente...");
          pd.setCancelable(false);
          pd.show();
          final String adminUID = mAuth.getCurrentUser().getUid();
          mAuth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener&lt;AuthResult&gt;() {
              @Override
              public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {
                  if (task.isSuccessful()) {
                      pd.dismiss();
                      final String pacienteID = task.getResult().getUser().getUid();
                      mDatabase.child("Bord").child(adminUID).child("pacientes").setValue(pacienteID).addOnCompleteListener(new OnCompleteListener&lt;Void&gt;() {
                          @Override
                          public void onComplete(@NonNull Task&lt;Void&gt; task) {
  
                              Map&lt;String,Object&gt; mapUsuario = new HashMap&lt;&gt;();
                              mapUsuario.put("nombre",userModel.getNombre());
                              mapUsuario.put("apellido",userModel.getApellido());
                              mapUsuario.put("pregunta",1);
                              mDatabase.child("Bord").child(adminUID).child("pacientes").child(pacienteID).updateChildren(mapUsuario);
                          }
                      });
  
                      Toast.makeText(mContext, "Su paciente se cargo con exito", Toast.LENGTH_SHORT).show();
                      mDialog.dismiss();
  
                  } else {
  
                      pd.dismiss();
                      Log.i("Tags", "Tags signInWithEmail:failure" + task.getException());
                      Toast.makeText(mContext, "Su contraseña o email es incorrecta.",
                              Toast.LENGTH_SHORT).show();
                  }
  </code></pre>
  
  <p>This line <code>final String adminUID = mAuth.getCurrentUser().getUid();</code> before the <code>createUserWithEmailAndPassword</code> method (from FirebaseAuth to create a new user) is giving to me the mAuth of the first login I made with the user id from the user I created in Firebase console, but after <code>createUserWithEmailAndPassword</code> I can store that user one time inside my node.</p>
  
  <p><a href="https://i.stack.imgur.com/0T8Gx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0T8Gx.jpg" alt="enter image description here"></a> </p>
  
  <p>This is how it should work. But the problem relies the second time I press that dialog to add another paciente inside my node. </p>
  
  <p><a href="https://i.stack.imgur.com/WNpEI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WNpEI.jpg" alt="enter image description here"></a></p>
  
  <p>It seems like <code>createUserWithEmailAndPassword</code> logged me into firebase after I created my first user, and then, when I tried to add a new one it used the UID from that last user.</p>
  
  <p><strong>So my question is</strong></p>
  
  <p>Is there any way to prevent <code>createUserWithEmailAndPassword</code> to auto login or change my current userID which I logged in first time ?</p>