2016-05-19 15 views

回答

8

該文檔是有點混亂,但在這是在「iOS版」,這是根據「認證」,這是here

根據該文件,以更新用戶的電子郵件「管理用戶」部分的底部地址:

FIRUser *user = [FIRAuth auth].currentUser; 

[user updateEmail:@"[email protected]" completion:^(NSError *_Nullable error) { 
    if (error) { 
    // An error happened. 
    } else { 
    // Email updated. 
    } 
}]; 

和密碼:關於電子郵件密碼重置

FIRUser *user = [FIRAuth auth].currentUser; 
NSString *newPassword = [yourApp getRandomSecurePassword]; 

[user updatePassword:newPassword completion:^(NSError *_Nullable error) { 
    if (error) { 
    // An error happened. 
    } else { 
    // Password updated. 
    } 
}]; 

等重要信息都在t他上面給出的鏈接。

+0

需要注意的是,在調用此方法之前,Firebase經常會要求您再次對用戶進行身份驗證。他們有一個專門的方法來達到這個目的,但你也可以簡單地註銷登錄用戶,然後讓他更改密碼。 – Pomme2Poule

+0

感謝您的幫助。更新密碼後,我是否需要再次登錄? –

相關問題