I am try to my best register on firebase authentication but I am facing some problems.
I am try to like this code but it's not working.
const hadleToLogin = async event => {
event.preventDefault();
let email = event.target.email.value
const password = event.target.password.value
console.log(email, password)
await signInWithEmailAndPassword(email, password);
if (user) {
navigate('/home');
}
}
const navigateRegister = () => {
navigate('/register')
}
const resetPassword = async () => {
const email = emailRef.current.value;
if (email) {
await sendPasswordResetEmail(email);
toast('sent email');
}
else{
toast('enter a valid email')
}
}