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

320
Views
Firebase shows the error "auth/invalid-api-key" in console

I'm trying to secure my apiKey.So, I used .env.local file in react js but firebase shows this problem.Many other people asked this question and got their answer but I didn't get my proper answer that's why I'm asking this question again. What is the problem in my file?

// in firebase.init.js file:
import { initializeApp } from "firebase/app";
import { getAuth } from "firebase/auth";
const firebaseConfig = {
  apiKey: process.env.REACT_APP_apiKey,
  authDomain: process.env.REACT_APP_authDomain,
  projectId: rocess.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;

in .env.local file:

REACT_APP_apiKey="AIzxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-PXXY0"
REACT_APP_authDomain="waxxxxxxxxxxxxxxxxxxxxxxxxxxxxpp.com"
REACT_APP_projectId="wxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0"
REACT_APP_storageBucket="waxxxxxxxxxxxxxxxxxxxxxxxt.com"
REACT_APP_messagingSenderId="xxxxxxxxxxxxxxxxxxxxxx7"
REACT_APP_appId="xxxxxxxxxxxxxxxxxxxxxxxxxxa4b8827ef0"
about 4 years ago · Juan Pablo Isaza
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!