I have a user registered on firebase with email as admin@abc.com. When I logs in using admin@abc.com, i have given this user the privilege to add new users. And when admin@abc.com adds any new user using:
FirebaseAuth.getInstance()
.createUserWithEmailAndPassword(testUser1@gmail.com, abcPass)
the new user testUser1@gmail.com gets created. Here comes the twist. Now when i try to find the uid of currently logged in user, Instead of showing uid of admin@abc.com. It shows the uid of newly created user that is of testUser1@gmail.com.
Now my question is how to tackel this issue keeping in mind that its necessary to create user like i mentioned above or if you have anyother suggestion your are most welcome to share.