Getting Firebase error in the config file

Viewed 27

So i created firebase config file and added all configuration keys and values from .env file:

const firebaseConfig = {
    apiKey: process.env.F_API_KEY,
    authDomain: process.env.F_AUTH_DOMAIN,
    projectId: process.env.F_PROJECT_ID,
    storageBucket: process.env.F_STORAGE_BUCKET,
    messagingSenderId: process.env.F_MESSAGING_SENDER_ID,
    appId: process.env.F_APP_ID
};
const app = initializeApp(firebaseConfig)
const auth = getAuth(app)
const firestore = getFirestore(app)

export {auth, firestore}

After application started i keep getting this error:

Unhandled Runtime Error FirebaseError: Firebase: Error (auth/invalid-api-key).

error image

All values that are used in config file are copied correctly. What should i do?

0 Answers
Related