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

248
Visualizações
Firebase sendPasswordResetEmail doesn't send email

I have a problem concerning my application using firebase: If I want to enable the users to reset their password themselves firebase doesn't send an email to their address. If I do it myself from the firebase console it works fine. I'm trying it like this:

   resetPassword(email: string) {
        sendPasswordResetEmail(this.auth, email)
            .then(() => {
                // Password reset email sent!
                // ..
            })
            .catch((error) => {
                const errorCode = error.code;
                const errorMessage = error.message;
                // ..
            });
    }

Has someone some insights for me, why this isn't working? I get my auth like this:

this.firebaseApp = initializeApp(environment.firebaseConfig);
this.auth = getAuth(firebaseApp);

I am using the Firebase Modular SDK (V9.0.0+).

I would be really grateful if someone can help me! Cheers!

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

sorry for not providing the most useful answer, what I suggest is:

  1. Verify the console is not throwing Firebase errors
  2. Validate that the firebase env variables are correct
about 4 years ago · Juan Pablo Isaza Relatório

0

Where are you getting environment from? If you are getting it correctly and environment.firebaseConfig is not undefined then this should work.

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

const app = initializeApp(environment.firebaseConfig);
const auth = getAuth();
sendPasswordResetEmail(auth, email)
  .then(() => {
    // Password reset email sent!
  })
  .catch((error) => {
    const errorCode = error.code;
    const errorMessage = error.message;
  });
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