简体   繁体   中英

Can i use multiple apps on a single firebase database? Will it use same auth or different auth?

I am currently developing multiple apps with Firebase and I have a doubt. I have a user and an admin. My problem is if I am using the same firebase database, will the user be able to sign up into Admin's app using his credentials or both app will have different authentication. I don't want the user logging into the admin app with user credentials. If it is possible, what can I do to avoid it?

I haven't done trying it.

You can solve this in multiple ways

  • Have a different collection to store the data of the admins and then check on the login if the email is present in the collection
  • With the Rules of Firestore

Can I use multiple apps on a single Firebase database?

Yes, you can.

Will it use the same auth or a different auth?

If both apps are added to the same project, then the authentication will be the same for both projects. This means that the user can use the same account for both projects. This also means that both apps can write/read data to/from the same database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM