Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

505
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!