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

207
Visualizações
emailVerified & isEmailVerified functions do not exist

I'm basically having an issue where the user can sign in without verifying their email address (clicking the link sent to their email). My code currently looks like this & every time I enter "isEmailVerified()" it tells me that no such function exists.

    const fbuilds = [];
    const frooms = [];
    clearErrors();
    fire.auth().createUserWithEmailAndPassword(email, password)
    .then((userCredential) => {
      userCredential.user.sendEmailVerification();
      alert('Please follow the link sent to your email address to verify your account.')
      fire.auth().signOut();
    })
    .catch((err) => {
      switch (err.code){
        case "auth/email-already-in-use":
        case "auth/invalid-email":
          setEmailError(err.message);
          break;
        case "auth/weak-password":
          setPasswordError(err.message);
          break;
      }
    });

and my auth listener function looks like this:

    fire.auth().onAuthStateChanged((user) => {
      if(user){
        if (user.isEmailVerified()){ //user.emailVerified
          clearInputs();
          setUser(user);
        }
      } else {
        setUser("");
      }
    });
  };
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The error message is correct. There is no method called "isEmailVerified" on the User object. A look at that API documentation suggests that there is a property called emailVerified that you can check.

if (user.emailVerified) { ... }

Please remember to use code samples and documentation for JavaScript and not other languages like Java that might have different APIs.

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