'React Native, Firebase: Error (auth/admin-restricted-operation) fix?

const handleSignUp = () => {
    createUserWithEmailAndPassword(auth, email, password)
        .then((re) => {
            console.log(re);
        })
        .catch((error) => {
            console.log(error);
        }
    );
};

This is the signup function that I've implemented for email and password authentication using Firebase authentication. The error that I'm getting is,

Firebase: Error (auth/admin-restricted-operation).

This happens every time I run this function and the firebase authentication tab does not show the new user. Been stuck on this error for quite a while now and am unable to fix it. Any help would be highly appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source