简体   繁体   中英

Firebase Auth transactions with flutter

how can make transaction in this code with flutter.

  FirebaseUser user = await FirebaseAuth.instance.currentUser();
  UserUpdateInfo userUpdateInfo = new UserUpdateInfo();
  userUpdateInfo.displayName=firstName+" "+lastName;
  await user.updateProfile(userUpdateInfo);
  await user.updateEmail(email);

您不能在 Authentification,Transaction 和 batch work with firestore no with Authentification 中执行此操作,如果连续更新会导致错误“这是一个安全敏感操作,需要用户最近登录。如果此要求不是遇到了,请用户再次验证,然后调用”。您应该一一进行更新。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM