flutter authentication: multiple flutter apps in one firebase project - firebase

I have one Firebase project with two android apps
I use the same databases and everything but I want to use different authentication for each one of them.
Is there any rules for the authentication feature or what should I do to implement this?

Related

Multiple Firebase apps in one react native project

Is it possible to use several Firebase projects for Firebase Cloud Messaging in one application?
In my project I use rnfirebase and they say that
Currently, the native Firebase SDKs only provide functionality for creating secondary apps on the following services:
App Check.
Authentication.
Realtime Database.
Cloud Firestore.
Cloud Functions.
Cloud Storage.
ML.
Installations,
Remote Config.
That is, FCM is not in this list. Maybe someone knows how to substitute different google-services.json in real time.
Four firebase apps with cloud messaging, which work
firebaser here
Currently, you can only integrate one FCM project in an app. The token generated in the app will only work to that certain project.

How To Create A Central Auth Project In GCP/Firebase?

So what Im trying to do is, create a central project that holds all auth credentials and base user information in Firestore. Then have other projects connect to that project to gain access to individual apps. An example of this would be the following:
Project A - Auth Project
Project B - App 1
Project C - App 2
Project B Authentication -> Project A Authenticate And Give Project B Firestore User Object
Project C Authentication -> Project A Authenticate And Give Project C Firestore User Object
Anyone have any idea how I can do this? I have an idea that I may be able to do it with Firebase functions but can I also do it from the frontend such as from an iOS app? Would that require two Firebase Config files? If so how do I differentiate between the two of them in the iOS app?
A little more context on this. I am finished creating my first app. I am beginning to create an app that is completely different from the first app but I need my users to be able to share credentials across both apps. So my plan is to create a single project that holds the master user record and authenticates users from both of the other projects. Does this make sense? Also users will only authenticate using email/password combo, nothing else.
Any help would be greatly appreciated. Thanks.
You can check these official documentation on how to configure multi projects and understanding the firestore app and projects in detailAs,any Firebase project is governed by the Firestore security rules basically implement the security model which does refuse data or accounts outside of the project where they were deployed.You can try to implement with some backend API which can communicate between the two systems maintaining these security constraints.Also,If you want users from project B and project C to share credentials which have been authenticated in project A and you can let the user authenticate with the same UID with a "parallel" account in the second project rules on B would still be limited to the app and data for the immediate project and would not be able to access anything directly into other one.
I recommend you to check the following examples for the similar approach:
Use Firebase auth data and users for multiple project and apps
Single firebase project for multiple GCP projects
Implementing cross project user authentication

Flutter Web and Firebase with Multi Environment

I started a Flutter Web project and used Firebase Auth, Firestore, Hosting, Functions and Storage. I have two different Firebase project for this app; one of them is for development, the other of them is for product. How can I manage this environments like Android Product Flavor or iOS Schemes?
When I searched on Google, I saw Firebase Environment and used it, but it is not clear for me. For example, if I manage this situation with Firebase Environment, how can I understand which firebase project is used in dart code and change some of codes according to flavor?

Is it possible to connect multiple flutter projects with one firebase database?

How many flutter project can connect with one firebase database?
There are 4 members working with one firebase database.
But flutter projects are different.
Is it possible to connect it?
Yes you can create many app base on a project firebase.
You can add Flutter project (Android/IOS/Web Application) on Firebase setting.
https://support.google.com/firebase/answer/9326094?hl=en

is it possible to use firebase admin SDK in flutter web apps?

I am using flutter web and firebase authentication. I want to use firebase admin SDK to manage users from my flutter web application. Is it possible to use firebase admin SDK in flutter web apps. please let me know is it possible or not.
If possible please let me know the previous example links or some information. I have searched on internet but I did not get the information.
From the Firebase documentation on Adding Firebase to your server:
Add the Firebase Admin SDK to your server
The Admin SDK is a set of server libraries that lets you interact with Firebase from privileged environments to perform actions like:
...
As said, the Admin SDKs are designed to be used in privileged environment, since using them gives you full administrative control to your Firebase project. Using it in another context would be a huge security risk, so is not possible.
If you need certain functionality from the Admin SDK in your web app, you can:
Use the Admin SDK in a trusted environment, such as your development machine, a server that you control, or Cloud Functions, to implement that functionality.
Then wrap that code in a custom API that you can call from your client-side code. If you've never done this before, Cloud Functions again provides a good starting point.
In your server-side code, ensure that only authorized users can invoke it.

Resources