This question already has answers here:
Download Firebase Cloud Functions [duplicate]
(1 answer)
Get code from firebase console which I deployed earlier
(6 answers)
Closed 3 years ago.
A teammate deployed a Firebase cloud function to a shared account to which I have access. The source code isn't available to me yet, so I'm wondering if it's possible to read the source of a deployed cloud function (e.g. when logged into an account that has access to the Firebase console).
Does anyone know if this is possible? If so, any pointers on how one can read the source code of a deployed Firebase function would be hugely helpful!
If you have access to the Google Cloud console, you can access and download the source code there. You won't have the full benefit of having something like git access, but you can at least download a zip of the functions and see what's in production.
You can find the source of your functions that are < 512kb in the cloud console control panel here: https://console.cloud.google.com/functions/list?tab=source
Related
This question already has answers here:
Can Firebase hosting restrict access to resources?
(2 answers)
Firebase Hosting - Members Only / Secured Webpages? [duplicate]
(1 answer)
Closed 2 years ago.
I am using my react, redux, firebase, Firestore, auth project and uploaded my project on free google Firebase Hosting.
I am newbie
when I goto inspect and check the console and other code.
my code and information still visible to general public like user email and first and last name.
I was thinking npm run build hides everything automatically.
please help me how to hide sensitive data on free Firebase Hosting.
much appreciated.
Everything you deploy to Firebase Hosting is public. There is no way to change this behavior.
If you are worried about your Firebase configuration, that must be public, and it is safe as long as you have security rules correctly in place. See also: Is it safe to expose Firebase apiKey to the public?
This question already has answers here:
How to clone an existing Firebase project data to another new project?
(3 answers)
Closed 3 years ago.
I would like to create a duplicate project in firebase so that I dont have to go through the hassle of adding the firebase functions and notifications etc. If I could I would just delete all auth users so that its ready for the actual app but I am unable to do that.
So How can I set up a duplicate project but without all the authenticated test users?
There is currently no simple way to duplicate a project. The best you can do is use the management API and the Firebase Admin SDK and Firebase CLI to script the provisioning and setup of the products you use.
This question already has answers here:
Pull lost code from Firebase Hosting deployment
(3 answers)
Closed 1 year ago.
I uploaded a website to Firebase hosting that I created using Bootstrap Studio.
Since it was in a local folder that I lost ( somehow all of my desktop programs disappeared), I tried recovering the deleted files but they are unrecoverable.
All I want is to edit few words and to host a website back online. How can I edit a website code that is hosted on Firebase without pulling the code?
There is nothing built into Firebase Hosting for either downloading the existing assets, or to make (even minor) edits to them.
You should be able to get pretty far by crawling the web site as shown here: Firebase code pull.
This question already has answers here:
Pull lost code from Firebase Hosting deployment
(3 answers)
Closed 4 years ago.
My laptop just died and i didn't have any backup so all my work is lost. I have been working on a web app and i've been using firebase to host it. Is it possible to get back the source code from firebase?
From #Kato
There is no method available to grab your Firebase code. You should be
utilizing your own version control (e.g. git) to manage your revisions
and backups.
If your code was on your laptop without any backups then your code is most likely gone.
For your next projects - start use GIT(github for example)
This question already has answers here:
how to test Cloud Functions for Firebase locally on pc
(9 answers)
Closed 5 years ago.
Is it possible to run Firebase cloud functions locally during development? It takes a long time to deploy to firebase every time a change have been made.
Thanks
firebaser here
Firebase now provides an emulator suite that allows you to run Cloud Functions and many other Firebase products locally, for local development. I highly recommend using this for all local development, before deploying to production (or even staging).
Previous answer
Update (September 2017): since version 3.11 of the Firebase tools/CLI there is a Cloud Functions shell, which you can use to test your functions locally without deploying them. I recommend reading the blog post Testing Functions Locally with the Cloud Functions Shell and the documentation on how to Run Functions Locally.
Update: since version 3.8 of the Firebase tools/CLI, it has the ability to emulate HTTP functions when you run firebase serve. Other trigger types are still not supported though.
Previous answer
We're working on it. In the meantime, I'll quote fellow Firebaser Doug from the firebase-talk mailing list:
Unfortunately, this does not exist today. A local environment for building and testing Cloud Functions is a high priority for the engineering team.
In the meantime, you could abstract away the core functionality of your function and invoke it directly with the node command line, passing in all necessary data that it needs to operate. For example, with an HTTPS function, figure out what you need from the request object, make that the input to another function, then invoke that with dummy data that you create. The response could be handled similarly.
I think you can use their cloud function emulator
More details here