Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

302
Visualizações
In React Login component Firebase Login signup is working but when I am trying to send a reset password Link then is Not sending to email

In React Login component Firebase login signup is working but when I am trying to send a reset password Link then it is not working. there is no getting email value from the field, but sign-in is working. So unable to send the reset password link in my email.

Login Submit Button : it's working:

 const handleToSubmit = (event) => {
    event.preventDefault();
    const email = event.target.email.value;
    const password = event.target.password.value;
    signInWithEmailAndPassword(email, password)
}

Reset password Function code: it's not working:

<!-- language: lang-js -->

        const resetPassword = async (event) => {
            const email = event.target.email.value
            if (email) {
                await sendPasswordResetEmail(email);
                toast.success(`Check your Email ⮞ ${email}`);
            } else {
                toast.warn('Enter Email  ☹ ');
            }
        }

<!-- end snippet -->

My Email input field: it's working for login but not for reset password

<Form.Group controlId="formBasicEmail">
      <Form.Control type="email" name="email" placeholder="Enter email" />
</Form.Group>

Reset Click Button: it's not working:

    <button onClick={resetPassword}> Reset Password </button>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I think you are using firebase v9.

So you should pass auth as parameter to the function:

import { getAuth, sendPasswordResetEmail } from  "firebase/auth"; 

const auth = getAuth();
sendPasswordResetEmail(auth, email)
  .then(() => {
    // Password reset email sent!
    // show the toast
  })
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda