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

156
Visualizações
Why is firebase.auth undefined

I am using React and Firebase. I am trying to check, wether the user is authenticated. I have initialized firebase in a firebase config file and therefore import firebase from the file:

import { firebase } from './utils/firebase';

Inside of this File I imported getAuth and everything else I then tried to check the logged in Status with the following code:

    const[isUserSignedIn, setIsUsersignedIn] = useState(true);

  var user = firebase.auth().currentUser;
    if(user) {
      return setIsUsersignedIn(true);
    }
    else{
      setIsUsersignedIn(false);
    }

But i receive the following Error:

> Uncaught TypeError: _utils_firebase__WEBPACK_IMPORTED_MODULE_0__.firebase.auth is not a function

Please help.

about 4 years ago · Juan Pablo Isaza
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