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?
Related
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.
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.
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?
I am using GoolgeFirebase for my android application. I want to make an admin portal at GoogleFirebase connected to that application's database to view some admin related tasks, like showing waiters with rating where i have all the wiaters and rating data stored in Google Firebase Realtime Database.
Do i have to create a web app, connected and hosted at the Google Firebase or the GoogleFirebase facilitate itslef for creating some admin portal for the android app.
You have to build something. A web app using firebase hosting is really easy but you can host it anywhere you want including on your own PC. Of course you can also build any kind of app using one of the SDKs or anything that can do HTTPS requests. An special admin android app is an option. Java desktop GUI app may be to your liking.
Sometimes I find building a commandline tool in node.js is perfect for my needs. The command line lets me pipe the output to other tools that are helpful.
Firebase provides a number of Admin SDKs to help build server-side or desktop applications. As of now there are Admin SDKs available for Node.js, Java and Python (although the Python SDK is new and doesn't have realtime DB support yet). You can use one of these SDKs to build your admin portal webapp.
I've opened a Google cloud project with multiple GCE, SQL and storage instances, along with an android app linked to it, about a year ago. In addition I've had 2 Firebase projects, one for production and one for dev environments, that were of course not linked to my Cloud project.
Now that the new Firebase is here, I would like to link all these accounts.
I have imported my Cloud project to the Firebase console, but it has its own Firebase DB, I'm not able to link it to my actual Firebase DBs (projects)... I can see my App analytics and cloud messaging but not my Firebase data, as the two Firebase projects are still considered as other projects.
How do I link or consolidate all these accounts together, Cloud and Firebases? And if not all, what about only the production one into my Cloud project?
This is how my Firebase dashboard looks right now:
You can import your firebase.com app into a new Firebase project and you can separately import your Google project into a Firebase project. However, we do not support merging these 2 imported projects.
If you want to use Firebase Auth or Firebase Invites in your Firebase project and if you have your OAuth Client registered with another Google project, you can add the OAuth client ID of your Google project into your Firebase project.
#Aralizer, you should be able to use Analytics, Crash reporting etc on the project you import from firebase.com. This Firebase project can co-exist with your previous Google Cloud project for GCE, Cloud SQL etc. It seems like you may have registered an OAuth Client in the Cloud project that you want to reuse in the Firebase project. This is possible by whitelisting the Cloud project's OAuth client ID in the Firebase project. Check this helpcenter article for more details on how to do this: https://support.google.com/firebase/answer/6401008