How To Create A Central Auth Project In GCP/Firebase? - 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

Related

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.

How to create an admin Web app with client Mobile app using Flutter

Im currently working with Mobile app with firebase back end. I wonder how to build another admin Web app which should be hosted on the Web and pass data to the Mobile app. Should i open another project to build the Web app?Or build the both app within one project which should share with one firebase back end. Someone please guide me as Im clueless. Would appreciated for the sharing.
Since the application admin app is managing the same set of data, it will typically be part of the same Firebase project too. This is actually a quite common scenario, and I regularly add an admin web app to my Firebase project precisely for that purpose.

flutter authentication: multiple flutter apps in one firebase project

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?

is it possible to add Firebase Admin SDK into the android app which using realtime database and Firebase storage

I have successfully build two apps (Admin and User) both using same Firebase realtime database. I want to separate the admin and the user app. Admin add the user, but the problem is that the user add by the admin is signing in user app and also in admin app. Kindly help me. I have no idea about admin Sdk, is there any way to get rid of this problem
The Admin SDKs are meant to be used in a trusted environment, such as your development machine, a server you control, or Cloud Functions. They are explicitly not meant to be used in client-side applications.
The common approach to create an administrative app is to:
Create your own server-side API, with either Cloud Functions or on your own server, and expose URL endpoints that can be called from an app. In this code you'll use the Admin SDK, and you'll implement both the logic you need (i.e. creating user accounts), and the logic to secure access to it.
Then call this custom API endpoint from within you Android application.
Also see:
Firebase Admin SDK Android (with an answer from the main author of the SDK)
Firebase Admin SDK for Android, methods not found
Firebase admin sdk not syncing with the gradle

how can you migrate from meteor to node/express?

I'm thinking of prototying a web and ios app in meteor, if I find there is traction I would like build a native app (non phonegap). I want keep to keep my existing mongo data (user accounts, fb tokens, etc), and build the api in node/express for native ios app. However, I'm not sure how to migrate the user auth to use token based authentication when migrating to node.
P.S my app isn't reactive/realtime and doesn't necessarily require I use ddp.
thanks

Resources