Can I use firebase for only auth and any other SQL database to store other user data? - firebase

Basically I am building a social media type app. I want to manage the auth using firebase firestore (as It is easier) and the contents posted by the user in any other SQL database. Like, if the user uploads a image it will be stored in my own database. Is it possible to link firebase with my own database? If yes, then how?

Firebase Authentication isn't related in any way to Cloud Firestore. You can authenticate your users with Firebase and save the data in any database you want, even in an SQL database. However, Cloud Firestore has some benefits. So I recommend you check the official docs.

Yes, you can use Firebase for auth only and link it to your own database.
You'll have to use the Firebase Admin SDK in your backend. Check out the set up guide.

Related

How do we sync firebase users into Big Query?

We have been using the firebase extension to stream (and import) our firestore collection data in BigQuery. That works great.
I was looking for a way to do the same for the users in Firebase Authentication. Any way we can do that?
Thank you
There is no Firebase Extension to export users to BigQuery.
But there is an API in the Admin SDKs that allows you to read all users, so if you combine that with the APIs to write data to BigQuery you can build the functionality yourself.

Need help in write firestore database security rules

I am new to firestore database and I have developed an app in android studio accessing data from firestore database. My application has 2 types of user category 1. Admin 2. Users
I have implemented Mobile number authentication logic using API of sms service provider. I am not using google's firebase authentication. How should I write the rules for the firestore database I am unable to understand.
Admin --> can read and write to all collections
Users --> can read all collections but write only few collections
Can anyone guide me how can I achieve this.
I think a good place to start is here.
https://firebase.google.com/docs/firestore/security/get-started

Flutter get User Data from Firebase

I want to get User Data from firebase, I need the diplayName of a User. is there any way to get the displayName of a other user with his uid?
There is no way to look up information about another user in Firebase Authentication by using the client-side SDKs of Firebase, as that would be a security risk.
There are two common ways to allow searching the users in a secure way:
Write information about each user to a database (such as Cloud Firestore or the Realtime Database) when they register, and then search the database when needed. That way your code controls what data gets written and thus is searchable.
Firebase has Admin SDKs that run in trusted environments, such as your development machine, a server you control, or Cloud Functions. These SDKs have options to list users, which means you can search them. If you wrap one of the Admin SDKs in a custom API that you build and secure yourself, you can then call that from your Flutter code.
Also see:
React native firebase authentication searching
You can't get the name, or any other details of a user that is not currently signed in using FirebaseAuth.
Instead, you must create a node in your database where you store the name, and any other necessary details by querying the database.

I just deleted my app from firebase console , but it is still working and changing data in the realtime database

I just deleted my flutter app from firebase console , but it is still working and changing data in the realtime database.
Can anyone tell me how its still connected with the firebase?
Thanks
According to Firebase documentation, when you delete an app:
Corresponding API keys or OAuth clients are NOT deleted. You can clean
up the API keys or OAuth clients in the Google APIs console
credentials page. Deleting these resources will break installed
applications: your users will no longer be able to authenticate or
sign in.
Access to the realtime database is not limited to apps that are registered in the Firebase console. Any code that has the proper configuration for your database, can try to access that database. If you want to be more selective in who can access the database, you will need to do this with Firebase's server-side security rules, typically in combination with Firebase Authentication.

Firebase cloud storage security rules and Firebase database connection

I want to add firebase cloud storage security rules so that my file can be access by set of people's. List of people's are in my firebase database.
Can anyone help me please?
There is no way to access the Firebase Database from your Cloud Storage for Firebase security rules. You will have to set the information into the token for each user, and then access that in your storage rules.
Also see:
Restrict firebase database and storage write access to a specific group
is there a way to authenticate user role in firebase storage rules?
Create group access to firebase storage without using custom authorization
Some of these show embedding the UIDs in the security rules, which used to be the only way to do this. But nowadays you should probably user custom claims for this, as shown in Bojeil's answer to the first question above.

Resources