我无法将数据存储在云防火墙中。身份验证都是正确的,但数据不会在云火药库中进行,而且由于该登录也不起作用,因为云防火墙是预req的登录功能。
这是我的AuthContoller函数
storeUserData({name, password, email}) async {
DocumentReference store = firestore
.collection("users")
.doc(FirebaseAuth.instance.currentUser!.uid);
store.set(
{'name': name, 'password': password, 'email': email, 'imageUrl': ''});
}这是我的注册按钮代码
try {
await controller
.signupMethod(
context: context,
email: emailController.text,
password: passwordController.text,
)
.then((value) {
** return controller
.storeUserData(
email: emailController.text,
name: nameController.text,
password: passwordController.text)
.then((value) {
VxToast.show(context,
msg: 'Account Created Sucessfully');
Get.offAll(LoginScreen());
}); **
});
} catch (e) {
FirebaseAuth.instance.signOut();
VxToast.show(context, msg: e.toString());
}发布于 2022-10-25 16:31:09
尝尝这个
storeUserData({name, password, email}) async {
final _firestore = FirebaseFirestore.instance;
await _firestore.collection("users")
.doc(FirebaseAuth.instance.currentUser!.uid).set(
{'name': name, 'password': password, 'email': email, 'imageUrl': ''});
}
https://stackoverflow.com/questions/74197287
复制相似问题