Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

506
Vistas
How to I fix invalid firebase api key?

In a react firebase project I am getting the error = " firebase: error (auth/api-key-not-valid.-please-pass-a-valid-api-key.)" Why am I getting this error?

Here is my firebase initializing code:

import { initializeApp } from "firebase/app";
import { getAuth } from 'firebase/auth';
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries

// Your web app's Firebase configuration
const firebaseConfig = {
  apiKey:process.env.REACT_APP_authDomain,
  authDomain:process.env.REACT_APP_apiKey,
  projectId:process.env.REACT_APP_projectId,
  storageBucket:process.env.REACT_APP_storageBucket,
  messagingSenderId:process.env.REACT_APP_messagingSenderId,
  appId:process.env.REACT_APP_appId
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);

const auth = getAuth(app);


export default auth;
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

  1. In the .env file where you put all the firebase given api keys put those keys in a formate like below. No extra punctuation.

    REACT_APP_authDomain = YOUR_FIREBASE_KEY

  2. Check all the api keys are OK

  3. If all things are OK. Stop your 'react hotreload' and start your react app again by 'npm start'

At last I am seeing that you are providing wrong value for keys. You have provided 'apikey' the 'REACT_APP_authDomain' value and authDomain the 'REACT_APP_apiKey' value. Check that also. Good luck 🤞.

apiKey:process.env.REACT_APP_authDomain,
authDomain:process.env.REACT_APP_apiKey
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda