尝试创建帐户时出现Firebase错误

时间:2020-04-10 14:49:47

标签: firebase flutter firebase-authentication

两个月前,我在Firebase中编写了一个用于创建帐户的功能,该功能可以正常工作,现在当我尝试创建帐户时,它会给我下一条错误消息:

I / BiChannelGoogleApi(19700):[FirebaseAuth:] getGoogleApiForMethod()返回了Gms:com.google.firebase.auth.api.internal.zzaq@94e857b

下一个是我为执行此操作而创建的函数:

 Future<void> register() async {
final formState = _formKey.currentState;
if (formState.validate()) {
  formState.save();
  print('$_email si $_password');
  try {
    FirebaseUser user = (await FirebaseAuth.instance
            .createUserWithEmailAndPassword(
                email: _email.trim(), password: _password,  ))
        .user;


     user.sendEmailVerification();
     presentError("Now you own an account", context);
      await Future.delayed(Duration(seconds: 1));
          Navigator.pushReplacement(
              context,
              MaterialPageRoute(
                  builder: (context) => LoginPageState(title: 'LoginPage')));
  } catch (e) {
    print(e);}

1 个答案:

答案 0 :(得分:1)

也许您尚未更新FirebaseAuth规则,并且不安全期限已经结束。 参见https://firebase.google.com/docs/rules/rules-and-auth