Rai*_*ado 5 firebase firebase-authentication flutter
我刚开始使用 FIrebase
随着重大更新,FlutterFire 添加了新方法
NEW: Added support for applyActionCode().
NEW: Added support for checkActionCode().
NEW: Added support for verifyPasswordResetCode().
Run Code Online (Sandbox Code Playgroud)
和文档https://firebase.flutter.dev/docs/auth/usage/
User user = FirebaseAuth.instance.currentUser;
if (!user.emailVerified) {
await user.sendEmailVerification();
}
//Firebase will send an automated email to the user with a unique code.
//This code can then be entered via the applyActionCode() method.
//You can first check whether the code is valid by using the checkActionCode() method:
Run Code Online (Sandbox Code Playgroud)
等待 user.sendEmailVerification(); 这只会向用户电子邮件发送验证链接以进行验证。不是验证码。
我应该怎么做才能通过电子邮件接收该代码?所以我可以使用verifyPasswordResetCode()方法。. 谢谢
| 归档时间: |
|
| 查看次数: |
123 次 |
| 最近记录: |