-
Notifications
You must be signed in to change notification settings - Fork 0
API Keys
Prathamesh Bhamare edited this page Mar 9, 2026
·
1 revision
How to manage, rotate, and secure all API keys in MindBridge.
| Key | Service | Where Used | Free? |
|---|---|---|---|
VITE_GEMINI_API_KEY |
Google Gemini | AI chat, assessments, insights | β Yes |
VITE_FIREBASE_API_KEY |
Firebase | Auth + Firestore | β Yes |
- Go to https://aistudio.google.com/app/apikey
- Sign in with Gmail
- Click Create API key
- Select your Firebase project from dropdown
- Click Create API key in existing project
- Copy the key β starts with
AIzaSy...
Free tier limits:
- 15 requests per minute
- 1,000,000 tokens per minute
- Resets daily at midnight Pacific time
- Go to https://console.firebase.google.com
- Select your project
- Click βοΈ gear icon β Project Settings
- Scroll down to Your apps
- Click your web app
- Copy all values from the
firebaseConfigobject
When you need a new key (quota issues, security, etc.):
Step 1 β Delete the old key
- Go to https://aistudio.google.com/app/apikey
- Click the trash icon next to the old key
- Confirm deletion
Step 2 β Create a new key
- Click Create API key
- Select your project
- Copy the new key
Step 3 β Update local .env
VITE_GEMINI_API_KEY=your_new_key_hereRestart dev server: Ctrl+C then npm run dev
Step 4 β Update GitHub Secret
- Go to repo β Settings β Secrets and variables β Actions
- Find
VITE_GEMINI_API_KEY - Click pencil icon
- Paste new key
- Click Update secret
Step 5 β Redeploy
git commit --allow-empty -m "Update Gemini key"
git pushβ Do:
- Store keys only in
.envfile - Add
.envto.gitignore - Use GitHub Secrets for CI/CD
- Rotate keys if accidentally exposed
β Never:
- Paste keys in chat (Discord, WhatsApp, AI chat)
- Commit
.envto GitHub - Share keys with anyone
- Put keys directly in source code files
Act immediately:
- Delete the exposed key at the source (AI Studio or Firebase Console)
- Create a new key
-
Update
.envwith new key - Update GitHub Secret
- Push to redeploy
The whole process takes under 5 minutes.