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

196
Visualizações
React native firebase AsyncStorage warning?

I am developing a react native expo project with firebase. I installed firebase with: "yarn add firebase" and when I import firebase/auth with OnAuthChanged I get the following error:

AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storage/async-storage

I understand that firebase is storing my credentials locally with async and it is outdated and thats why I get this error. Now when I try to get rid of this error by installing: "yarn add @react-native-async-storage/async-storage" and changing the dependencies in the index.js to the correct async-storage package (https://stackoverflow.com/a/70122024/15845974) then my Warning dissapears.

The problem now is that my credentials are not saved, and onAuthChanges never triggers. I have to login each time I open my app.The correct version of async-storage is not saving my creds.

Any ideas on this one? :S

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

const firebaseConfig = {
...
  };  

const firebaseApp = initializeApp(firebaseConfig);
const auth = getAuth(firebaseApp);

onAuthStateChanged(auth, user => {userHandler(user)});
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