'FirebaseError: Firebase: Error (auth/operation-not-allowed)

I have a problem like the below:

I want to solve this problem

 ```import app from './firebase.init';
    import { createUserWithEmailAndPassword, getAuth } from "firebase/auth";
    import { useState } from 'react';

    const auth = getAuth(app);

    function App() {
      const [email, setEmail] = useState('');
      const [password, setPassword] = useState('');

      const handleEmail = event => {
        setEmail(event.target.value);
      }

      const handlePassword = event => {
setPassword(event.target.value);

}

const formSubmit = event => { createUserWithEmailAndPassword(auth, email, password) .then( result =>{ const user = result.user; console.log(user); }) .catch(error =>{ console.error(error) } ) event.preventDefault(); }

```


Sources

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

Source: Stack Overflow

Solution Source