Firebase Auth not working in standalone app

Viewed 68

I'm using Firebase Auth in my Expo/React Native App. Authentication works perfectly in local, but in production (APK downloaded from Play Store), users can't create their accounts.

What is most strange, a couple of users were able to create an account after trying again (one user says she closed the app and then tried signing up again with a different email and then it worked for her).

Here is the code relevant for the sign up:

handleRegister = async ({ name, email, password }) => {
    this.setState({ inProgress: true });
    try {
      const credentials = await this.createUser(email, password);
      await this.saveUser(name, email, password, credentials.user.uid);
      this.updateProfile(credentials, name);
      this.setState({ inProgress: false });
    } catch (error) {
      this.setState({ errorMessage: error.message });
    }
  };

  createUser = async (email, password) => {
    return firebase.auth().createUserWithEmailAndPassword(email, password);
  };
0 Answers
Related