How to disable the multi tenant feature for a GCP project? - firebase

I have enabled the multi-tenancy feature for my firebase project in the GCP console following this guide but now there's no way to disable it back.
Will this affect any of project's behaviour?

As per the Public Documentation, currently there is nothing mentioned about how to disable multi-tenancy , however Google Support is aware of the issue and working on it. There will be some update in near future but currently it's not possible in UI or SDKs.
Will this affect any of the project's behaviour?
As per Firebase Documentation , multi-tenancy is not recommended for the Firebase Projects as mentioned with a reason :
Multi-tenancy can lead to serious configuration and data privacy
concerns, including unintended issues with analytics aggregation,
shared authentication, overly-complex database structures, and
difficulties with security rules.
Generally, if a set of apps don't
share the same data and configurations, strongly consider registering
each app with a different Firebase project.
For example, if you
develop a white-label application, each independently labeled app
should have its own Firebase project, and the iOS and Android versions
of that label should be in the same Firebase project. Each
independently labeled app shouldn't (for privacy reasons) share data
with the others.
To get more information related to the Firebase Authentication, you can refer to the doc.
If you want to continue in a multi tenant project below are some points which may help you perform certain activities on a multi tenant.
There are situations, however, where you want users to be manually or
programmatically created by an administrator, either using the Admin
SDK or Firebase console. In these cases, you can disable user actions
from the Firebase Authentication Settings page, which prevents account
creation and deletion by end-users. If you are using multi-tenancy,
you will need to make an HTTP request to disable these features on a
per-tenant basis.
You can also Manage Identity Platform tenants programmatically by User management,Identity verification,Import users,Access control with custom claims,User session management,Email action links,Tenant management by Create, list, get, update, delete tenants for a specific Identity Platform project , Manage OIDC and SAML providers on tenants.

Related

Using Firebase as frontend with Google Workspace as backend?

The educational organization that I'm working for have for some years been using a custom built Firebase site as a Learning Management System: custom email/password authentication, access of pedagogical recources with custom built frontend exercise modules/learning games, user administration etc.
Now, this organization is to an increasing extent using Google Workspace for user administration, resource sharing etc. However, Workspace itself can't be used as a replacement for the Firebase site due to the limits in design possibilites, lack of customization of pedagogical content etc.
So, does Google Workspace provide api's that would make it possible to use it as a "backend" for a Firebase frontend?
The most basic and inportant thing is authentication/authorizaion: Users should get access to the Firebase site and its resources via their Workspace account group and membership(s) in Workspace group(s).
When it comes to content, it would be great to - apart from the custom Firebase documents/pedagogical modules - also be able to present documents/resources from associated Workspace groups.
All in all: as much as possible of user auth, user adminstration, document resources should be kept on the Workspace side, with Firebase used as a facade communicating with workspace via api's, and also providing the customization possibilites when it comes to special content not possible in the Workspace context.
How much of this can be done with the combination of Firebase and Google Workspace today?
Preferrably using api calls, not by first copying/syncing database information back and forth?

Create firebase account on behalf of users

I'm trying to find a way to allow users to create and setup firebase project on their own google account from a client app, and get all their project information, urls and so on.
I took a look at the new project management api but can not figure out how to achieve this.
The management API currently does not support the creation of a new Google Cloud project. You are free to file a feature request for that, but it's worth pointing out that project creation is a complex issue and needs to be gated by abuse prevention measures.
You might also want to look into Google Cloud APIs for dealing with projects.

Firebase - Multiple client apps

Does firebase limit the amount of firebase apps that a google account can have? I'm making an app for 2 different customers and have decided to use firebase for the db functionality.
I'm slightly concerned about the above if I were to grow my business. In the event that I manage to increase my client base, , I would hate to have multiple logins to access each client project.
When it comes to billing. Can I set up my firebase to charge my account and not be project specific? An alternative to this would be if I was to create a singular project and then have multiple different apps connect to the database. However I don't think this would be possible as there would be no way for me to know who my clients customers would be. Is there anything I'm missing when it comes to this?
There is a fixed limit to how many apps you can have in a single Firebase project. Last I checked it was around 30 or so, but that may have changed.
The important thing to realize is that Firebase projects are meant to cover variants on a single "logical" app, all with a single user-base that all access the same resources.
So if you have an iOS, Android, Unity, Flutter, and Web version of the same app, you'll want to have those in the same project so that they share the same resources. If you have a specific variant of the app for admins, you'll also want to add that to the same project; again, so that it's accessing the same backend resources.
But if you have two different apps with two different user-bases, you should create a separate project for each app.

