Skip to content

Commit

Permalink
api key
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavtomar04 committed Jul 3, 2024
1 parent d00ca4d commit 86bd527
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
10 changes: 9 additions & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
"source": "**",
"destination": "/index.html"
}
]
],
"environment": {
"REACT_APP_FIREBASE_API_KEY": "your_api_key",
"REACT_APP_FIREBASE_AUTH_DOMAIN": "your_auth_domain",
"REACT_APP_FIREBASE_PROJECT_ID": "your_project_id",
"REACT_APP_FIREBASE_STORAGE_BUCKET": "your_storage_bucket",
"REACT_APP_FIREBASE_MESSAGING_SENDER_ID": "your_messaging_sender_id",
"REACT_APP_FIREBASE_APP_ID": "your_app_id"
}
}
}
12 changes: 6 additions & 6 deletions src/lib/firebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { getFirestore } from "firebase/firestore";
import { getStorage } from "firebase/storage";

const firebaseConfig = {
apiKey: import.meta.env.VITE_API_KEY,
authDomain: import.meta.env.VITE_AUTH_DOMAIN,
projectId: import.meta.env.VITE_PROJECT_ID,
storageBucket: import.meta.env.VITE_STORAGE_BUCKET,
messagingSenderId: import.meta.env.VITE_MESSAGING_SENDER_ID,
appId: import.meta.env.VITE_APP_ID
apiKey: process.env.REACT_APP_FIREBASE_API_KEY,
authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN,
projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID,
storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET,
messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID,
appId: process.env.REACT_APP_FIREBASE_APP_ID
};

export const app = initializeApp(firebaseConfig);
Expand Down

0 comments on commit 86bd527

Please sign in to comment.