How to Implement Firebase Project to another Account? - firebase

I have Download a project from github in which firebase is used for authentication and Database. I have no access to that database but i want to make some changes to that firebase account. Can i transfer one project (Having no access to that account) to a new Firebase

Related

How to connect Firebase service account to different GCP project

I want to use the Firebase Admin SDK. And I will deploy my server into the GKE. but apparently, when clicking 'service account' from my firebase, it is linked to another 'project' in my GCP
To give an example of it, my whole project in GCP is under a project 'project-a' with an ID of 'project-a-12345678'.
my firebase project name is 'project-b' with and id of 'project-b'.
So how can I connect my firebase to my current GKE's project service account?
Firebase projects are Google Cloud projects, that just have some extra metadata attached to them. If you have an existing Firebase project, you can use GKE in that same project by opening it in the Google Cloud console.
You can also go the other direction and add Firebase features to an existing Google Cloud project. For this, go to the Firebase console, click Add project and then click in the Enter your project name box, it'll show you a list of GCP project that you have that are not associated with Firebase. If you select one of those project, it add the Firebase metadata and you can then use Firebase services on it too.

Which Roles are needed in IAM in order to do a firebase deploy

I'm trying to add the needed roles for a CI pipeline to automatically deploy to firebase (by running firebase deploy.
The roles I've added so far are:
API Keys viewer
Artifact registry writer
Cloud build Service Account
Cloud Functions Admin
Cloud Run Viewer
Firebase App distribution admin
Firebase Authentication admin
firebase hosting admin
firebase rules admin
service account user
service usage admin
Honnestly at this point I'm just adding what sounds good, as the error message is not helpful:
There was an issue deploying your functions. Verify that your project
has a Google App Engine instance setup at
https://console.cloud.google.com/appengine and try again. If this
issue persists, please contact support.
It works when adding the Owner permission, so this is a permission issue.
As you want to deploy the entire project, the most applicable role would be Firebase Admin.
I use it in portuguese, so the translation in english may be different.
For deploying the hosting app IAM role must be either an Owner or Editor. Sometimes updating the latest version of a Node Package/Firebase tool will resolve the issue as per my experience.
npm install -g firebase-tools
It will provide the globally accessible firebase command.
For reference: https://firebase.google.com/docs/projects/iam/roles
For any deployments, you need the first Firebase token which is GCP_SA_key for whatever you want to deploy or update.
There are different scenarios let me elaborate with reference
Cloud Functions Developer IAM role for deploying functions
Cloud Scheduler Admin IAM role for scheduling your functions
Service Account User IAM role By default service account using the APP engine for the deployments process required a service account user role.
You need more roles for Updating Firestore to update rules, indexes, and files.
Firebase Rules Admin role for updating Firestore rules.
Cloud Datastore Index Admin role for updating firestore Indexes.
Firebase Hosting Admin role for updating files.
Further details reference added :GitHub Integration/deployments roles

How to prevent registration to Firebase project?

As per the Firebase documentation, the contents of google-services.json are considered public. These can be easily retrieved by decompiling the apk.
If so, is there a way to prevent apps from registering with my Firebase project?
I understand that the registration works on the basis of package name. While it's not possible to publish an app with a duplicate package name, for development it is very much possible.
I created a dummy app, and my dummy app successfully registered with my production project. So, looking for a way to prevent that from happening.
You should be connecting your app to Firebase Emulator for local development.
You can go to Firebase console -> Authentication tab -> Sign-in Method tab, and remove localhost from Authorized domain, that way your app will never connect to production DB.

Can a SHA1 key be shared between two different Firebase projects after deleting the connected Firebase app

I created a firebase project for my newly released unity game. The analytics dashboard did not show anything so I thought there is some error.
So I deleted my app(firebase app) from the firebase project. But before deleting the app, I had removed the SHA1 fingerprint from the app. But with some research, I found that it may take 24-48 hours for firebase to start analytics, so may be there was no error, but i deleted it.
Also, there is a way to restore the firebase project, but not an app inside the project. Now can I create another firebase project or another app to receive the analytics data for the same game that I have published ?

How to access legacy Firebase console for new collaborator?

I found this post Is there a way to use Firebase Legacy console from new account where it states that
It is no longer possible to sign up in the legacy console.
But if I have been added as a collaborator on a project in the legacy console, is there any way I can access that project?
I don't think there is. The owner of the legacy project can add you via email, but if you don't have a preexisting legacy console account the auth workflow won't work. You'll just end up cycling through google logins and back to the new console.
https://groups.google.com/forum/#!topic/firebase-talk/6stRgevwkBk

Resources