Change user email / password in Firebase 3 for iOS

I am looking for a new class and methods that replace "changeEmailForUser" and "changePasswordForUser" in the Firebase class after today's major update. I assume that they are now part of FIRAuth, but I can not find anything. Can someone point me in the right direction?

+5
source share
1 answer

The docs are a bit confusing, but at the bottom of the "User Management" section is under "iOS", which is under "Authentication", which is here

In accordance with the documents, update the user's email address:

FIRUser *user = [FIRAuth auth].currentUser; [user updateEmail:@" user@example.com " completion:^(NSError *_Nullable error) { if (error) { // An error happened. } else { // Email updated. } }]; 

and for password:

 FIRUser *user = [FIRAuth auth].currentUser; NSString *newPassword = [yourApp getRandomSecurePassword]; [user updatePassword:newPassword completion:^(NSError *_Nullable error) { if (error) { // An error happened. } else { // Password updated. } }]; 

Other important information regarding password reset emails can be found at the link above.

+8
source

All Articles