Skip to content

Commit 1a2cefa

Browse files
Fix API key security vulnerability
- Remove hardcoded Firebase API keys from src/config/firebase.ts - Replace with environment variables (REACT_APP_FIREBASE_*) - Create .env.example template for user configuration - Update README with proper environment variable setup instructions - Add security warning about not committing .env.local files This fixes the GitHub security warning about exposed API keys.
1 parent 9fd101b commit 1a2cefa

File tree

4 files changed

+212
-19
lines changed

4 files changed

+212
-19
lines changed

.env.example

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Firebase Configuration
2+
# Copy this file to .env.local and fill in your Firebase project details
3+
4+
REACT_APP_FIREBASE_API_KEY=your_api_key_here
5+
REACT_APP_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
6+
REACT_APP_FIREBASE_PROJECT_ID=your_project_id
7+
REACT_APP_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com
8+
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
9+
REACT_APP_FIREBASE_APP_ID=your_app_id
10+
11+
# Instructions:
12+
# 1. Go to Firebase Console: https://console.firebase.google.com
13+
# 2. Select your project
14+
# 3. Go to Project Settings > General
15+
# 4. Scroll down to "Your apps" section
16+
# 5. Copy the config values from your web app
17+
# 6. Replace the placeholder values above with your actual Firebase config

0 commit comments

Comments
 (0)