I have a register page which creates users by email and password using this code:
Auth.auth().createUser(withEmail: emailTextfield.text!, password: passwordTextfield.text!) {
(user, error) in
if error != nil {
print(error!)
}
else
{
print("Successful")
}
}
The problem is when someone register by an email that already exist on the firebase, the program accepts it. Then it is logging the new account automatically as the old account.