Deepak
Deepak

Reputation: 11

Creating user with [email protected] with empty reCAPTCHA token

I am working on a flutter app with authentication feature with firebase as datasource. In my Creating user method, When the createUserWithEmailAndPassword method is invoked, the app freeze there.

here is what I get in console:

I/FirebaseAuth(10573): Creating user with [email protected] with empty reCAPTCHA token
W/System  (10573): Ignoring header X-Firebase-Locale because its value was null.
E/FrameTracker(10573): force finish cuj, time out: J<IME_INSETS_ANIMATION::1@[email protected]>

and here is my code for creating user:

@override
  Future<Either<Failure, UserEntity>> signUpWithEmailPassword({
    required String name,
    required String email,
    required String password,
  }) async {
    try {
      try {
        final response = await authentication.createUserWithEmailAndPassword(
            email: email, password: password);
        if (response.user == null) {
          throw const ServerException("User is null!");
        }
        return Right(UserModel(
            id: response.user!.uid,
            email: email,
            name: name)); // Convert to UserEntity
      } catch (e) {
        throw ServerException(e.toString());
      }
    } catch (e) {
      return Left(Failure(e.toString()));
    }
  }

Upvotes: 1

Views: 6882

Answers (1)

Abdullah Ibrahim
Abdullah Ibrahim

Reputation: 63

You just have to enable createUserWithEmailAndPassword in your Firebase authentication. here are screenshots: enter image description here

enter image description here

enter image description here

Upvotes: 0

Related Questions