skip to Main Content

I’m trying to make an authentication application. I connected to firebase and turned on e-mail and password authentication, I can add a user in firebase and log in with that user, but I get an error when registering for a user who is not in firebase.

W/System  (27047): Ignoring header X-Firebase-Locale because its value was null.

How can I solve the issue?

2

Answers


  1. Chosen as BEST ANSWER
      Future<void> createUserWithEmailAndPassword() async {
        try {
          await Auth().createUserWithEmailAndPassword(
              email: _controllerEmail.text, password: _controllerPassword.text);
        } on FirebaseAuthException catch (e) {
          setState(() {
            errorMessage = e.message;
          });
        }
      }
    

  2. try like this:

    Future<void> createUserWithEmailAndPassword() async {
      try {
        await FirebaseAuth.instance.createUserWithEmailAndPassword(
            email: _controllerEmail.text, password: _controllerPassword.text);
      } on FirebaseAuthException catch (e) {
        setState(() {
          errorMessage = e.message;
        });
      }
    }
    

    obs: Check if the controllers are not passing empty values

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search