I have following code to login in firebase using flutter. This works fine.
FirebaseAuth.instance.signInWithEmailAndPassword(email: myemail, password: mypassword);
After successful authentication, I am creating nw user using below code.
UserCredential userCredentials = await FirebaseAuth.instance.createUserWithEmailAndPassword(email: myemail, password: mypassword);
but, with approach, the current user changes. I want to create the user without changing the current User. Is this possible?