firebase - FlutterFire - 在哪里获取验证码 # 通过 FirebaseAuth 上的电子邮件
问题描述
我是使用 FIrebase 的新手
随着重大更新,FlutterFire 添加了新方法
NEW: Added support for applyActionCode().
NEW: Added support for checkActionCode().
NEW: Added support for verifyPasswordResetCode().
并在文档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:
等待用户.sendEmailVerification(); 这只会将验证链接发送到用户电子邮件进行验证。不是验证码。
我应该怎么做才能通过电子邮件接收该代码?所以我可以使用方法verifyPasswordResetCode()。. 谢谢
解决方案
推荐阅读
- javascript - 如何从UTC更改日期格式
- docker - docker-compose 需要通过服务名称获取属性,尤其是端口
- typescript - 基于泛型的类型(函数参数的类型)
- gradle - Gradle api 配置未按预期工作
- java - 如何在不同步充满对象的 ArrayList 的情况下锁定?
- android - CardView 高程和边框在动画 CardView 后被移除
- javascript - 如何在我的 JS 中的 eventListener 之前加载我的生成 dom 函数
- redirect - 用于 301 和 302 响应的 API 网关缓存
- android - 在 RecyclerView 适配器中单击按钮返回值
- laravel - 如何访问 apache 虚拟主机中的 laravel api?