Ale*_*ini 5 objective-c ios firebase
我正在寻找在今天的重大更新之后取代Firebase类中的'changeEmailForUser'和'changePasswordForUser'的新类和方法.我认为他们现在是FIRAuth的一部分,但我似乎找不到任何东西.有人能指出我正确的方向吗?
文档有点令人困惑,但在"管理用户"部分的底部,在"iOS"下面的"身份验证",这是在这里
根据文档,更新用户的电子邮件地址:
FIRUser *user = [FIRAuth auth].currentUser;
[user updateEmail:@"user@example.com" completion:^(NSError *_Nullable error) {
if (error) {
// An error happened.
} else {
// Email updated.
}
}];
Run Code Online (Sandbox Code Playgroud)
并为密码:
FIRUser *user = [FIRAuth auth].currentUser;
NSString *newPassword = [yourApp getRandomSecurePassword];
[user updatePassword:newPassword completion:^(NSError *_Nullable error) {
if (error) {
// An error happened.
} else {
// Password updated.
}
}];
Run Code Online (Sandbox Code Playgroud)
有关密码重置电子邮件的其他重要信息都在上面给出的链接中.
| 归档时间: |
|
| 查看次数: |
2155 次 |
| 最近记录: |