Organization Firebase database configuration in a Xamarin.Forms app
I have an open-source solution for Vaccine Distribution and Tracking. The solution includes two projects, one in asp.net for Admins and one in Xamarin.Forms for Volunteers,
and I have configured the Firebase Project for a real-time database and Authentication provider [in development]. Admin is responsible for creating accounts for volunteers, and then volunteers are downloading the app from the play store and can access the app via the email and password created by the admin.
Now, here is the problem. An organization or a team wants to configure this app for a region. They are configuring their firebase real-time database with the admin panel and creating accounts for the volunteers., but the configuration I mean API Key and Project URL is not set on the mobile apps. Volunteers should only have emails and passwords, but how to configure them for the firebase their organization is using.
I have a solution, but it has a problem within it.
I have a page that appears once and at a first-run before the login page, and it asks about the API key and Project URL. But there is the problem, the admin won't give the API key and the project URL, as I know that is not a good practice.
Hi, NaveedAhmadHematmal. To access/consume the firebase database, we just need to obtain the database url to initialize the FirebaseClient. This should have been configured in the project, it doesn't require the user to do some work.
FirebaseClient firebase = new FirebaseClient(database_url);
You could search with the keyword as Xamarin.Forms Firebase Realtime Database to check the related document.
Different users have different firebase accounts. How I can configure my app for a specific firebase! It is a general app everyone can have his firebase database and use this app with it.
You could pass the current user's id to the FirebaseClient when operating the database.
Check the doc: https://firebase.google.com/docs/database/android/read-and-write#read_data
I know how to configure firebase for authentication. Please! Read my question once again.
Pretend that there is an app that stores user's contacts on firebase that they own. There is no centralized firebase database for the app. You should configure your firebase API key and Database URL and create users for your family member to share the same firebase, and I should do my one for my family.
Sorry for the misleading information. But the application only has one database on firebase instead of creating a db for every user, which is different than the local database. All the authenicated users can access the cloud database to save and retrive the data.
Sign in to comment