#59 most commonenv/configCursorWindsurfBolt.newReplitv0
Firebase: auth/invalid-api-key or api-key-not-valid
FirebaseError: Firebase: Error (auth/invalid-api-key). / auth/api-key-not-valid.-please-pass-a-valid-api-key.
Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.
Paste your error →What it means
Your app's Firebase settings are missing or wrong, usually because the config values didn't load from environment variables on the live site.
How to fix it: paste this prompt into your AI builder
Fix prompt for Bolt, Cursor, Replit, v0, Windsurf
Firebase says auth/invalid-api-key. Check the Firebase config object: every value (apiKey, authDomain, projectId, appId) must come from correctly prefixed env vars (VITE_ / NEXT_PUBLIC_) that are set on my host, with no quotes or spaces. Enable the needed sign-in provider. Don't change unrelated code.
If the AI can't fix it: manual steps
- Firebase console, Project settings, Your apps: copy the config values again.
Where this happens
Seen in these AI app builders and editors:
CursorWindsurfBolt.newReplitv0
Sources
Related env/config errors
Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.
Fix my error →