Firebase: multiple Apps connected to single firestore

This is intentionally a very broad question. Sorry about that.
I'm experimenting with firebase for the first time. I would like to build a little e-commerce webapp using firebase, React and Next. I would like to split the App in two different apps: one admin app (used to create products and do other admin stuff) and the actual shop app. The Apps should be hosted on two different domains but they should talk to the same cloud firestore.
What would be a good setup to implement this architecture? Currently I am thinking about creating separate firebase projects for the admin and the shop app so I can host them on different domains. The cloud firestore would live in the admin project together with all admin related cloud functions etc. The shop app (or client app) would have its own project for hosting and would be connected to the firestore from the admin project.
Does that sound like a reasonable architecture or am I completely on the wrong path. Any suggestions are appreciated. And again sorry for the broadness of the question.
You don't need to do anything special. Each app (mobile, web,whatever) connects to a firebase instance/project. You can just set them all up to use the same firebase project (.plist file etc) and it will all work. The advantage of this design is that both admin and client access the same data, which presumably you need. (If you haven't found it, on the Firebase Console -> Settings -> Project Settings; add applications which will generate the appropriate credential files for each device type.)
Since you will have a shared/common authentication space, you may find that you want to add a flag/limitation to login so that only specified users can access the admin side. There's a few ways this can be accomplished.

What are the main differences between Firebase vs Firebase 2.0?

Google just released Firebase 2.0.
It seems they are completely separate platforms.
Firebase: https://www.firebase.com/
Firebase 2.0: https://firebase.google.com/
APIs are also different.
Firebase: https://www.firebase.com/docs/web/api/
Firebase 2.0: https://firebase.google.com/docs/reference/js/#firebase
Could someone explain the differences in the core concepts on both mobile and web?
I've been building an app using old Firebase.
Should I change my codes to use Firebase 2.0?
The new version of Firebase is the same platform - it just adds a whole range of new features, so the big change to the core concepts is an expansion of what you can do.
The Realtime Database offers the same functionality as before, but with a refreshed API and a new console. You can keep using the same approach and data model as before, and the API changes are largely cosmetic (renaming to be consistent with the newer features).
Authentication is pretty similar, but it has been expanded to include new features like account linking and customizable emails. You should be able to upgrade your application to the new SDKs and console pretty easily: take a look at our migration guides for Android, iOS and the web.
You can import your project at any time. Your applications and the existing SDKs will continue to work. You can then update your code when you are ready to use some of the new Firebase features in your application.
The new concepts are really around the new features:
Analytics is a new mobile-first analytics product that gives free and unlimited event reporting, and allows building audiences which can be used in many other services.
Storage allows you to store and serve user-generated content, such as photos or videos.
Remote Config allows you to change the behavior and appearance of your app without publishing an app update.
Cloud Messaging is a cross-platform messaging solution that lets you reliably deliver messages and notifications at no cost. Notifications gives you a tool in the Firebase Console to send re-engagement messages easily.
Crash Reporting lets you collect crash data from your Android and iOS apps, to find and fix problems more quickly.
Dynamic Links are smart URLs that dynamically change behavior to provide the best experience across different platforms. They allow you to use deep links that survive app installs on Android and iOS.
Several existing Google products have been integrated into Firebase as well
Invites replaced AppInvites, giving easy way to sending personalized email and SMS invitations. App Indexing gets your app into Google search.
Firebase now also integrates with AdWords to let you target ad campaigns with Analytics audiences, and AdMob to automatically track in-app ad effectiveness.
Its a lot of new features, but you don't have to try them all at once! Once you upgrade, its straightforward to pick and choose.

Resources