All Questions
11 questions
0
votes
0
answers
74
views
Firebase API key is not defined error in Next.js project using Firebase SDK
I'm setting up Firebase (version 10.x) in my Next.js (version) 14 app, but I'm encountering the following error when trying to initialize Firebase:
Firebase API key is not defined. Ensure ...
1
vote
0
answers
76
views
How to make environment variables private with Next.js apps hosted on Firebase App Hosting
I'm talking about Firebase App Hosting. Not Firebase Hosting.
Inside apphosting.yaml, I reference secrets managed by Google Secret Manager.
If I simply do this:
env:
- variable: MY_SECRET
...
1
vote
1
answer
1k
views
Environment Variables with Firebase Config and Next.js
I'm trying to use a .env with Next.js and Firebase config.
When I use the variable itself it works normally but when I add it on the .env and use it on the config it doesn't work anymore.
import { ...
2
votes
1
answer
3k
views
How can I access environment variables from a file sitting inside the public folder in Next.js?
I'm integrating Firebase Cloud Messaging, and it is required to have firebase-messaging-sw.js file inside the public folder as a service worker.
The file needs to have my firebase config, which I of ...
0
votes
1
answer
1k
views
Hiding API keys with Firebase without rendering in the client side? [duplicate]
I'm looking for a secure way to handle API keys in my NextJS web app using Firebase.
I see the suggestion to "hide" the keys in an ENV file then make sure of the variables by calling ...
0
votes
1
answer
384
views
Firebase config breaks when `projectId` is from environment variable
I'm experiencing a really odd issue with my Firebase config object and Vercel environment variables.
I can build up my entire Firebase config object with Vercel environment variables but if I use an ...
1
vote
2
answers
404
views
Why NEXTAUTH_URL in .env file ignored after firebase deploy?
I use next-auth to made a session, and deploy with firebase.
In local, I confirmed next-auth basepath changed,.
But after deploy, next-auth basepath don't changed.
The basepath is always "https://...
0
votes
1
answer
1k
views
How to hide firebase-admin credentials in Next Js
So I am using firebase-admin in Next Js. I used environment variables but can't hide the firebase service account keys because they are not defined in server-side on Next JS. So i had to use ...
0
votes
1
answer
2k
views
How can I securely hide api keys that need to be accessed by the client in Nextjs?
I am developing a web application using NextJS. I am using firebase, sentry.io and infinite scroll in my project. When the application first runs, my data from the backend comes as server side. If the ...
-1
votes
1
answer
408
views
env.local vs String var
I'm getting access denied error by firebase. I noticed that this error occurs when in the "configs.ts" file of the backend, when I pass the value of the "project_ID" by the ...
3
votes
1
answer
4k
views
How can I tell firebase if I'm in development or production? (For firebase functions sandbox/live switch)
I have some firebase functions that I test locally, but I really don't want to have to rely on remembering to switch a flag, or explicitly set the values. Is there a value I can check in firebase to ...