I'm using the Firebase Authentication for my iOS App. Now I want to check that the entered email address is available or not. I have found that I have to use createUserWithEmailAndPassword
for this. But the issue is I don't want to pass Password. I only want to check using Email. How can I do this?
The following is the structure of the Firebase function you might be looking for (Swift 4):
Auth.auth().fetchProviders(forEmail: emailAddress, completion: {
(providers, error) in
if let error = error {
print(error.localizedDescription)
} else if let providers = providers {
print(providers)
}
})
If the email address is already registered to a user, you will get a list of the providers that the email address is used for. Otherwise, the list of providers will be empty, and thus the email address is not registered.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With