Firebase Reset Password Swift

I was wondering if you could show me how to set up Reset Password in Swift, I am currently using Firebase as my backend service. I just need some code.

+5
source share
1 answer

The answer is in the API documentation :

-sendPasswordResetWithEmail:completion:

Initiates a reset password for this email address.

See FIRAuthErrors for a list of error codes that are common to all API methods.

In Swift 3.x and Firebase 3.x, it will look like this:

 FIRAuth.auth()?.sendPasswordReset(withEmail: " email@email ") { error in // Your code here } 

Edit:

Firebase 4 has modified the Firebase features to be more consistent with Swift's naming conventions.

 Auth.auth().sendPasswordReset(withEmail: " email@email ") { error in // Your code here } 
+28
source

Source: https://habr.com/ru/post/1244471/


All Articles