# Setting up API credentials

**URL:** <https://community.firebasestudio.dev/t/setting-up-api-credentials/15800>\
**Category:** General\
**Tags:** troubleshooting\
**Created:** [June 29, 2025, 6:13pm UTC](https://community.firebasestudio.dev/t/setting-up-api-credentials/15800 "2025-06-29T18:13:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gerald\_Foster](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/gerald_foster/32/8576_2.png) [@Gerald\_Foster](https://community.firebasestudio.dev/u/Gerald_Foster)\
**Post date:** [June 29, 2025, 6:13pm UTC](https://community.firebasestudio.dev/t/setting-up-api-credentials/15800/1 "2025-06-29T18:13:22Z")

</div>

Good day guys.

I seek your help with fixing an error in my app code. I’m working on a registration page for my app and I was asked by Gemini to add my API credentials to the .env file. I have added the API (apiKey, authDomain, etc.) to the .env file and ensured they are contained in the quotation marks, but I keep getting the following console error every time I submit the registration form:

FirebaseError: Firebase: Error (auth/configuration-not-found).

src/components/register-form.tsx (153:30) @ async onSubmit

151 | setIsLoading(true);  
152 | try {

> 153 | const userCredential = await createUserWithEmailAndPassword(auth, values.email, values.password);  
> | ^  
> 154 | const user = userCredential.user;  
> 155 |  
> 156 | await updateProfile(user, {

Concerned that I might have made an error in copying and pasting the API credentials in the .env file, I pasted the API credentials into the chat and asked Gemini to populate the .env file for me - even this failed. Gemini has attempted to fix this more than a dozen times to no avail. Therefore, any help that you can provide towards resolving this issue would be greatly appreciated.

Thanks,  
Gerald

---

<div class="post-metadata">

**Author:** ![dms](https://sea2.discourse-cdn.com/flex002/user_avatar/community.firebasestudio.dev/dms/32/8270_2.png) [@dms](https://community.firebasestudio.dev/u/dms)\
**Post date:** [July 1, 2025, 5:06pm UTC](https://community.firebasestudio.dev/t/setting-up-api-credentials/15800/2 "2025-07-01T17:06:43Z")

</div>

Gemini will avoid giving advice on your `.env` file because it contains sensitive info. `.env` files essentially store app passwords.

To start, the `.env` file in Firebase Studio simply contains the Firebase connections (which you can find in the project settings within your Firebase Console) and a Gemini API Key (which you can regenerate in Firebase Studio or you can grab a new one from Gemini AI Studio).

P.S. Don’t store `.env` files in your code repository (e.g. GitHub) unless the values are encrypted `(@dotenvx/dotenvx)`.
